This is a Bun-managed Next.js App Router project. Route groups, pages, layouts, and API handlers live in app/; shared UI is in components/, with domain folders such as components/drop, components/alias, components/admin, and components/ui. Server actions are in actions/, business logic and integrations are in lib/, and app configuration lives in config/. Prisma schema and migrations are in prisma/. MDX docs and blog content are under content/, public assets under public/, and tests under tests/.
Use Bun for dependencies and scripts.
bun installinstalls dependencies frombun.lock.bun devstarts the local Next.js dev server athttp://localhost:3000.bun run buildrunsprisma generateand creates a production build.bun run startserves the production build.bun run lintruns ESLint across the repository.bun run typecheckgenerates route/Prisma types and runs strict TypeScript checks.bun run deadcodechecks for unused files, dependencies, and exports with Knip.bun run testruns the Vitest suite once.bun run checkruns every local quality gate, including a production build.bunx prisma generaterefreshes Prisma client code;bunx prisma db pushsyncs the local schema.
Write TypeScript with strict types; avoid any. Use the @/ path alias for repository-root imports when useful. Component exports use PascalCase; filenames generally follow nearby kebab-case patterns such as login-form.tsx or drop-list.tsx. Keep server-only logic in lib/, route handlers in app/api, and client components/actions separated by existing Next.js conventions. ESLint is the source of truth for formatting and correctness.
Vitest runs in jsdom with setup from vitest.setup.ts. Name tests *.test.ts or *.test.tsx and place broad tests in tests/; colocated route tests are also used for API handlers. Add focused coverage for changed behavior, especially authentication, billing, vault, crypto, storage, rate limiting, and API validation paths. Run bun run check before submitting changes.
Recent commits use concise, imperative summaries with a capitalized verb, such as Fix 2FA bug... or Make random aliases.... Keep commits scoped and mention user-visible behavior when relevant. Pull requests should target main, describe the change, list tests run, link issues, and include screenshots for UI changes. If the database changes, include the Prisma migration and call it out.
Copy .env.example to .env for local setup, but never commit secrets. Local development requires PostgreSQL and Redis, and Drop storage depends on Cloudflare R2 configuration. Treat encryption, vault, auth, and abuse-reporting changes as security-sensitive; prefer small patches with explicit tests.
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ (resolved from this file's directory; in monorepos the next package may not be visible from the repo root) before writing any code. Heed deprecation notices.
This block is written and re-added by next dev — verify at node_modules/next/dist/server/lib/generate-agent-files.js. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.