# Epic Stack: architecture diagram of epicweb-dev/epic-stack

> The Epic Stack, Kent C. Dodds' opinionated full-stack starter for React Router (Remix): a notes app with real sign-up, login, passkeys, two-factor and GitHub login, a Prisma database on SQLite with LiteFS, email through Resend and error tracking with Sentry.

- Repository: https://github.com/epicweb-dev/epic-stack/tree/64ca647630e15f71e6782b622ab0112c4b428f1f
- Commit: 64ca647630e15f71e6782b622ab0112c4b428f1f
- Interactive map: https://repoladder.com/epicweb-dev/epic-stack/64ca647630e15f71e6782b622ab0112c4b428f1f
- Built: 2026-11-05 with RepoLadder 0\.0.0+core.6dd7643f72a5131154161002db629f0b09925488

## Components

### App shell & pages

How a request becomes a page: the entry points and root layout, the marketing pages, and small resource routes like images and the health check.

web. 17 files, 995 lines.

- **Entry & root layout**: The client and server entry points, the route table, and the root layout every page renders inside. (5 files)
  - Files: `app/entry.client.tsx`, `app/entry.server.tsx`, `app/root.tsx`, `app/routes.ts`, `app/routes/$.tsx`
- **Marketing pages**: The landing, about, privacy, support and terms pages, with the sitemap and robots.txt. (8 files)
  - Files: `app/routes/_marketing/+logos/logos.ts`, `app/routes/_marketing/about.tsx`, `app/routes/_marketing/index.tsx`, `app/routes/_marketing/privacy.tsx`, `app/routes/_marketing/support.tsx`, `app/routes/_marketing/tos.tsx`, `app/routes/_seo/robots[.]txt.ts`, `app/routes/_seo/sitemap[.]xml.ts`
- **Resource routes**: Routes that return data instead of pages: images, the theme switch, data export, the health check, and /me. (4 files)
  - Files: `app/routes/me.tsx`, `app/routes/resources/healthcheck.tsx`, `app/routes/resources/images.tsx`, `app/routes/resources/theme-switch.tsx`

### Accounts

Getting in and looking after your account: sign-up, login, passkeys and GitHub login, then profile, password and two-factor settings.

web. 37 files, 4565 lines.

- **Sign-up & login**: Everything about getting in: sign-up with email verification, login and logout, password reset, onboarding, GitHub login and passkeys. (23 files)
  - **Login & sign-up**: The login, sign-up and logout routes, and the server code that starts a session. (4 files)
    - Files: `app/routes/_auth/login.server.ts`, `app/routes/_auth/login.tsx`, `app/routes/_auth/logout.tsx`, `app/routes/_auth/signup.tsx`
  - **Verify & reset**: One-time codes by email: verifying a sign-up, resetting a password. (5 files)
    - Files: `app/routes/_auth/forgot-password.tsx`, `app/routes/_auth/reset-password.server.ts`, `app/routes/_auth/reset-password.tsx`, `app/routes/_auth/verify.server.ts`, `app/routes/_auth/verify.tsx`
  - **Onboarding**: Finishes a new account after the email is verified, or after a first GitHub login. (4 files)
    - Files: `app/routes/_auth/onboarding/$provider.server.ts`, `app/routes/_auth/onboarding/$provider.tsx`, `app/routes/_auth/onboarding/index.server.ts`, `app/routes/_auth/onboarding/index.tsx`
  - **GitHub login**: Log in with GitHub: the redirect, the callback, and the provider connections. (7 files)
    - Files: `app/routes/_auth/auth.$provider/callback.ts`, `app/routes/_auth/auth.$provider/index.ts`, `app/utils/connections.server.ts`, `app/utils/connections.tsx`, `app/utils/providers/constants.ts`, `app/utils/providers/github.server.ts`, `app/utils/providers/provider.ts`
  - **Passkeys**: Registering and signing in with a passkey (WebAuthn). (3 files)
    - Files: `app/routes/_auth/webauthn/authentication.ts`, `app/routes/_auth/webauthn/registration.ts`, `app/routes/_auth/webauthn/utils.server.ts`
