Imported from Shafnaa/portfolio-monorepo (
AGENTS.md). Install upstream withnpx skills add Shafnaa/portfolio-monorepo. Copyright stays with the author.
AGENTS.md
Repo Layout
- Two-area monorepo:
frontend/(React + TanStack Router + Vite) andbackend/(FastAPI + LangGraph). Keep changes in the relevant area only. - Root
package.jsondefines workspaces but has no scripts; all commands run insidefrontend/orbackend/. - Root
bun.lockis the shared lockfile. Usebunas the package manager.
Setup & Environment
- Install:
bun installfrom the repo root (or inside each workspace). - OpenCode requires
.env.localat the repo root..opencode/run.shsources it before launchingopencode .; if you launch OpenCode directly and env vars are missing, runsource .env.localfirst. - Never read or commit
.env.local; secrets live there..env.examplefiles document required variables.
Frontend (frontend/)
- React 19 + TanStack Router (file-based) + Vite 8 + Tailwind 4.
- Entry points:
src/main.tsx,src/router.tsx,src/routeTree.gen.ts. - Generated file:
src/routeTree.gen.tsis auto-generated by TanStack Router — do not edit. Regenerate withbun run generate-routes(script inpackage.json). tsr.config.jsonandvite.config.tsconfigure the router;components.jsonconfigures shadcn/Tailwind.- Scripts:
dev(Vite on port 3000),build,generate-routes,preview. README.mdis a generated TanStack Start template — treat as background only, not a source of truth.
Backend (backend/)
- Python 3.12, FastAPI, LangGraph/LangChain, PostgreSQL/pgvector.
- Entry point:
app/main.py(FastAPI app,/healthendpoint). dev.shbuilds the frontend first, then starts uvicorn with reload on port 8080.pyproject.tomlandrequirements.txtpin dependencies; keep them in sync.vercel.jsonconfigures serverless function limits for deployment.app/agent.pycontains the LangGraph agent logic; changes here affect the LLM flow.
OpenCode Project Management
- Use
.opencode/agents/project-manager.mdfor issue creation: Epic -> Story -> Task hierarchy, no implementation detail in Stories, no Tasks until Stories are reviewed. - Use
.opencode/skills/issue-management/for issue templates and metadata rules. - GitHub issues are authoritative; the local
.issues/folder is a mirror refreshed withgh-issue-sync pull. Never hand-edit.issues/files. - Use
.opencode/skills/branching-strategy/for branch names and merge order (task -> story -> epic -> main). - Resolve
owner/repofromgit remote get-url originbefore every GitHub MCP call — never hardcode the repo name.
GitHub MCP
.opencode/opencode.jsonconfigures the GitHub MCP server using a PAT from.env.local.
Verification & Workflow
- No CI, lint, or typecheck scripts are configured; verification is manual via dev/build commands.
- Frontend:
bun run buildfromfrontend/. Backend:uvicorn app.main:app --reloadfrombackend/. - Before editing generated files, check the relevant config (
vite.config.ts,tsr.config.json,components.json). - Keep changes scoped: frontend changes stay in
frontend/, backend changes stay inbackend/.