Production-ready Next.js boilerplate with: - Runtime env validation (fail-fast on missing vars) - Feature-gated config (S3, Stripe, email, OAuth) - Docker + Coolify deployment pipeline - PostgreSQL + pgvector, MinIO S3, Better Auth - TypeScript strict mode (no ignoreBuildErrors) - i18n (en/es), AI modules, billing, monitoring Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.0 KiB
3.0 KiB
title, description, url
| title | description | url |
|---|---|---|
| Project structure | Learn about the project structure and how to navigate it. | /docs/web/installation/structure |
Project structure
The main directories in the project are:
apps- the location of the main appspackages- the location of the shared code and the API
apps Directory
This is where the apps live. It includes web app (Next.js), mobile app (React Native - Expo), and the browser extension (WXT - Vite + React). Each app has its own directory.
packages Directory
This is where the shared code and the API for packages live. It includes the following:
- shared libraries (database, mailers, cms, billing, etc.)
- shared features (auth, mails, billing, ai etc.)
- UI components (buttons, forms, modals, etc.)
All apps can use and reuse the API exported from the packages directory. This makes it easy to have one, or many apps in the same codebase, sharing the same code.
Repository structure
By default the monorepo contains the following apps and packages:
<Folder name="mobile - Mobile app (React Native - Expo)" />
<Folder name="extension - Browser extension (WXT - Vite + React)" />
<Folder name="api - API server (including all features logic)" />
<Folder name="auth - Authentication setup" />
<Folder name="billing - Billing config and providers" />
<Folder name="cms - CMS setup and providers" />
<Folder name="db - Database setup" />
<Folder name="email - Mail templates and providers" />
<Folder name="i18n - Internationalization setup" />
<Folder name="shared - Shared utilities and helpers" />
<Folder name="storage - Storage setup" />
<Folder name="ui - Atomic UI components">
<Folder name="shared" />
<Folder name="web" />
<Folder name="mobile" />
</Folder>
<Folder name="github - Github actions" />
<Folder name="prettier - Prettier config" />
<Folder name="typescript - TypeScript config" />
Web application structure
The web application is located in the apps/web folder. It contains the following folders:
<Folder name="assets - Optimized static assets" />
<Folder name="config - Global app config" />
<Folder name="modules - Application modules" />
<Folder name="lib - Communication with third-party packages" />
<Folder name="utils - Shared utilities" />