- **Profile & settings**: The signed-in user's settings: name, photo and email, password, passkeys, connected accounts and two-factor. (14 files)
  - **Profile**: The settings page, profile photo and changing your email. (6 files)
    - Files: `app/routes/resources/download-user-data.tsx`, `app/routes/settings/profile/_layout.tsx`, `app/routes/settings/profile/change-email.server.tsx`, `app/routes/settings/profile/change-email.tsx`, `app/routes/settings/profile/index.tsx`, `app/routes/settings/profile/photo.tsx`
  - **Password & passkeys**: Changing or creating a password, managing passkeys and connected accounts. (4 files)
    - Files: `app/routes/settings/profile/connections.tsx`, `app/routes/settings/profile/passkeys.tsx`, `app/routes/settings/profile/password.tsx`, `app/routes/settings/profile/password_.create.tsx`
  - **Two-factor**: Turning two-factor authentication on, verifying it, and turning it off. (4 files)
    - Files: `app/routes/settings/profile/two-factor/_layout.tsx`, `app/routes/settings/profile/two-factor/disable.tsx`, `app/routes/settings/profile/two-factor/index.tsx`, `app/routes/settings/profile/two-factor/verify.tsx`

### Users & notes

The example feature: a directory of users, and each user's notes with images, which they can create, edit and delete.

web. 9 files, 994 lines.

- **Users & note lists**: The user search page, a user's profile, and their list of notes. (4 files)
  - Files: `app/routes/users/$username/index.tsx`, `app/routes/users/$username/notes/_layout.tsx`, `app/routes/users/$username/notes/index.tsx`, `app/routes/users/index.tsx`
- **Note editor**: Viewing, creating and editing a note, with the shared editor form and its server action. (5 files)
  - Files: `app/routes/users/$username/notes/$noteId.tsx`, `app/routes/users/$username/notes/$noteId_.edit.tsx`, `app/routes/users/$username/notes/+shared/note-editor.server.tsx`, `app/routes/users/$username/notes/+shared/note-editor.tsx`, `app/routes/users/$username/notes/new.tsx`

### Server & data

The Express server under the app, sessions and permissions, the database and its cache, file storage, and email.

web. 27 files, 2182 lines.

- **Express server**: Starts the Node server that serves the app, with Sentry monitoring. (4 files)
  - Files: `index.ts`, `server/app.ts`, `server/index.ts`, `server/utils/monitoring.ts`
- **Sessions & permissions**: Who is signed in: sessions, one-time codes, TOTP, permissions, and the honeypot against bots. (7 files)
  - **Sessions**: Login sessions and the redirect cookie. (3 files)
    - Files: `app/utils/auth.server.ts`, `app/utils/redirect-cookie.server.ts`, `app/utils/session.server.ts`
  - **Codes & guards**: Verification codes, TOTP, permissions and the honeypot. (4 files)
    - Files: `app/utils/honeypot.server.ts`, `app/utils/permissions.server.ts`, `app/utils/totp.server.ts`, `app/utils/verification.server.ts`
- **Database & storage**: The Prisma client, LiteFS replication, uploaded files in object storage, and the seed script. (4 files)
  - Files: `app/utils/db.server.ts`, `app/utils/litefs.server.ts`, `app/utils/storage.server.ts`, `prisma/seed.ts`
- **Cache & admin**: The cache (in memory and in SQLite) and the admin pages to inspect it. (6 files)
  - Files: `app/routes/admin/cache/index.tsx`, `app/routes/admin/cache/lru.$cacheKey.ts`, `app/routes/admin/cache/sqlite.$cacheKey.ts`, `app/routes/admin/cache/sqlite.server.ts`, `app/routes/admin/cache/sqlite.tsx`, `app/utils/cache.server.ts`
- **Email, toasts & headers**: Sending email with Resend, flash toasts, environment checks, headers, timing and theme cookies. (6 files)
  - Files: `app/utils/email.server.ts`, `app/utils/env.server.ts`, `app/utils/headers.server.ts`, `app/utils/theme.server.ts`, `app/utils/timing.server.ts`, `app/utils/toast.server.ts`

### UI kit & helpers

The shared components every page is built from, client-side helpers, and the template's setup script.

web. 30 files, 2062 lines.

