This is a Full Stack app starter with the foundational things setup and configured for you to hit the ground running on your next EPIC idea.
# Routing
The Epic Stack uses file-based routing with React Router. However, it's not
using the built-in routing convention of React Router and instead is using
[react-router-auto-routes](https://github.com/kenn/react-router-auto-routes)
which is a special implementation of the React Router convention that adds a few
features. You'll find it configured for the application in the `app/routes.ts`
file at the root of the app.
We'll defer to the `react-router-auto-routes` documentation for specifics, but
an important thing for you to know as you get used to this convention is you can
always run `npx react-router routes` from the root of the app and it will output
the routes of your application in a JSX-like output that will reveal the routes
that will be generated based on your current file structure. Here's an example
of the Epic Stack routes at the time of this writing:
```
app/routes
โโโ $.tsx
โโโ me.tsx
โโโ _auth
โ โโโ forgot-password.tsx
โ โโโ login.tsx
โ โโโ logout.tsx
โ โโโ reset-password.tsx
โ โโโ signup.tsx
โ โโโ verify.tsx
โ โโโ auth.$provider
โ โ โโโ callback.ts
โ โ โโโ index.ts
โ โโโ onboarding
โ โ โโโ $provider.tsx
โ โ โโโ index.tsx
โ โโโ webauthn
โ โโโ authentication.ts
โ โโโ registration.ts
โโโ _marketing
โ โโโ about.tsx
โ โโโ index.tsx
โ โโโ privacy.tsx
โ โโโ support.tsx
โ โโโ tos.tsx
โ โโโ +logos
โ โโโ logos.ts
โ โโโ ...
โโโ _seo
โ โโโ robots[.]txt.ts
โ โโโ sitemap[.]xml.ts
โโโ admin
โ โโโ cache
โ โโโ index.tsx
โ โโโ lru.$cacheKey.ts
โ โโโ sqlite.$cacheKey.ts
โ โโโ sqlite.tsx
โโโ resources
โ โโโ download-user-data.tsx
โ โโโ healthcheck.tsx
โ โโโ images.tsx
โ โโโ theme-switch.tsx
โโโ settings
โ โโโ profile
โ โโโ _layout.tsx
โ โโโ change-email.tsx
โ โโโ connections.tsx
โ โโโ index.tsx
โ โโโ passkeys.tsx
โ โโโ password.tsx
โ โโโ password_.create.tsx
โ โโโ photo.tsx
โ โโโ two-factor
โ โโโ _layout.tsx
โ โโโ disable.tsx
โ โโโ index.tsx
โ โโโ verify.tsx
โโโ users
โโโ index.tsx
โโโ $username
โโโ index.tsx
โโโ notes
โโโ $noteId.tsx
โโโ $noteId_.edit.tsx
โโโ _layout.tsx
โโโ index.tsx
โโโ new.tsx
17 directories, 72 files
```
```tsx
<Routes>
<Route file="root.tsx">
<Route path="*" file="routes/$.tsx" />
<Route
path="auth/:provider/callback"
file="routes/_auth/auth.$provider/callback.ts"
/>
<Route
path="auth/:provider"
index
file="routes/_auth/auth.$provider/index.ts"
/>
<Route path="forgot-password" file="routes/_auth/forgot-password.tsx" />
<Route path="login" file="routes/_auth/login.tsx" />
<Route path="logout" file="routes/_auth/logout.tsx" />
<Route
path="onboarding/:provider"
file="routes/_auth/onboarding/$provider.tsx"
/>
<Route path="onboarding" index file="routes/_auth/onboarding/index.tsx" />
<Route path="reset-password" file="routes/_auth/reset-password.tsx" />
<Route path="signup" file="routes/_auth/signup.tsx" />
<Route path="verify" file="routes/_auth/verify.tsx" />
<Route
path="webauthn/authentication"
file="routes/_auth/webauthn/authentication.ts"
/>
<Route
path="webauthn/registration"
file="routes/_auth/webauthn/registration.ts"
/>
<Route path="about" file="routes/_marketing/about.tsx" />
<Route index file="routes/_marketing/index.tsx" />
<Route path="privacy" file="routes/_marketing/privacy.tsx" />
<Route path="support" file="routes/_marketing/support.tsx" />
<Route path="tos" file="routes/_marketing/tos.tsx" />
<Route path="robots.txt" file="routes/_seo/robots[.]txt.ts" />
<Route path="sitemap.xml" file="routes/_seo/sitemap[.]xml.ts" />
<Route path="admin/cache" index file="routes/admin/cache/index.tsx" />
<Route
path="admin/cache/lru/:cacheKey"
file="routes/admin/cache/lru.$cacheKey.ts"
/>
<Route path="admin/cache/sqlite" file="routes/admin/cache/sqlite.tsx">
<Route path=":cacheKey" file="routes/admin/cache/sqlite.$cacheKey.ts" />
</Route>
<Route path="me" file="routes/me.tsx" />
<Route
path="resources/download-user-data"
file="routes/resources/download-user-data.tsx"
/>
<Route
path="resources/healthcheck"
file="routes/resources/healthcheck.tsx"
/>
<Route path="resources/images" file="routes/resources/images.tsx" />
<Route
path="resources/theme-switch"
file="routes/resources/theme-switch.tsx"
/>
<Route path="settings/profile" file="routes/settings/profile/_layout.tsx">
<Route
path="change-email"
file="routes/settings/profile/change-email.tsx"
/>
<Route
path="connections"
file="routes/settings/profile/connections.tsx"
/>
<Route index file="routes/settings/profile/index.tsx" />
<Route path="passkeys" file="routes/settings/profile/passkeys.tsx" />
<Route path="password" file="routes/settings/profile/password.tsx" />
<Route
path="password/create"
file="routes/settings/profile/password_.create.tsx"
/>
<Route path="photo" file="routes/settings/profile/photo.tsx" />
<Route
path="two-factor"
file="routes/settings/profile/two-factor/_layout.tsx"
>
<Route
path="disable"
file="routes/settings/profile/two-factor/disable.tsx"
/>
<Route index file="routes/settings/profile/two-factor/index.tsx" />
<Route
path="verify"
file="routes/settings/profile/two-factor/verify.tsx"
/>
</Route>
</Route>
<Route
path="users/:username"
index
file="routes/users/$username/index.tsx"
/>
<Route
path="users/:username/notes"
file="routes/users/$username/notes/_layout.tsx"
>
<Route path=":noteId" file="routes/users/$username/notes/$noteId.tsx" />
<Route
path=":noteId/edit"
file="routes/users/$username/notes/$noteId_.edit.tsx"
/>
<Route index file="routes/users/$username/notes/index.tsx" />
<Route path="new" file="routes/users/$username/notes/new.tsx" />
</Route>
<Route path="users" index file="routes/users/index.tsx" />
</Route>
</Routes>
```
Basically, react-router-auto-routes allows us to get the best of both worlds:
- Colocation of routes to the code they use
- Organized folder structure to keep routes together as needed
If you're familiar with the React Router routing convention, just think of it
this way, react-router-auto-routes takes `+` prefix for colocated modules.