Full-stack garage management platform built with Next.js, TypeScript, MongoDB, and Better Auth.
- Public website pages (home, about, services, contact)
- Authentication and role-aware access control
- Admin dashboard for operational workflows
- REST APIs for customers, employees, orders, services, vehicles, and inventory
- Dashboard summary endpoint for KPIs and recent activity
- Next.js 16 (App Router)
- React 19 + TypeScript
- Tailwind CSS 4
- MongoDB + Mongoose
- Better Auth
- Vitest
app/: Next.js routes and API handlerscomponents/: UI and admin componentslib/: Client/server utilities, auth, API helpersscripts/: Project scripts (including first-admin bootstrap)tests/: Integration testsdocs/: Architecture and roadmap notes
- Node.js 20+
- npm 10+
- MongoDB (Atlas or local)
-
Install dependencies:
npm install
-
Create environment file:
cp .env.example .env
If
.env.exampledoes not exist yet, create.envmanually with the variables listed below. -
Start development server:
npm run dev
Set these variables in .env:
MONGODB_URLBETTER_AUTH_URLBETTER_AUTH_SECRETNEXT_PUBLIC_GEMINI_API_KEY(optional)NEXT_PUBLIC_GEMINI_API_URL(optional)CORS_ORIGINS(recommended for backend CORS hardening)
npm run dev: Start local development servernpm run build: Build for productionnpm run start: Start production servernpm run lint: Run lint checksnpm run bootstrap:admin: Bootstrap first admin user
Main route groups under app/api/:
authcustomersemployeesorders(includingdashboard/summary)servicesvehiclesinventories
Run tests with Vitest:
npx vitestCurrent test suite includes auth integration coverage in tests/auth.integration.test.ts.
- Do not commit real secrets in
.env. - Rotate exposed secrets immediately if they were ever committed.
- Use strong, environment-specific values for auth and database credentials.
See docs/fullstack-review-and-roadmap.md for architecture review, completed improvements, and next iteration recommendations.