- **Form fields**: Inputs, OTP input, labels, text areas, checkboxes. (5 files)
  - Files: `app/components/ui/checkbox.tsx`, `app/components/ui/input-otp.tsx`, `app/components/ui/input.tsx`, `app/components/ui/label.tsx`, `app/components/ui/textarea.tsx`
- **Buttons & icons**: Buttons, status buttons, icons and tooltips. (4 files)
  - Files: `app/components/ui/button.tsx`, `app/components/ui/icon.tsx`, `app/components/ui/status-button.tsx`, `app/components/ui/tooltip.tsx`
- **Forms & errors**: Form fields with errors, and the error boundary. (4 files)
  - Files: `app/components/error-boundary.tsx`, `app/components/floating-toolbar.tsx`, `app/components/forms.tsx`, `app/components/spacer.tsx`
- **Page chrome**: Search bar, the user menu and its dropdown, progress bar and toasts. (6 files)
  - Files: `app/components/progress-bar.tsx`, `app/components/search-bar.tsx`, `app/components/toaster.tsx`, `app/components/ui/dropdown-menu.tsx`, `app/components/ui/sonner.tsx`, `app/components/user-dropdown.tsx`
- **Client helpers**: Client hints, request info, user helpers and validation. (6 files)
  - Files: `app/utils/client-hints.tsx`, `app/utils/misc.tsx`, `app/utils/nonce-provider.ts`, `app/utils/request-info.ts`, `app/utils/user-validation.ts`, `app/utils/user.ts`
- **Monitoring & setup**: Client Sentry, its filters, the icon script and template setup. (5 files)
  - Files: `app/utils/monitoring.client.tsx`, `app/utils/sentry-event-filters.ts`, `other/sly/transform-icon.ts`, `remix.init/index.js`, `remix.init/index.mjs`

## Connections

### Top rung

- Accounts → Database (Prisma): 55 uses (34 reads, 21 writes)
- Server & data → Database (Prisma): 21 uses (4 reads, 15 writes)
- Users & notes → Database (Prisma): 9 uses (6 reads, 2 writes)
- UI kit & helpers → App shell & pages: 2 imports, 2 calls
- Accounts → Resend: 3 uses
- Server & data → Accounts: 3 imports
- Server & data → Sentry: 3 uses
- App shell & pages → Database (Prisma): 2 uses (2 reads)
- UI kit & helpers → Sentry: 2 uses
- Users & notes → Accounts: 1 calls
- Server & data → Resend: 1 uses
- App shell & pages → Sentry: 1 uses
- UI kit & helpers → Accounts: 1 calls
- Accounts → Server & data: 94 imports (minor)
- Accounts → UI kit & helpers: 93 imports (minor)
- Users & notes → UI kit & helpers: 32 imports (minor)
- App shell & pages → UI kit & helpers: 25 imports (minor)
- App shell & pages → Server & data: 16 imports (minor)
- Users & notes → Server & data: 13 imports (minor)
- Server & data → UI kit & helpers: 9 imports (minor)
- UI kit & helpers → Server & data: 1 imports (minor)

### App shell & pages

- Entry & root layout → UI kit & helpers: 17 imports
- Entry & root layout → Server & data: 11 imports
- Resource routes → Server & data: 5 imports
- Marketing pages → UI kit & helpers: 4 imports
- Resource routes → UI kit & helpers: 4 imports
- Entry & root layout → Resource routes: 1 imports, 1 calls
- UI kit & helpers → Resource routes: 2 calls
- Resource routes → Database (Prisma): 1 uses (1 reads)
- Entry & root layout → Database (Prisma): 1 uses (1 reads)
- Entry & root layout → Sentry: 1 uses
- UI kit & helpers → Entry & root layout: 2 imports (minor)

### Accounts

- Sign-up & login → Server & data: 53 imports
- Profile & settings → UI kit & helpers: 48 imports
- Sign-up & login → UI kit & helpers: 45 imports
- Profile & settings → Server & data: 41 imports
- Profile & settings → Database (Prisma): 31 uses (18 reads, 13 writes)
- Sign-up & login → Database (Prisma): 24 uses (16 reads, 8 writes)
- Profile & settings → Sign-up & login: 7 imports, 2 calls
- Sign-up & login → Profile & settings: 4 imports
- Sign-up & login → Resend: 2 uses
- Users & notes → Sign-up & login: 1 calls
- Profile & settings → Resend: 1 uses
- UI kit & helpers → Sign-up & login: 1 calls
- Server & data → Sign-up & login: 3 imports (minor)

