Mainly used for logging in and managing Codebuff API quotas.
- 🚀 Next.js 14 (App router)
- ⚛️ React 18
- 📘 Typescript
- 🎨 TailwindCSS - Class sorting, merging and linting
- 🛠️ Shadcn/ui - Customizable UI components
- 💵 Stripe - Payment handler
- 🔒 Next-auth - Easy authentication library for Next.js (GitHub provider)
- 🛡️ Drizzle - ORM for node.js
- 📋 React-hook-form - Manage your forms easy and efficient
- 🔍 Zod - Schema validation library
- 🧪 Jest & React Testing Library - Configured for unit testing
- 🎭 Playwright - Configured for e2e testing
- 📈 Absolute Import & Path Alias - Import components using
@/prefix - 💅 Prettier - Code formatter
- 🧹 Eslint - Code linting tool
- 🐶 Husky & Lint Staged - Run scripts on your staged files before they are committed
- 🔹 Icons - From Lucide
- 🌑 Dark mode - With next-themes
- 📝 Commitlint - Lint your git commits
- 🤖 Github actions - Lint your code on PR
- ⚙️ T3-env - Manage your environment variables
- 🗺️ Sitemap & robots.txt
- 💯 Perfect Lighthouse score
- Copy
.env.exampleto.envand fill in the values.cp .env.example .env - Run
bun installto install dependencies - Run
bun run db:generateto create migration files (if they differ from schema) - Run
bun run db:migrateto apply migrations - Run
bun run devto start the server
.
├── .github # GitHub folder
├── .husky # Husky configuration
├── db # Database schema and migrations
├── public # Public assets folder
└── src
├── __tests__ # Unit and e2e tests
├── actions # Server actions
├── app # Next JS App (App Router)
├── components # React components
├── hooks # Custom hooks
├── lib # Functions and utilities
├── styles # Styles folder
├── types # Type definitions
└── env.mjs # Env variables config fileThe following scripts are available in the package.json:
dev: Run development serverdb:generate: Generate database migration filesdb:migrate: Apply database migrationsbuild: Build the appstart: Run production serverpreview: Runbuildandstartcommands togetherlint: Lint the code using Eslintlint:fix: Fix linting errorsformat:check: Checks the code for proper formattingformat:write: Fix formatting issuestypecheck: Type-check TypeScript without emitting filestest: Run unit teststest:watch: Run unit tests in watch modee2e: Run end-to-end testse2e:ui: Run end-to-end tests with UIprepare: Install Husky for managing Git hooks
- Store SSR:
src/app/store/page.tsxrenders agents server-side using cached data (ISRrevalidate=600). - Client fallback:
src/app/store/store-client.tsxonly fetches/api/agentsif SSR data is empty. - Dynamic metadata:
- Store:
src/app/store/page.tsx - Publisher:
src/app/publishers/[id]/page.tsx - Agent detail:
src/app/publishers/[id]/agents/[agentId]/[version]/page.tsx
- Store:
The agents cache is automatically warmed to ensure SEO data is available immediately:
- Build-time validation:
scripts/prebuild-agents-cache.tsruns afternext buildto validate the database connection and data pipeline - Health check warming (Primary):
/api/healthzendpoint warms the cache when Render performs health checks before routing traffic
On Render, set the Health Check Path to /api/healthz in your service settings to ensure the cache is warm before traffic is routed to the app.
- Hydration fallback:
src/__tests__/e2e/store-hydration.spec.ts- Tests client-side data fetching when SSR data is empty - SSR HTML:
src/__tests__/e2e/store-ssr.spec.ts- Tests server-side rendering with JavaScript disabled
Both tests use Playwright's page.route() to mock API responses without polluting production code.
Run locally:
cd web
bun run e2e
The e2e runner starts a dedicated Postgres container on port 5433, migrates, and
seeds minimal data for SSR. Override the connection with E2E_DATABASE_URL if
needed.