Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .claude/agents/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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
Expand All @@ -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?
Expand All @@ -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/<topic>.md`, `frontend/docs/<topic>.md`, or `mobile/docs/<topic>.md`.
1. Create `backend/docs/<topic>.md`, `web/docs/<topic>.md`, or `mobile/docs/<topic>.md`.
2. Populate from the actual source code — never invent or assume patterns.
3. Add the entry to `_index.md`.

Expand Down
4 changes: 2 additions & 2 deletions .claude/agents/reviewer.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
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
- Glob
- 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.
Expand Down
22 changes: 11 additions & 11 deletions .claude/agents/frontend.md → .claude/agents/web.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,22 +10,22 @@ 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
- Tailwind CSS v4 — uses `@import "tailwindcss"` syntax, no `tailwind.config.js` needed
- 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.
Expand All @@ -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.
8 changes: 4 additions & 4 deletions .claude/commands/check.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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
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
Expand Down
4 changes: 2 additions & 2 deletions .claude/commands/implement.md
Original file line number Diff line number Diff line change
@@ -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

---
Expand Down Expand Up @@ -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.

Expand Down
10 changes: 5 additions & 5 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -19,7 +19,7 @@ documentation:
- any-glob-to-any-file:
- "**/*.md"
- "backend/docs/**"
- "frontend/docs/**"
- "web/docs/**"
- "mobile/docs/**"

ci:
Expand All @@ -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"
16 changes: 8 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
14 changes: 7 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
26 changes: 13 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -93,16 +93,16 @@ cd backend && make docker-run
# Backend (hot reload)
cd backend && make watch

# Frontend (hot reload)
cd frontend && pnpm dev
# Web (hot reload)
cd web && pnpm dev

# Mobile — open mobile/ in Android Studio, or build via Gradle
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

Expand All @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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
```
Loading
Loading