### Sign-up & login

- Verify & reset → UI kit & helpers: 15 imports
- Login & sign-up → UI kit & helpers: 13 imports
- Onboarding → Server & data: 13 imports
- Passkeys → Database (Prisma): 7 uses (4 reads, 3 writes)
- Verify & reset → Database (Prisma): 6 uses (4 reads, 2 writes)
- GitHub login → Database (Prisma): 5 uses (2 reads, 3 writes)
- GitHub login → Onboarding: 2 imports
- Login & sign-up → GitHub login: 2 imports
- Login & sign-up → Passkeys: 2 calls
- Login & sign-up → Verify & reset: 2 imports
- Onboarding → Verify & reset: 2 imports
- Profile & settings → Passkeys: 2 calls
- Login & sign-up → Resend: 1 uses
- Verify & reset → Resend: 1 uses
- Users & notes → Login & sign-up: 1 calls
- UI kit & helpers → Login & sign-up: 1 calls
- GitHub login → Server & data: 12 imports (minor)
- Login & sign-up → Server & data: 12 imports (minor)
- Verify & reset → Server & data: 12 imports (minor)
- Onboarding → UI kit & helpers: 10 imports (minor)
- GitHub login → UI kit & helpers: 5 imports (minor)
- Profile & settings → Verify & reset: 5 imports (minor)
- Login & sign-up → Database (Prisma): 4 uses (4 reads) (minor)
- Passkeys → Server & data: 4 imports (minor)
- Verify & reset → Profile & settings: 3 imports (minor)
- Server & data → GitHub login: 3 imports (minor)
- Onboarding → Database (Prisma): 2 uses (2 reads) (minor)
- Passkeys → UI kit & helpers: 2 imports (minor)
- Profile & settings → GitHub login: 2 imports (minor)
- GitHub login → Login & sign-up: 1 imports (minor)
- Login & sign-up → Profile & settings: 1 imports (minor)
- Onboarding → GitHub login: 1 imports (minor)
- Passkeys → Login & sign-up: 1 imports (minor)
- Verify & reset → Login & sign-up: 1 imports (minor)
- Verify & reset → Onboarding: 1 imports (minor)

### Profile & settings

- Profile → UI kit & helpers: 21 imports
- Profile → Server & data: 19 imports
- Password & passkeys → UI kit & helpers: 17 imports
- Profile → Database (Prisma): 15 uses (10 reads, 5 writes)
- Password & passkeys → Database (Prisma): 9 uses (5 reads, 4 writes)
- Two-factor → Database (Prisma): 7 uses (3 reads, 4 writes)
- Password & passkeys → Sign-up & login: 2 imports, 2 calls
- Two-factor → Profile: 3 imports
- Password & passkeys → Profile: 3 imports
- Profile → Two-factor: 1 imports
- Profile → Resend: 1 uses
- Password & passkeys → Server & data: 12 imports (minor)
- Two-factor → Server & data: 10 imports (minor)
- Two-factor → UI kit & helpers: 10 imports (minor)
- Sign-up & login → Two-factor: 3 imports (minor)
- Two-factor → Sign-up & login: 3 imports (minor)
- Profile → Sign-up & login: 2 imports (minor)
- Sign-up & login → Profile: 1 imports (minor)

### Users & notes

- Note editor → UI kit & helpers: 18 imports
- Users & note lists → UI kit & helpers: 14 imports
- Note editor → Server & data: 10 imports
- Note editor → Database (Prisma): 6 uses (4 reads, 2 writes)
- Users & note lists → Server & data: 3 imports
- Users & note lists → Database (Prisma): 3 uses (2 reads)
- Users & note lists → Accounts: 1 calls

### Server & data

