A fullstack web application to explore books and leave reviews, built with modern tech from frontend to backend.
Backend: NestJS
Frontend: Next.js (App Router)
Database: MongoDB
DevOps: Docker Compose
- List books with average ratings
- Book detail pages with user reviews
- Submit reviews with form validation
- Data cached and refreshed with React Query
- Seed script for demo data
git clone https://github.com/lucasbachega/teste-fullstack.git
cd teste-fullstack
docker compose up --build -d
docker compose exec backend npm run seed Docker Compose will:
- Start the frontend on
http://localhost:3500 - Start the backend on
http://localhost:9100 - Start MongoDB
- Auto-seed the DB with demo data
cd backend && npm install
cd frontend && npm installBackend → backend/.env:
PORT=9100
MONGO_URI=mongodb://localhost:27017/book-reviewsFrontend → frontend/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:9100# Backend
cd backend
npm run start:dev
# Frontend
cd frontend
npm run devTo run the backend end-to-end (E2E) tests, follow these steps:
- Create a
.envfile inside thebackend/folder: - Add your test database connection string to it:
MONGO_URI=mongodb://localhost:27017/bookreviews_test
Make sure MongoDB is running locally and the
bookreviews_testdatabase is available.
- Inside the
backend/folder, run:
npm run test:e2e
This will run the Jest test suite using the test database.
cd backend
npm run seed- NestJS + MongoDB
- Next.js + React Query
- Zod + RHF for forms
- TailwindCSS
- Docker