Project Structure

The codebase follows Remix conventions with additional structure for maintainability and correctness.

Root directories

DirectoryPurpose
app/Remix application code
prisma/Database schema and migrations
tests/E2E tests with Playwright
server/Express server configuration
other/Docker, CI/CD, and infrastructure

App directory structure

DirectoryPurpose
app/routes/File-based routing
app/ui/Components, patterns, and design system
app/utils/Shared utilities and helpers
app/hooks/React hooks
app/styles/Global CSS and Tailwind configuration

Server-only files

Files with .server.ts suffix are never bundled for the client. Critical server-only modules:

  • db.server.ts — Prisma client instance
  • session.server.ts — Session management
  • env.server.ts — Environment variable validation
  • auth.server.ts — Authentication logic

Route organization

Routes use Remix v2 flat file convention with pathless layout routes:

  • _marketing+/ — Public marketing pages
  • _auth+/ — Authentication flows
  • settings+/ — User settings (protected)
  • admin+/ — Admin pages (role-protected)
  • resources+/ — Resource routes (no UI)