- Accounts → Sessions & permissions: 48 imports
- Accounts → Database & storage: 25 imports
- Accounts → Email, toasts & headers: 20 imports
- Sessions & permissions → Database (Prisma): 12 uses (4 reads, 7 writes)
- Database & storage → Database (Prisma): 9 uses (8 writes)
- App shell & pages → Email, toasts & headers: 8 imports
- Users & notes → Database & storage: 7 imports
- Cache & admin → Database & storage: 5 imports
- Cache & admin → Sessions & permissions: 3 imports
- Express server → Sentry: 3 uses
- Sessions & permissions → Database & storage: 3 imports
- Email, toasts & headers → Resend: 1 uses
- Users & notes → Sessions & permissions: 5 imports (minor)
- Cache & admin → UI kit & helpers: 5 imports (minor)
- App shell & pages → Database & storage: 5 imports (minor)
- App shell & pages → Sessions & permissions: 3 imports (minor)
- Sessions & permissions → Accounts: 2 imports (minor)
- Sessions & permissions → UI kit & helpers: 2 imports (minor)
- Accounts → Cache & admin: 1 imports (minor)
- Users & notes → Email, toasts & headers: 1 imports (minor)
- Cache & admin → Email, toasts & headers: 1 imports (minor)
- Database & storage → Accounts: 1 imports (minor)
- Email, toasts & headers → UI kit & helpers: 1 imports (minor)
- Express server → UI kit & helpers: 1 imports (minor)
- UI kit & helpers → Email, toasts & headers: 1 imports (minor)

### Sessions & permissions

- Accounts → Sessions: 30 imports
- Accounts → Codes & guards: 18 imports
- Sessions → Database (Prisma): 10 uses (2 reads, 7 writes)
- Users & notes → Sessions: 4 imports
- Cache & admin → Codes & guards: 3 imports
- Codes & guards → Database (Prisma): 2 uses (2 reads)
- Codes & guards → Sessions: 1 imports
- Sessions → Accounts: 2 imports (minor)
- Sessions → Database & storage: 2 imports (minor)
- App shell & pages → Sessions: 2 imports (minor)
- Users & notes → Codes & guards: 1 imports (minor)
- Sessions → UI kit & helpers: 1 imports (minor)
- Codes & guards → Database & storage: 1 imports (minor)
- Codes & guards → UI kit & helpers: 1 imports (minor)
- App shell & pages → Codes & guards: 1 imports (minor)

### UI kit & helpers

- Accounts → Buttons & icons: 37 imports
- Accounts → Client helpers: 33 imports
- Accounts → Forms & errors: 23 imports
- Users & notes → Forms & errors: 12 imports
- App shell & pages → Client helpers: 11 imports
- Users & notes → Buttons & icons: 9 imports
- Page chrome → Buttons & icons: 5 imports
- Forms & errors → Form fields: 5 imports
- Client helpers → App shell & pages: 2 imports, 2 calls
- Page chrome → Form fields: 2 imports
- Page chrome → Accounts: 1 calls
- Forms & errors → Sentry: 1 uses
- Monitoring & setup → Sentry: 1 uses
- Users & notes → Client helpers: 8 imports (minor)
- App shell & pages → Page chrome: 5 imports (minor)
- App shell & pages → Buttons & icons: 5 imports (minor)
- Page chrome → Client helpers: 5 imports (minor)
- Form fields → Client helpers: 5 imports (minor)
- Server & data → Client helpers: 4 imports (minor)
- Buttons & icons → Client helpers: 4 imports (minor)
- Server & data → Forms & errors: 3 imports (minor)
- Users & notes → Form fields: 2 imports (minor)
- App shell & pages → Forms & errors: 2 imports (minor)
- App shell & pages → Monitoring & setup: 2 imports (minor)
- Users & notes → Page chrome: 1 imports (minor)
- Server & data → Monitoring & setup: 1 imports (minor)
- Server & data → Buttons & icons: 1 imports (minor)
- Page chrome → Server & data: 1 imports (minor)
- Forms & errors → Client helpers: 1 imports (minor)

## Outside services

- **Database (Prisma)** (database)
- **Resend** (email): sends email
- **Sentry** (monitoring): error tracking

---

Generated by RepoLadder from the same model as the interactive map. Machine-readable: https://repoladder.com/epicweb-dev/epic-stack/64ca647630e15f71e6782b622ab0112c4b428f1f/map.json
