# Root level commands
bun run dev # Start all dev servers
bun run build # Build all packages and apps
bun run lint # Run linting across all packages
bun run typecheck # Run TypeScript checks across all packages
# Individual app/package commands
bun run dev:web # Start only web app (Next.js)
bun run dev:api # Start only API app
bun run dev:cli # Start only CLI app
# Package-specific commands (run from package directory)
cd packages/db && bun run db:generate # Generate Prisma client
cd packages/db && bun run db:migrate # Deploy Prisma migrationsNote: This project uses Bun as the package manager (bun@1.2.21).
Uses bun test (Bun's built-in test runner). Test files use *.test.ts convention.
# Run all tests
bun test
# Run a single test file
bun test path/to/file.test.ts
# Run tests in watch mode
bun test --watch- Use absolute imports with path aliases:
@/components/ui/buttonfor web app - Use workspace imports for cross-package dependencies:
@super/db,@super/auth - Import order: React/Next → External libs → Internal aliases → Relative imports
- Group imports by category with blank lines between groups
- No semicolons at end of statements
- Use double quotes for strings
- 2-space indentation
- Trailing commas in multi-line objects/arrays
- No explicit return type on function components (inferred)
- Components: PascalCase (e.g.,
Button.tsx,HeroSection.tsx) - Files: kebab-case for non-component files (e.g.,
utils.ts,query-provider.tsx) - Functions: camelCase (e.g.,
signIn,getSession) - Types/Interfaces: PascalCase (e.g.,
VariantProps) - Constants: UPPER_SNAKE_CASE for true constants
- Strict mode enabled (
strict: truein tsconfig) - Use
typefor type aliases when possible - Export types explicitly when needed for consumers
- Use
interfacefor object shapes that may be extended - Prefer explicit return types on library functions
- Use try-catch for async operations
- Validate with Zod for form/API inputs
- Return early pattern for guard clauses
- Use
!operator sparingly; prefer proper null checks
- Server Components by default (Next.js App Router)
- 'use client' directive only when needed (hooks, browser APIs)
- Composition pattern for component variants (see
buttonVariantspattern) forwardRefpattern for component ref forwarding- Destructure props in function parameters
- Use
cn()utility from@/lib/utilsfor conditional classes - Prefer semantic CSS variables over hardcoded values
- Use
data-slotattributes for component identification - Follow CVA (class-variance-authority) pattern for variants
- Schema location:
packages/db/prisma/schema.prisma - Always regenerate client after schema changes:
bun run db:generate - Use
@map()for custom table names in snake_case - Add indexes for frequently queried foreign keys
apps/
web/ # Next.js 16 web app (main)
api/ # API app (scaffolded)
supercode-cli/ # CLI app (scaffolded)
packages/
db/ # Prisma database client
auth/ # Better-Auth authentication
secrets/ # Infisical secrets wrapper (@super/secrets)
ui/ # Shared UI components (empty)
sdk/ # SDK package (empty)
config/ # Shared config (empty)
dashboard/ # Dashboard components
- Web app:
apps/web/.envorapps/.env.local - Required for auth:
GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET,NEXT_PUBLIC_BETTER_AUTH_URL - Required for DB:
DATABASE_URL - Voice/STT:
ELEVENLABS_API_KEY(default provider),STT_PROVIDER(elevenlabs|groq),ELEVENLABS_MODEL,STT_LANGUAGE - Secrets:
INFISICAL_CLIENT_ID,INFISICAL_CLIENT_SECRET(when Infisical is configured)
- ESLint configured for web app only (
apps/web/eslint.config.mjs) - Uses
eslint-config-next/core-web-vitalsandeslint-config-next/typescript - Run:
bun run lint(from root) orbun run lint(from web directory)
- Branch naming:
supercli-#<issue-number> - No pre-commit hooks configured yet
- Framework: Next.js 16, React 19, TypeScript 5
- Auth: Better-Auth with Prisma adapter
- DB: PostgreSQL with Prisma ORM
- UI: Radix UI primitives + Tailwind CSS v4
- State: TanStack Query (React Query)
- Forms: React Hook Form + Zod
- Always run
bun run db:generateafter modifyingschema.prisma - Use
workspace:*for internal package dependencies - Keep components in
components/folder, organized by feature - Use barrel exports (
index.ts) for clean package APIs - Prefer Server Components; mark 'use client' only when necessary
- Follow existing patterns in
apps/web/components/ui/for new UI components