This project is a fullstack web application that allows users to browse Formula 1 World Champions and their race data.
The application is built using a monorepo structure and consists of:
- Backend API: Node.js, Express, TypeScript, Prisma, PostgreSQL, Redis
- Frontend UI: React, Vite, Zustand, TailwindCSS
- Infrastructure: Docker Compose (Postgres & Redis)
- Node.js 20
- Express 5
- TypeScript
- Prisma ORM
- PostgreSQL 15
- Redis 7 (ioredis)
- Dockerized backend
- React 19
- Vite
- Zustand (state management)
- TailwindCSS
- Vitest + Testing Library (for testing)
- Docker Compose (for local development)
- PostgreSQL 15
- Redis 7
- pnpm as package manager
fullstack-assignment/
backend/
Dockerfile -> Dockerfile
package.json
pnpm-lock.yaml
prisma/ -> Prisma schema & migrations
src/ -> Express backend source code
docker-entrypoint.sh
frontend/ -> React frontend codebase
infrastructure/ -> Docker Compose files for Postgres/Redis
docker-compose.yml -> Infra compose file
start-all.sh -> Unified local startup scriptcd infrastructure
docker-compose up -dsFrom project root:
./start-all.sh- Frontend UI: http://localhost:5173
- Backend API Docs (Swagger): http://localhost:3000/api-docs
| Key | Value (Example) |
|---|---|
| DATABASE_URL | postgresql://postgres:postgres@localhost:5432/f1 |
| REDIS_URL | redis://localhost:6379 |
| PORT | 3000 |
- Backend tests:
pnpm test(Vitest) - Frontend tests:
pnpm test(Vitest + Testing Library)
- Custom car loader animation while data is being fetched.
- Swagger API Docs styled with a pink theme for extra visual flair.