A full-stack application built with React and Express as part of The Odin Project's NodeJS curriculum. Features JWT authentication, role-based access control, PostgreSQL via Prisma ORM, and a modular search system.
- JWT authentication with HttpOnly cookies
- Role-based access control (USER / ADMIN / SUPER_ADMIN)
- Full-stack search with filters, sorting, and URL-state persistence
- Prisma ORM with PostgreSQL
- Vitest + React Testing Library test suite (client & server)
- Dark/light theme toggle
- Responsive layout with mobile Navbar
See docs/setup.md for the full environment setup guide.
Quick start (after setup):
npm run install:all # install all dependencies
npm run dev # start client + server concurrentlytemplate-react-expressjs/
βββ client/ # React + Vite frontend
β βββ src/
β βββ components/ # UI components grouped by domain
β βββ config/ # searchConfig.js β drives all search UI
β βββ layouts/ # MainLayout (Navbar + Outlet)
β βββ modules/api/ # Fetch wrappers per domain
β βββ pages/ # Route-level components
β βββ providers/ # Auth, Theme, Toast context
β βββ routes/ # AuthRoute, AdminRoute guards
β βββ routes.jsx # createBrowserRouter config
β βββ styles/ # Global CSS variables, reset, animations
βββ server/ # Express backend
β βββ src/
β βββ config/ # Passport, CORS, cookie options
β βββ controllers/ # Route handlers
β βββ db/queries/ # Prisma query functions per domain
β βββ middleware/ # Auth, error, app middleware
β βββ routes/ # Express routers
βββ docs/
β βββ setup.md # Environment setup (PostgreSQL, .env, pgAdmin)
β βββ architecture.md # Stack overview, request flow, patterns
β βββ testing.md # Testing conventions and patterns
βββ CONTRIBUTING.md # Branching, commit conventions, PR process
βββ CHANGELOG.md # Version history
βββ package.json # Root orchestration scripts
| Doc | Description |
|---|---|
| docs/setup.md | PostgreSQL installation (Windows/macOS/Linux), .env config, pgAdmin 4 |
| docs/architecture.md | Stack overview, request flow, client/server structure, auth flow |
| docs/testing.md | Testing patterns, mocking conventions, what to test |
| CONTRIBUTING.md | Branching strategy, commit conventions, PR process |
| CHANGELOG.md | Version history |
cd client && npm run test:watch # client β watch mode
cd server && npm run test:watch # server β watch modeSee docs/testing.md for patterns, mocking conventions, and gotchas.
- Gallery and list view modes for search results
- Pagination on search results
- Email verification on signup
- File upload support (profile avatars)
- Rate limiting on auth endpoints
Client: React 19, React Router 7, Vite, CSS Modules, Lucide React, Vitest, React Testing Library
Server: Node.js, Express, Prisma ORM, PostgreSQL, Passport.js (Local + JWT), bcryptjs, express-validator
Tooling: ESLint, Prettier, concurrently, nodemon
- The Odin Project β For providing an amazing free curriculum
- The TOP Community β For being supportive and helpful throughout
Built with π‘ and β as part of my journey through The Odin Project β NodeJS