Project structure · Frontend
React Router (framework mode, formerly Remix) project structure
Opens with creditsA server-rendered React app built with React Router in framework mode, the direct successor to Remix. Every URL maps to a route module that loads its own data in a loader, handles its own forms in an action and renders with the result; app/routes.ts wires the URLs together. The example is a task tracker for small teams, with sessions, PostgreSQL through Drizzle, middleware for auth and a Docker deploy.
How it grows
Each stage opens the explorer there
- 1Day 1What the scaffold and your first hour give you30 files and folders
- 2GrowingWhat a real app with features and tests adds+58 files and folders
- ProductionWhat running it for real users adds+25 files and foldersOpens with credits
- ExpertWhat a team needs to keep it healthy for years+18 files and foldersOpens with credits
How it is organised
- `app/routes.ts` is the map of the app: every URL is listed there and points at one route module. The folder layout under `app/routes` is yours to choose; group by area so it reads like the navigation.
- A route module owns its data: `loader` for reads, `action` for writes, the default export for UI. Data flows in through `loaderData` and `actionData`, typed by the generated `./+types/<route>` file.
- Mutations are forms. A `<Form method="post">` or a `useFetcher()` posts to an action; after it finishes, React Router revalidates the loaders on the page, so you rarely manage a client cache by hand.
- Progressive enhancement by default: forms work before JavaScript loads. Keep it that way unless you have a reason not to.
- Server-only code lives in `app/.server/`. The build fails if browser code imports from it, which keeps secrets and the database client out of the bundle.
- Auth runs as middleware on a layout route, so every nested route is protected without repeating a check. Ownership checks live in the `.server` query functions, not in components.
- Route modules stay thin: parse the request, call a `.server` function, return data or a redirect. Business rules and SQL live in `.server`, where they can be unit tested without rendering anything.
- Tests grow in layers: query functions and route components with Vitest and `createRoutesStub` at Growing, real database tests and Playwright journeys at Production, accessibility, visual and load tests at Expert.
At the top of the project
Open one in the explorer for the full story
- team-tasks/
- .git/Git history. create-react-router runs `git init` unless you pass --no-git-init.
- .agents/Instructions for AI coding agents, added by create-react-router since 8.1.1 inside
- .react-router/Generated route types, written by `react-router typegen` and the dev server.
- .vscode/Shared editor settings and recommended extensions.1 inside
- .dockerignoreKeeps .react-router, build, node_modules and README.md out of the Docker build context.
- .envLocal secrets and settings: DATABASE_URL, SESSION_SECRETS. Never committed.
- .env.exampleEvery variable the app needs, with fake values, committed as documentation.
- .gitignoreIgnores .DS_Store, .env, node_modules, .react-router and build.
- .nvmrcPins the Node.js major (24) for nvm, fnm, CI and your teammates.
- .prettierrcFormatting rules, plus the Tailwind plugin that sorts class names.
- build/Output of `npm run build`: `build/client` (static assets) and `build/server` (the server bundle).
- DockerfileA four-stage Node 24 Alpine image: dev deps, prod deps, build, then a small runtime.
- README.mdHow to install, run, build and deploy. The template version covers the basics.
- docker-compose.ymlRuns PostgreSQL 18 locally with one command.
- drizzle/Generated SQL migrations and their snapshot metadata, written by drizzle-kit.2 inside
- drizzle.config.tsTells drizzle-kit where the schema is, where migrations go and how to connect.
- eslint.config.jsESLint flat config: TypeScript, React Hooks, JSX accessibility and import rules.
- node_modules/Installed packages. create-react-router runs npm install for you.
- package-lock.jsonExact versions of every installed package, written by npm.
- package.jsonDependencies and the four scripts: dev, build, start, typecheck.
- public/Static files served as they are at the site root.1 inside
- react-router.config.tsFramework options: SSR on or off, pre-rendering, the app directory, split route modules.
- scripts/One-off and repeatable scripts: seeding, data fixes.1 inside
- test/Test helpers shared by unit and route tests: setup, factories, the database harness.3 inside
- tsconfig.jsonTypeScript settings: strict mode, the `~/*` alias, and `rootDirs` for the generated route types.
- vite.config.tsVite plugins: Tailwind CSS and React Router, plus tsconfig path resolution.
- vitest.config.tsVitest settings: jsdom for route tests, node for `.server` tests, the setup file, coverage.
- app/All application code: the root layout, the route config, route modules and the code they share.11 inside
Learn more on Sefism
Roadmaps, cheat sheets and projects that go with React Router (framework mode, formerly Remix).
- Roadmap· ReactFrontend development roadmapHTML, CSS, JavaScript and a framework
- Roadmap· Next.js and PostgreSQLFull stack development roadmapBuild and ship whole web apps
- Roadmap· PostgreSQLSQL and databases roadmapQueries, design, indexes, transactions
- Roadmap· PlaywrightQA and test automation roadmapManual testing to automated suites
- Cheat sheetFrontend development cheat sheetHTML, CSS, JavaScript and a framework.
- Cheat sheetFull stack development cheat sheetBuild and ship whole web apps.
- Cheat sheetSQL and databases cheat sheetQueries, design, indexes, transactions.
- Cheat sheetQA and test automation cheat sheetManual testing to automated suites.
- FYP idea· IntermediateTeam Chat App with Threads and Read Receipts on MongoDBBuild a Slack-style team chat for university societies and student project groups, with channels, threaded replies, read receipts, unread counts and live updates. The point is the MongoDB modelling: where to embed and where to reference messages and threads, change streams for real-time delivery, and pagination that stays fast as channels grow.
See 11 moreShow fewer
- FYP idea· IntermediateApproval Workflow Engine with Escalations for Small OfficesAn approval workflow engine for small offices, schools and NGOs that turns purchase requests, leave, reimbursements and document sign-offs into tracked flows with deadlines, escalations and email or WhatsApp-style reminders. A no-code automation final year project with a durable workflow runtime and an audit trail.
- FYP idea· IntermediatePharmacy Stock Ledger with Batch Expiry and FEFO DispensingA web-based stock ledger and billing counter for independent pharmacies that tracks every medicine by batch and expiry, sells loose tablets from strips correctly, and dispenses first-expiry-first-out. A final year project in healthcare retail software with real inventory correctness problems to solve.
- QuestionWhat should I learn to become a web developer, and in what order?Learn the web platform first (HTML, CSS, JavaScript, how HTTP works), then one frontend framework, then a backend with a database, and build a real project at each stage. If you already know WordPress, you are not starting over: your HTML, CSS and PHP experience transfers.
- QuestionI understand tutorials but cannot build anything myself. Why does coding feel so different when I am alone?Tutorials train recognition, not production. When you follow along, someone else makes every decision. Building alone requires you to break a problem down and make choices, which is a separate skill. Build it with small projects, planning on paper first, and a rule to struggle before you look anything up.
- QuestionHow do I learn to read a large codebase when I can handle small projects but get lost in real ones?Nobody reads a large codebase from top to bottom. You follow one real path through it, such as a single request or button click, from entry point to database and back. Map what you find, ignore everything off that path for now, and repeat with a different path. Understanding builds in layers, and a first small change teaches more than a week of reading.
- QuestionShould I use PostgreSQL or MongoDB for my project?For most student and startup projects, PostgreSQL is the safer default: relational data, joins, constraints and transactions fit most apps, and it handles JSON and vector search too. MongoDB is a good fit when your data is naturally document-shaped and varies a lot, or your team already knows it well. Model your data first, then choose.
- Resource· GuideReact DocumentationThe official React documentation at react.dev is a full course as well as a reference. Its Learn track moves from a quick start through describing the UI, adding interactivity, managing state and escape hatches, with interactive sandboxes and challenges on nearly every page. It suits anyone learning React and any React developer whose habits come from older class-based tutorials, and it should be read before paying for a React course.
- Resource· GuideVite GuideThe official guide to Vite, the dev server and build tool behind most new React, Vue, Svelte and other frontend projects. It explains scaffolding a project, the fast dev server and hot module replacement, static assets, environment variables and modes, plugins, the dev server proxy, production builds, deployment, server-side rendering and backend integration. It suits frontend developers who want env files, asset handling and builds to stop being a mystery when something breaks.
- Resource· GuideThe TypeScript HandbookThe TypeScript Handbook is the official, free guide to TypeScript's type system from the TypeScript team, written for working programmers and kept current with each release. It covers everyday types, narrowing, functions, object types, generics, type manipulation, classes and modules, and it is designed to be read in a few hours. It suits JavaScript developers adopting TypeScript and anyone who writes types by copying patterns without understanding them.
- Resource· GuideZod DocumentationThe official docs for Zod 4, the TypeScript-first schema library: declare a schema once, get a runtime validator and a static type, and convert it to JSON Schema. The OpenAI Agents SDK, the Claude Agent SDK and the MCP TypeScript SDK all accept Zod schemas for tools.
- Resource· GuidePlaywright DocumentationThe official documentation for Playwright, Microsoft's open-source framework for end-to-end testing in real Chromium, Firefox and WebKit browsers, with mobile emulation. It walks you from installation to your first test, then covers locators, assertions, fixtures, authentication, API testing, parallel runs and CI. Tools such as the code generator, UI mode and trace viewer make first tests easy. It suits developers and QA engineers adding reliable browser tests to a web app.
Checked against 17 official sources, October 2026. If something has changed, the docs win.Show sourcesHide sources
- React Router: Installation (framework mode)
- React Router: Routing and routes.ts
- React Router: Route module exports
- React Router: Middleware
- React Router: Sessions and cookies
- React Router: Server and client modules
- React Router: Pre-rendering
- React Router: Testing with createRoutesStub
- React Router: Upgrading from Remix
- React Router changelog (v8)
- Official templates: default
- create-react-router on npm
- Drizzle ORM: Get started with PostgreSQL
- Drizzle Kit: Migrations
- Sentry: React Router framework SDK
- Playwright: Getting started
- Docker Hub: official postgres image (PGDATA in 18+)
Best practices and checklists for this stack
Picked from the other libraries by shared topics.
Best practices
See all- React Best PracticesModern React best practices for 2026: pure components, lean state, fewer effects, React Compiler, form actions, accessibility and testing.
- TypeScript Best PracticesModern TypeScript best practices for 2026: strict settings, TypeScript 7, modeling data with unions, safe narrowing, runtime validation, generics and typed linting.
- Modern CSS Best PracticesModern CSS best practices: cascade layers, low specificity, custom properties, Grid and Flexbox layout, responsive design, container queries, :has() and nesting, plus Tailwind CSS v4 tips.
Checklists
See all- Web Accessibility ChecklistA practical web accessibility checklist built on WCAG 2.2 level AA, with a severity and a concrete way to verify every check.
- Web Performance ChecklistA practical web performance checklist built on Core Web Vitals: LCP, INP and CLS, with a severity and a concrete way to verify every check.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
- 1:1 Mentorship
- Fresh Graduate Mentorship
- Career Guidance
Brand deals, promos and partnerships: tauseeffayyaz@gmail.com