From f308b13634db86ab15115c8cad16630a98f115ca Mon Sep 17 00:00:00 2001 From: GRACENOBLE Date: Sun, 14 Jun 2026 20:34:46 +0300 Subject: [PATCH 1/5] refactor: rename frontend/ to web/ and update all references Renames the Next.js layer directory from frontend/ to web/ and updates every path, command, agent name, and doc reference across CLAUDE.md, AGENTS.md, CONTRIBUTING.md, README.md, .claude/ agents and commands, backend docs, and web/docs/ to match. --- .claude/agents/docs.md | 8 +++--- .claude/agents/reviewer.md | 4 +-- .claude/agents/{frontend.md => web.md} | 22 +++++++-------- .claude/commands/check.md | 8 +++--- .claude/commands/implement.md | 4 +-- AGENTS.md | 16 +++++------ CLAUDE.md | 14 +++++----- CONTRIBUTING.md | 24 ++++++++--------- README.md | 34 ++++++++++++------------ backend/docs/routing.md | 2 +- backend/internal/server/routes.go | 2 +- {frontend => web}/.gitignore | 0 {frontend => web}/AGENTS.md | 0 {frontend => web}/CLAUDE.md | 0 {frontend => web}/README.md | 0 {frontend => web}/app/favicon.ico | Bin {frontend => web}/app/globals.css | 0 {frontend => web}/app/layout.tsx | 0 {frontend => web}/app/page.tsx | 0 {frontend => web}/docs/_index.md | 4 +-- {frontend => web}/docs/components.md | 0 {frontend => web}/docs/data-fetching.md | 2 +- {frontend => web}/docs/routing.md | 0 {frontend => web}/docs/styling.md | 0 {frontend => web}/eslint.config.mjs | 0 {frontend => web}/next.config.ts | 0 {frontend => web}/package.json | 2 +- {frontend => web}/pnpm-lock.yaml | 0 {frontend => web}/pnpm-workspace.yaml | 0 {frontend => web}/postcss.config.mjs | 0 {frontend => web}/public/file.svg | 0 {frontend => web}/public/globe.svg | 0 {frontend => web}/public/next.svg | 0 {frontend => web}/public/vercel.svg | 0 {frontend => web}/public/window.svg | 0 {frontend => web}/tsconfig.json | 0 36 files changed, 73 insertions(+), 73 deletions(-) rename .claude/agents/{frontend.md => web.md} (66%) rename {frontend => web}/.gitignore (100%) rename {frontend => web}/AGENTS.md (100%) rename {frontend => web}/CLAUDE.md (100%) rename {frontend => web}/README.md (100%) rename {frontend => web}/app/favicon.ico (100%) rename {frontend => web}/app/globals.css (100%) rename {frontend => web}/app/layout.tsx (100%) rename {frontend => web}/app/page.tsx (100%) rename {frontend => web}/docs/_index.md (83%) rename {frontend => web}/docs/components.md (100%) rename {frontend => web}/docs/data-fetching.md (92%) rename {frontend => web}/docs/routing.md (100%) rename {frontend => web}/docs/styling.md (100%) rename {frontend => web}/eslint.config.mjs (100%) rename {frontend => web}/next.config.ts (100%) rename {frontend => web}/package.json (95%) rename {frontend => web}/pnpm-lock.yaml (100%) rename {frontend => web}/pnpm-workspace.yaml (100%) rename {frontend => web}/postcss.config.mjs (100%) rename {frontend => web}/public/file.svg (100%) rename {frontend => web}/public/globe.svg (100%) rename {frontend => web}/public/next.svg (100%) rename {frontend => web}/public/vercel.svg (100%) rename {frontend => web}/public/window.svg (100%) rename {frontend => web}/tsconfig.json (100%) diff --git a/.claude/agents/docs.md b/.claude/agents/docs.md index b3c1ce0..fcbba44 100644 --- a/.claude/agents/docs.md +++ b/.claude/agents/docs.md @@ -9,7 +9,7 @@ tools: - Glob --- -You are the documentation specialist for this project. Your job is to keep `backend/docs/`, `frontend/docs/`, and `mobile/docs/` accurate, current, and useful as the codebase grows. +You are the documentation specialist for this project. Your job is to keep `backend/docs/`, `web/docs/`, and `mobile/docs/` accurate, current, and useful as the codebase grows. ## Doc locations ``` @@ -21,7 +21,7 @@ backend/docs/ error-handling.md environment.md -frontend/docs/ +web/docs/ _index.md # topic registry — always check this first routing.md data-fetching.md @@ -48,7 +48,7 @@ sources: ``` ## Task: check-and-assess (call BEFORE implementation) -1. Read `backend/docs/_index.md`, `frontend/docs/_index.md`, and `mobile/docs/_index.md` to find relevant topics. +1. Read `backend/docs/_index.md`, `web/docs/_index.md`, and `mobile/docs/_index.md` to find relevant topics. 2. Read each relevant doc file. 3. Read the source files listed in the doc's `sources` frontmatter. 4. Compare: does the documented pattern still match the actual code? @@ -67,7 +67,7 @@ sources: 6. If a new topic was introduced, create a new doc file and add it to `_index.md`. ## Task: create (for a brand new topic) -1. Create `backend/docs/.md`, `frontend/docs/.md`, or `mobile/docs/.md`. +1. Create `backend/docs/.md`, `web/docs/.md`, or `mobile/docs/.md`. 2. Populate from the actual source code — never invent or assume patterns. 3. Add the entry to `_index.md`. diff --git a/.claude/agents/reviewer.md b/.claude/agents/reviewer.md index 1defc82..f424835 100644 --- a/.claude/agents/reviewer.md +++ b/.claude/agents/reviewer.md @@ -1,6 +1,6 @@ --- name: reviewer -description: Use this agent to review code changes across frontend or backend for correctness, security, and convention adherence before committing or opening a PR. Returns findings grouped by severity. +description: Use this agent to review code changes across web or backend for correctness, security, and convention adherence before committing or opening a PR. Returns findings grouped by severity. tools: - Read - Grep @@ -8,7 +8,7 @@ tools: - Bash --- -You are a code reviewer for this project (Go backend + Next.js frontend). +You are a code reviewer for this project (Go backend + Next.js web app). ## Process 1. Identify changed files via `git diff --name-only` or from the user's description. diff --git a/.claude/agents/frontend.md b/.claude/agents/web.md similarity index 66% rename from .claude/agents/frontend.md rename to .claude/agents/web.md index f98927d..e0b4fc2 100644 --- a/.claude/agents/frontend.md +++ b/.claude/agents/web.md @@ -1,6 +1,6 @@ --- -name: frontend -description: Use this agent for any Next.js/React/TypeScript frontend task — pages, components, API calls, styling, or understanding the app structure. Specializes in Next.js App Router with React 19 and Tailwind CSS 4. +name: web +description: Use this agent for any Next.js/React/TypeScript web task — pages, components, API calls, styling, or understanding the app structure. Specializes in Next.js App Router with React 19 and Tailwind CSS 4. tools: - Read - Edit @@ -10,10 +10,10 @@ tools: - Glob --- -You are a Next.js frontend specialist for this project. +You are a Next.js web app specialist for this project. ## CRITICAL — Read before writing any Next.js code -Next.js 16 has breaking changes from your training data. Before writing any Next.js-specific code (routing, data fetching, layouts, caching), read the relevant section in `frontend/node_modules/next/dist/docs/`. Heed all deprecation notices. +Next.js 16 has breaking changes from your training data. Before writing any Next.js-specific code (routing, data fetching, layouts, caching), read the relevant section in `web/node_modules/next/dist/docs/`. Heed all deprecation notices. ## Stack - Next.js 16 (App Router), React 19, TypeScript 5 @@ -21,11 +21,11 @@ Next.js 16 has breaking changes from your training data. Before writing any Next - pnpm as package manager ## Key files -- `frontend/app/layout.tsx` — root layout, metadata, fonts -- `frontend/app/page.tsx` — home page (Server Component by default) -- `frontend/app/globals.css` — global styles, Tailwind import -- `frontend/next.config.ts` — Next.js config -- `frontend/tsconfig.json` — check path aliases before writing imports +- `web/app/layout.tsx` — root layout, metadata, fonts +- `web/app/page.tsx` — home page (Server Component by default) +- `web/app/globals.css` — global styles, Tailwind import +- `web/next.config.ts` — Next.js config +- `web/tsconfig.json` — check path aliases before writing imports ## App Router conventions - Routes are `app/**/(page|layout|loading|error).tsx` files. @@ -46,7 +46,7 @@ Next.js 16 has breaking changes from your training data. Before writing any Next ## Before finishing Always run: ```bash -cd frontend && pnpm lint -cd frontend && pnpm build +cd web && pnpm lint +cd web && pnpm build ``` Fix all errors before declaring work done. diff --git a/.claude/commands/check.md b/.claude/commands/check.md index 036af36..f45d1ab 100644 --- a/.claude/commands/check.md +++ b/.claude/commands/check.md @@ -1,4 +1,4 @@ -Run a full quality gate across backend, frontend, and mobile. Report pass/fail for each step. Stop on the first critical failure. +Run a full quality gate across backend, web, and mobile. Report pass/fail for each step. Stop on the first critical failure. ## Backend ```bash @@ -6,10 +6,10 @@ cd backend && go vet ./... cd backend && make test ``` -## Frontend +## Web ```bash -cd frontend && pnpm lint -cd frontend && pnpm build +cd web && pnpm lint +cd web && pnpm build ``` ## Mobile diff --git a/.claude/commands/implement.md b/.claude/commands/implement.md index f6643de..032f946 100644 --- a/.claude/commands/implement.md +++ b/.claude/commands/implement.md @@ -1,7 +1,7 @@ Implement a feature following the Documentation-First workflow. This ensures every implementation is grounded in existing patterns and leaves the docs in a better state than it found them. ## Required from user before starting -- Feature description (what it does, which layer — backend / frontend / both) +- Feature description (what it does, which layer — backend / web / both) - Any constraints or decisions already made --- @@ -31,7 +31,7 @@ Do not implement against stale documentation. Update docs first. --- ## Step 3 — Implement -Delegate to the appropriate agent (`backend`, `frontend`, or both). +Delegate to the appropriate agent (`backend`, `web`, or both). Pass the relevant doc content as context so the agent implements to the correct patterns — not from training data. diff --git a/AGENTS.md b/AGENTS.md index 07541f1..8dbb0f0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,10 +1,10 @@ # AGENTS.md -Fullstack project — Go + Gin backend, Next.js 16 + React 19 frontend, PostgreSQL, Android mobile (Kotlin + Compose). +Fullstack project — Go + Gin backend, Next.js 16 + React 19 web app, PostgreSQL, Android mobile (Kotlin + Compose). Each layer has its own `AGENTS.md` and `docs/` folder. Read the file closest to what you are editing: - `backend/AGENTS.md` + `backend/docs/` — Go API -- `frontend/AGENTS.md` + `frontend/docs/` — Next.js UI +- `web/AGENTS.md` + `web/docs/` — Next.js UI - `mobile/AGENTS.md` + `mobile/docs/` — Android app Claude Code users: see `CLAUDE.md` for the feature development workflow and subagent definitions. @@ -22,8 +22,8 @@ cd backend && make docker-run # 2. Backend API (hot reload, separate terminal) cd backend && make watch # → http://localhost:8080 -# 3. Frontend (separate terminal) -cd frontend && pnpm install && pnpm dev # → http://localhost:3000 +# 3. Web app (separate terminal) +cd web && pnpm install && pnpm dev # → http://localhost:3000 # 4. Mobile — open mobile/ in Android Studio and run on emulator/device cd mobile && ./gradlew assembleDebug # build only @@ -39,9 +39,9 @@ cd mobile && ./gradlew installDebug # build and install on connected devic cd backend && make test # unit + integration cd backend && make itest # integration only -# Frontend -cd frontend && pnpm lint -cd frontend && pnpm build +# Web +cd web && pnpm lint +cd web && pnpm build # Mobile cd mobile && ./gradlew lint @@ -93,6 +93,6 @@ All backend DB tests use **Testcontainers** (real PostgreSQL). Never mock the da ## PR instructions - Branch from `main` — no direct pushes to `main` -- Run `make test` (backend), `pnpm lint && pnpm build` (frontend), and `./gradlew lint && ./gradlew test` (mobile) before opening a PR +- Run `make test` (backend), `pnpm lint && pnpm build` (web), and `./gradlew lint && ./gradlew test` (mobile) before opening a PR - One logical change per PR - PR title: concise description of what changed, not implementation details diff --git a/CLAUDE.md b/CLAUDE.md index c42126c..2e6c4ce 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -13,11 +13,11 @@ ```bash cd backend && make docker-run # start Postgres cd backend && make watch # backend dev with hot reload (Air) → :8080 -cd frontend && pnpm dev # frontend dev → :3000 +cd web && pnpm dev # web dev → :3000 cd backend && make test # all tests cd backend && make itest # integration tests only (requires Docker) -cd frontend && pnpm lint && pnpm build +cd web && pnpm lint && pnpm build cd mobile && ./gradlew assembleDebug # build Android APK cd mobile && ./gradlew lint && ./gradlew test # mobile quality gate @@ -27,7 +27,7 @@ cd mobile && ./gradlew connectedAndroidTest # instrumented tests (emulator/dev ## Feature development workflow — always follow this 1. **Check docs first** — delegate to `docs` agent: find relevant topic docs, verify they match the current code 2. **Fix stale docs** — if docs diverge from code, update docs before implementing -3. **Implement** — delegate to `backend` or `frontend` agent, passing the relevant doc content as context +3. **Implement** — delegate to `backend` or `web` agent, passing the relevant doc content as context 4. **Update docs** — delegate to `docs` agent: update `last_verified`, add new topics if introduced 5. **Quality gate** — run `/project:check` before declaring done @@ -36,14 +36,14 @@ Use `/project:implement` to run this workflow end-to-end. ## Documentation locations ``` backend/docs/ # database, routing, testing, error-handling, environment -frontend/docs/ # routing, data-fetching, styling, components +web/docs/ # routing, data-fetching, styling, components mobile/docs/ # compose-conventions, architecture, testing ``` Each doc file has `last_verified` and `sources` frontmatter. The `docs` agent maintains these. ## Available subagents — delegate to these - **`backend`** — Go/Gin/PostgreSQL tasks -- **`frontend`** — Next.js/React/TypeScript tasks +- **`web`** — Next.js/React/TypeScript tasks - **`mobile`** — Android/Kotlin/Jetpack Compose tasks - **`reviewer`** — pre-commit code review across all layers - **`db-explorer`** — read-only DB schema and query analysis @@ -67,9 +67,9 @@ backend/ docker-compose.yml .env # never commit secrets Makefile -frontend/ +web/ app/ # Next.js App Router - CLAUDE.md → AGENTS.md # frontend-specific rules (read before writing Next.js) + CLAUDE.md → AGENTS.md # web-specific rules (read before writing Next.js) mobile/ app/src/main/java/com/company/template/ MainActivity.kt # single entry point, Compose root diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c13d779..eb7e602 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,8 +66,8 @@ Feature suggestions are welcome. Open an issue with: # Backend cd backend && make test - # Frontend - cd frontend && pnpm lint && pnpm build + # Web + cd web && pnpm lint && pnpm build # Mobile cd mobile && ./gradlew lint && ./gradlew test @@ -94,7 +94,7 @@ cd backend && make docker-run cd backend && make watch # Frontend (hot reload) -cd frontend && pnpm dev +cd web && pnpm dev # Mobile — open mobile/ in Android Studio, or build via Gradle cd mobile && ./gradlew assembleDebug @@ -102,7 +102,7 @@ cd mobile && ./gradlew assembleDebug ## Keeping Documentation Current -This project uses topic-based documentation in `backend/docs/` and `frontend/docs/` to give AI coding agents accurate, up-to-date context. When your changes affect how the project works, update the relevant doc alongside your code — not in a separate PR. +This project uses topic-based documentation in `backend/docs/` and `web/docs/` to give AI coding agents accurate, up-to-date context. When your changes affect how the project works, update the relevant doc alongside your code — not in a separate PR. ### What to update @@ -113,22 +113,22 @@ This project uses topic-based documentation in `backend/docs/` and `frontend/doc | Test setup or testing patterns (backend) | `backend/docs/testing.md` | | Error handling conventions | `backend/docs/error-handling.md` | | Environment variables | `backend/docs/environment.md` | -| App Router structure or route files | `frontend/docs/routing.md` | -| Data fetching or Server Actions | `frontend/docs/data-fetching.md` | -| Tailwind or CSS conventions | `frontend/docs/styling.md` | -| Component patterns or TypeScript conventions | `frontend/docs/components.md` | +| App Router structure or route files | `web/docs/routing.md` | +| Data fetching or Server Actions | `web/docs/data-fetching.md` | +| Tailwind or CSS conventions | `web/docs/styling.md` | +| Component patterns or TypeScript conventions | `web/docs/components.md` | | Composable conventions, theme, or Material3 usage | `mobile/docs/compose-conventions.md` | | Activity setup, lifecycle, or ViewModel pattern | `mobile/docs/architecture.md` | | Test setup or testing patterns (mobile) | `mobile/docs/testing.md` | ### How to update a doc -1. Edit the relevant file in `backend/docs/` or `frontend/docs/`. +1. Edit the relevant file in `backend/docs/` or `web/docs/`. 2. Update the `last_verified` date in the frontmatter to today's date. 3. Update the `sources` list if you added or removed source files. 4. If you introduce a new topic that isn't covered, create a new doc file and add it to the relevant `_index.md`. -The `AGENTS.md` files at the root, `backend/`, `frontend/`, and `mobile/` are entry points for AI agents — update them if you change project-level setup commands, tooling, or structure. +The `AGENTS.md` files at the root, `backend/`, `web/`, and `mobile/` are entry points for AI agents — update them if you change project-level setup commands, tooling, or structure. ## Style Guidelines @@ -139,7 +139,7 @@ The `AGENTS.md` files at the root, `backend/`, `frontend/`, and `mobile/` are en - No exported symbols without a doc comment. - Use table-driven tests. -### TypeScript/React (frontend) +### TypeScript/React (web) - All new files should be TypeScript (`.ts` / `.tsx`), not JavaScript. - Follow the existing ESLint configuration. @@ -185,7 +185,7 @@ Examples: ``` feat(backend): add JWT authentication middleware -fix(frontend): correct layout shift on mobile viewport +fix(web): correct layout shift on mobile viewport feat(mobile): add profile screen with Material3 card layout docs: add environment variable table to README ``` diff --git a/README.md b/README.md index 9eb97a7..8f9c320 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Fullstack Template -A production-ready fullstack starter. Clone it, rename things, and focus on your business logic — the infrastructure is already wired. Ships with a Go + Gin backend, Next.js 16 frontend, Android mobile app (Kotlin + Compose), PostgreSQL, Docker Compose, hot reload, integration testing, and a full agentic development setup for AI coding assistants. +A production-ready fullstack starter. Clone it, rename things, and focus on your business logic — the infrastructure is already wired. Ships with a Go + Gin backend, Next.js 16 web app, Android mobile app (Kotlin + Compose), PostgreSQL, Docker Compose, hot reload, integration testing, and a full agentic development setup for AI coding assistants. ## Table of Contents @@ -21,12 +21,12 @@ A production-ready fullstack starter. Clone it, rename things, and focus on your ## Features - **Go backend** with Gin, structured into clean `cmd/` and `internal/` layers -- **Next.js 16 frontend** with React 19, TypeScript, and Tailwind CSS 4 +- **Next.js 16 web app** with React 19, TypeScript, and Tailwind CSS 4 - **Android mobile app** with Kotlin 2.2, Jetpack Compose BOM 2026.02, and Material3 - **PostgreSQL** database managed via Docker Compose -- **Hot reload** on both frontend (`next dev`) and backend ([Air](https://github.com/air-verse/air)) +- **Hot reload** on both web (`next dev`) and backend ([Air](https://github.com/air-verse/air)) - **Integration tests** using [Testcontainers](https://testcontainers.com/) — no mocks, real DB -- **CORS** pre-configured between frontend and backend +- **CORS** pre-configured between web and backend - **`.env` support** via `godotenv` - **Makefile** for common backend tasks - **Agentic infrastructure** — AGENTS.md, CLAUDE.md, topic docs, subagents, hooks, and slash commands ready out of the box for all three layers @@ -35,7 +35,7 @@ A production-ready fullstack starter. Clone it, rename things, and focus on your | Layer | Technology | |-----------|-----------------------------------------------------| -| Frontend | Next.js 16, React 19, TypeScript | +| Web | Next.js 16, React 19, TypeScript | | Styling | Tailwind CSS 4 | | Backend | Go, Gin | | Database | PostgreSQL 16 (via Docker) | @@ -68,10 +68,10 @@ cp .env .env.local # adjust values as needed go mod download ``` -**Frontend:** +**Web:** ```bash -cd frontend +cd web pnpm install ``` @@ -98,10 +98,10 @@ cd backend && make watch # hot reload via Air # or: make run # run once, no reload ``` -**3. Start the frontend** (new terminal): +**3. Start the web app** (new terminal): ```bash -cd frontend && pnpm dev +cd web && pnpm dev ``` **4. Run the mobile app** — connect a device or start an emulator, then: @@ -112,7 +112,7 @@ cd mobile && ./gradlew installDebug Or run directly from Android Studio. -Frontend: `http://localhost:3000` — Backend API: `http://localhost:8080` +Web: `http://localhost:3000` — Backend API: `http://localhost:8080` ## Project Structure @@ -140,8 +140,8 @@ fullstack-template/ │ ├── .env │ ├── docker-compose.yml │ └── Makefile -├── frontend/ -│ ├── AGENTS.md # Frontend agent instructions +├── web/ +│ ├── AGENTS.md # Web agent instructions │ ├── docs/ # Topic docs: routing, data-fetching, styling, components │ ├── app/ │ │ ├── layout.tsx @@ -195,7 +195,7 @@ make itest # run integration tests only make clean # remove compiled binary ``` -### Frontend commands +### Web commands ```bash pnpm dev # start dev server with hot reload @@ -249,10 +249,10 @@ A layered `AGENTS.md` system follows the [AGENTS.md open standard](https://agent |---|---| | [`AGENTS.md`](AGENTS.md) | Project overview, setup, cross-cutting conventions, security | | [`backend/AGENTS.md`](backend/AGENTS.md) | Go commands, project structure, links to topic docs | -| [`frontend/AGENTS.md`](frontend/AGENTS.md) | pnpm commands, Next.js conventions, links to topic docs | +| [`web/AGENTS.md`](web/AGENTS.md) | pnpm commands, Next.js conventions, links to topic docs | | [`mobile/AGENTS.md`](mobile/AGENTS.md) | Gradle commands, Android conventions, links to topic docs | -Topic-specific documentation lives in `backend/docs/`, `frontend/docs/`, and `mobile/docs/`. Each file is kept in sync with the source code it describes and includes `last_verified` metadata so agents can detect when it may be stale. +Topic-specific documentation lives in `backend/docs/`, `web/docs/`, and `mobile/docs/`. Each file is kept in sync with the source code it describes and includes `last_verified` metadata so agents can detect when it may be stale. ### For Claude Code @@ -261,13 +261,13 @@ Additional infrastructure in `.claude/` provides a deeper integration: | Path | Purpose | |---|---| | [`CLAUDE.md`](CLAUDE.md) | Feature development workflow, all conventions | -| `.claude/agents/` | Specialized subagents: `backend`, `frontend`, `mobile`, `reviewer`, `db-explorer`, `docs` | +| `.claude/agents/` | Specialized subagents: `backend`, `web`, `mobile`, `reviewer`, `db-explorer`, `docs` | | `.claude/commands/` | Slash commands: `/project:implement`, `/project:check`, `/project:test`, `/project:new-route` | | `.claude/hooks/` | Auto-formats Go and TypeScript files on save; blocks dangerous commands | The recommended workflow for any implementation: -1. Check the relevant topic doc in `backend/docs/`, `frontend/docs/`, or `mobile/docs/` before writing code +1. Check the relevant topic doc in `backend/docs/`, `web/docs/`, or `mobile/docs/` before writing code 2. Implement against documented patterns rather than general training data 3. Update the doc file after implementation so the next agent session starts with accurate context diff --git a/backend/docs/routing.md b/backend/docs/routing.md index 6eac86e..e1abbd1 100644 --- a/backend/docs/routing.md +++ b/backend/docs/routing.md @@ -46,7 +46,7 @@ func (s *Server) myHandler(c *gin.Context) { ## CORS configuration Pre-configured in `RegisterRoutes()` via `github.com/gin-contrib/cors`. -Current allowed origin: `http://localhost:5173` — **update to `http://localhost:3000`** for this project's Next.js frontend. +Current allowed origin: `http://localhost:5173` — **update to `http://localhost:3000`** for this project's Next.js web app. Allowed methods: GET, POST, PUT, DELETE, OPTIONS, PATCH. `AllowCredentials: true` — cookies and auth headers pass through. diff --git a/backend/internal/server/routes.go b/backend/internal/server/routes.go index b07ab03..be91298 100644 --- a/backend/internal/server/routes.go +++ b/backend/internal/server/routes.go @@ -11,7 +11,7 @@ func (s *Server) RegisterRoutes() http.Handler { r := gin.Default() r.Use(cors.New(cors.Config{ - AllowOrigins: []string{"http://localhost:5173"}, // Add your frontend URL + AllowOrigins: []string{"http://localhost:5173"}, // Add your web app URL AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"}, AllowHeaders: []string{"Accept", "Authorization", "Content-Type"}, AllowCredentials: true, // Enable cookies/auth diff --git a/frontend/.gitignore b/web/.gitignore similarity index 100% rename from frontend/.gitignore rename to web/.gitignore diff --git a/frontend/AGENTS.md b/web/AGENTS.md similarity index 100% rename from frontend/AGENTS.md rename to web/AGENTS.md diff --git a/frontend/CLAUDE.md b/web/CLAUDE.md similarity index 100% rename from frontend/CLAUDE.md rename to web/CLAUDE.md diff --git a/frontend/README.md b/web/README.md similarity index 100% rename from frontend/README.md rename to web/README.md diff --git a/frontend/app/favicon.ico b/web/app/favicon.ico similarity index 100% rename from frontend/app/favicon.ico rename to web/app/favicon.ico diff --git a/frontend/app/globals.css b/web/app/globals.css similarity index 100% rename from frontend/app/globals.css rename to web/app/globals.css diff --git a/frontend/app/layout.tsx b/web/app/layout.tsx similarity index 100% rename from frontend/app/layout.tsx rename to web/app/layout.tsx diff --git a/frontend/app/page.tsx b/web/app/page.tsx similarity index 100% rename from frontend/app/page.tsx rename to web/app/page.tsx diff --git a/frontend/docs/_index.md b/web/docs/_index.md similarity index 83% rename from frontend/docs/_index.md rename to web/docs/_index.md index 2faa02d..be94f12 100644 --- a/frontend/docs/_index.md +++ b/web/docs/_index.md @@ -1,6 +1,6 @@ -# Frontend Docs Index +# Web Docs Index -Topic-based documentation for the Next.js frontend. Each file covers one concern. +Topic-based documentation for the Next.js web app. Each file covers one concern. The `docs` agent reads this index first to locate the right file. | Topic | File | Source files covered | diff --git a/frontend/docs/components.md b/web/docs/components.md similarity index 100% rename from frontend/docs/components.md rename to web/docs/components.md diff --git a/frontend/docs/data-fetching.md b/web/docs/data-fetching.md similarity index 92% rename from frontend/docs/data-fetching.md rename to web/docs/data-fetching.md index e5b8ecb..6e164ad 100644 --- a/frontend/docs/data-fetching.md +++ b/web/docs/data-fetching.md @@ -70,4 +70,4 @@ Store in an env var for production: `process.env.NEXT_PUBLIC_API_URL` (client-ac - Use `notFound()` from `next/navigation` for 404 cases. ## Caching (Next.js 16) -Next.js 16 changes default caching behavior from v14. Check `frontend/node_modules/next/dist/docs/` for the current defaults before assuming cached or uncached behavior. +Next.js 16 changes default caching behavior from v14. Check `web/node_modules/next/dist/docs/` for the current defaults before assuming cached or uncached behavior. diff --git a/frontend/docs/routing.md b/web/docs/routing.md similarity index 100% rename from frontend/docs/routing.md rename to web/docs/routing.md diff --git a/frontend/docs/styling.md b/web/docs/styling.md similarity index 100% rename from frontend/docs/styling.md rename to web/docs/styling.md diff --git a/frontend/eslint.config.mjs b/web/eslint.config.mjs similarity index 100% rename from frontend/eslint.config.mjs rename to web/eslint.config.mjs diff --git a/frontend/next.config.ts b/web/next.config.ts similarity index 100% rename from frontend/next.config.ts rename to web/next.config.ts diff --git a/frontend/package.json b/web/package.json similarity index 95% rename from frontend/package.json rename to web/package.json index bcd94ee..e14f1dd 100644 --- a/frontend/package.json +++ b/web/package.json @@ -1,5 +1,5 @@ { - "name": "frontend", + "name": "web", "version": "0.1.0", "private": true, "scripts": { diff --git a/frontend/pnpm-lock.yaml b/web/pnpm-lock.yaml similarity index 100% rename from frontend/pnpm-lock.yaml rename to web/pnpm-lock.yaml diff --git a/frontend/pnpm-workspace.yaml b/web/pnpm-workspace.yaml similarity index 100% rename from frontend/pnpm-workspace.yaml rename to web/pnpm-workspace.yaml diff --git a/frontend/postcss.config.mjs b/web/postcss.config.mjs similarity index 100% rename from frontend/postcss.config.mjs rename to web/postcss.config.mjs diff --git a/frontend/public/file.svg b/web/public/file.svg similarity index 100% rename from frontend/public/file.svg rename to web/public/file.svg diff --git a/frontend/public/globe.svg b/web/public/globe.svg similarity index 100% rename from frontend/public/globe.svg rename to web/public/globe.svg diff --git a/frontend/public/next.svg b/web/public/next.svg similarity index 100% rename from frontend/public/next.svg rename to web/public/next.svg diff --git a/frontend/public/vercel.svg b/web/public/vercel.svg similarity index 100% rename from frontend/public/vercel.svg rename to web/public/vercel.svg diff --git a/frontend/public/window.svg b/web/public/window.svg similarity index 100% rename from frontend/public/window.svg rename to web/public/window.svg diff --git a/frontend/tsconfig.json b/web/tsconfig.json similarity index 100% rename from frontend/tsconfig.json rename to web/tsconfig.json From 61c7cc2e20d713ddb955af161d795644db0e83a7 Mon Sep 17 00:00:00 2001 From: GRACENOBLE Date: Sun, 14 Jun 2026 20:40:12 +0300 Subject: [PATCH 2/5] feat(mobile): remove idea from version control --- mobile/.idea/.gitignore | 3 --- mobile/.idea/.name | 1 - mobile/.idea/AndroidProjectSystem.xml | 6 ------ mobile/.idea/gradle.xml | 11 ----------- mobile/.idea/misc.xml | 10 ---------- mobile/.idea/runConfigurations.xml | 17 ----------------- mobile/.idea/vcs.xml | 6 ------ 7 files changed, 54 deletions(-) delete mode 100644 mobile/.idea/.gitignore delete mode 100644 mobile/.idea/.name delete mode 100644 mobile/.idea/AndroidProjectSystem.xml delete mode 100644 mobile/.idea/gradle.xml delete mode 100644 mobile/.idea/misc.xml delete mode 100644 mobile/.idea/runConfigurations.xml delete mode 100644 mobile/.idea/vcs.xml diff --git a/mobile/.idea/.gitignore b/mobile/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/mobile/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/mobile/.idea/.name b/mobile/.idea/.name deleted file mode 100644 index 8f91b47..0000000 --- a/mobile/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -template \ No newline at end of file diff --git a/mobile/.idea/AndroidProjectSystem.xml b/mobile/.idea/AndroidProjectSystem.xml deleted file mode 100644 index 4a53bee..0000000 --- a/mobile/.idea/AndroidProjectSystem.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/mobile/.idea/gradle.xml b/mobile/.idea/gradle.xml deleted file mode 100644 index 7505d8d..0000000 --- a/mobile/.idea/gradle.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/mobile/.idea/misc.xml b/mobile/.idea/misc.xml deleted file mode 100644 index c2b3ddc..0000000 --- a/mobile/.idea/misc.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/mobile/.idea/runConfigurations.xml b/mobile/.idea/runConfigurations.xml deleted file mode 100644 index 16660f1..0000000 --- a/mobile/.idea/runConfigurations.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/mobile/.idea/vcs.xml b/mobile/.idea/vcs.xml deleted file mode 100644 index 6c0b863..0000000 --- a/mobile/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From e67962cc492ab47e2f318ccb6637ac3e900cf51d Mon Sep 17 00:00:00 2001 From: GRACENOBLE Date: Sun, 14 Jun 2026 20:41:14 +0300 Subject: [PATCH 3/5] feat(mobile): remove idea from version control --- mobile/.gitignore | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mobile/.gitignore b/mobile/.gitignore index aa724b7..10cfdbf 100644 --- a/mobile/.gitignore +++ b/mobile/.gitignore @@ -1,12 +1,7 @@ *.iml .gradle /local.properties -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml +/.idea .DS_Store /build /captures From 1f162a3ee18dbc1b7d6aa584e8cc7c198b0f7c51 Mon Sep 17 00:00:00 2001 From: GRACENOBLE Date: Sun, 14 Jun 2026 21:56:39 +0300 Subject: [PATCH 4/5] fix: correct CORS origin port and stale comment - CORS AllowOrigins: 5173 -> 3000 to match the web app dev server - CONTRIBUTING.md: Frontend (hot reload) -> Web (hot reload) --- CONTRIBUTING.md | 2 +- backend/internal/server/routes.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eb7e602..d615e26 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -93,7 +93,7 @@ cd backend && make docker-run # Backend (hot reload) cd backend && make watch -# Frontend (hot reload) +# Web (hot reload) cd web && pnpm dev # Mobile — open mobile/ in Android Studio, or build via Gradle diff --git a/backend/internal/server/routes.go b/backend/internal/server/routes.go index be91298..e33ae1b 100644 --- a/backend/internal/server/routes.go +++ b/backend/internal/server/routes.go @@ -11,7 +11,7 @@ func (s *Server) RegisterRoutes() http.Handler { r := gin.Default() r.Use(cors.New(cors.Config{ - AllowOrigins: []string{"http://localhost:5173"}, // Add your web app URL + AllowOrigins: []string{"http://localhost:3000"}, // Add your web app URL AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"}, AllowHeaders: []string{"Accept", "Authorization", "Content-Type"}, AllowCredentials: true, // Enable cookies/auth From 51ae64e7e4230b8ada42af9c4763c8057d76d691 Mon Sep 17 00:00:00 2001 From: GRACENOBLE Date: Sun, 14 Jun 2026 21:57:09 +0300 Subject: [PATCH 5/5] fix: update labeler.yml paths from frontend/ to web/ Label name "frontend" -> "web", and all glob paths updated to match the renamed directory. --- .github/labeler.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 277270e..97d6cae 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -6,9 +6,9 @@ backend: - changed-files: - any-glob-to-any-file: ["backend/**"] -frontend: +web: - changed-files: - - any-glob-to-any-file: ["frontend/**"] + - any-glob-to-any-file: ["web/**"] mobile: - changed-files: @@ -19,7 +19,7 @@ documentation: - any-glob-to-any-file: - "**/*.md" - "backend/docs/**" - - "frontend/docs/**" + - "web/docs/**" - "mobile/docs/**" ci: @@ -31,8 +31,8 @@ dependencies: - any-glob-to-any-file: - "backend/go.mod" - "backend/go.sum" - - "frontend/package.json" - - "frontend/pnpm-lock.yaml" + - "web/package.json" + - "web/pnpm-lock.yaml" - "mobile/gradle/libs.versions.toml" - "mobile/build.gradle.kts" - "mobile/app/build.gradle.kts"