DocsArchitectureDirectory Structure

Directory Structure

Nuxt 4 project layout for Reqcore with app, server, content, and shared directories explained.

Directory Structure

Reqcore follows the Nuxt 4 directory convention with all application source code in app/ and server code at the project root.

Full Layout

reqcore/
├── app/                          # Client source (Nuxt 4 srcDir)
│   ├── app.vue                   # Root component
│   ├── assets/
│   │   └── css/main.css          # Tailwind CSS entry + @theme tokens
│   ├── components/               # Auto-imported Vue components
│   ├── composables/              # Auto-imported composables (useXxx)
│   ├── layouts/                  # Layout components
│   │   ├── dashboard.vue         # Sidebar + main content
│   │   ├── auth.vue              # Centered card for auth pages
│   │   └── public.vue            # Simple header/footer for public pages
│   ├── middleware/                # Client-side route middleware
│   ├── pages/                    # File-based routing
│   │   ├── index.vue             # Landing page (dark theme)
│   │   ├── roadmap.vue           # Public roadmap
│   │   ├── blog/                 # Blog listing + detail
│   │   ├── docs/                 # Documentation listing + detail
│   │   ├── catalog/              # Feature catalog
│   │   ├── jobs/                 # Public job board
│   │   ├── auth/                 # Sign-in / sign-up
│   │   ├── dashboard/            # Authenticated dashboard
│   │   └── onboarding/           # Org creation flow
│   ├── plugins/                  # Client-side Nuxt plugins
│   └── utils/                    # Auto-imported utilities
│       └── auth-client.ts        # Better Auth Vue client
├── server/                       # Nitro server (at project root)
│   ├── api/                      # API route handlers
│   │   ├── auth/[...all].ts      # Better Auth catch-all
│   │   ├── jobs/                 # Job CRUD + questions
│   │   ├── candidates/           # Candidate CRUD + documents
│   │   ├── applications/         # Application CRUD
│   │   ├── documents/            # Document access endpoints
│   │   ├── dashboard/            # Dashboard stats
│   │   └── public/jobs/          # Unauthenticated job board API
│   ├── database/
│   │   ├── schema/               # Drizzle ORM table definitions
│   │   │   ├── app.ts            # Domain tables (job, candidate, etc.)
│   │   │   ├── auth.ts           # Better Auth tables (DO NOT MODIFY)
│   │   │   └── index.ts          # Re-exports
│   │   └── migrations/           # Generated SQL migrations
│   ├── middleware/                # Global server middleware
│   ├── plugins/
│   │   ├── migrations.ts         # Auto-apply migrations on startup
│   │   └── s3-bucket.ts          # Ensure S3 bucket exists + enforce private policy
│   └── utils/                    # Auto-imported server utilities
│       ├── auth.ts               # Better Auth instance
│       ├── db.ts                 # Drizzle client + connection pool
│       ├── env.ts                # Zod-validated environment variables
│       ├── requireAuth.ts        # Auth guard (throws 401/403)
│       ├── s3.ts                 # S3/MinIO client, upload, delete
│       ├── slugify.ts            # URL slug generation
│       ├── rateLimit.ts          # IP-based sliding window rate limiter
│       └── schemas/              # Zod validation schemas
├── content/                      # @nuxt/content v3 collections
│   ├── blog/                     # Blog articles (Markdown)
│   ├── catalog/                  # Feature catalog items
│   └── docs/                     # Documentation pages
├── shared/                       # Shared between app and server
├── public/                       # Static assets (favicon, images)
├── i18n/                         # Internationalization
│   └── locales/                  # Translation JSON files
├── e2e/                          # Playwright end-to-end tests
├── nuxt.config.ts                # Nuxt configuration
├── content.config.ts             # Content collection definitions
├── drizzle.config.ts             # Drizzle Kit configuration
├── docker-compose.yml            # PostgreSQL + MinIO + Adminer
└── package.json

Key Conventions

The ~ Alias

In Nuxt 4, ~ resolves to the app/ directory:

  • ~/componentsapp/components/
  • ~/composablesapp/composables/
  • ~/assetsapp/assets/

Auto-Imports

Nuxt auto-imports files from these directories:

DirectoryContextImport Pattern
app/components/ClientComponents used in templates
app/composables/ClientuseXxx() functions
app/utils/ClientUtility functions
server/utils/ServerServer-side utilities
shared/BothShared types and functions

Root-Level Directories

These directories stay at the project root — not inside app/:

  • server/ — All Nitro server code
  • content/ — Markdown content for @nuxt/content
  • public/ — Static files served at /
  • shared/ — Code shared between app and server
  • i18n/ — Translation files

Next Steps