This project is a complete full-stack web application designed to manage a library's book collection. It utilizes a modern architecture separating the frontend (User Interface) from the backend (Server Logic), orchestrated entirely via Docker.
Note: This project was originally developed as a required challenge for Escola DNC. It has since been completely refactored, modernized, and containerized following software engineering best practices.
- Frontend: React (powered by Vite) + SASS.
- Backend: Node.js (Express) with Joi for validation.
- Database: SQLite (managed via Knex migrations).
- Orchestration: Docker & Docker Compose (multi-container setup).
The repository is structured as a monorepo containing two independent services, orchestrated by a root docker-compose.yml:
frontend/: React SPA served via a multi-stage Nginx container. Contains the visual interface and routing to manage books.backend/: Node.js Express server providing a robust REST API (/api/books) and handling database interactions.
- Ensure you have Docker and Docker Compose installed.
- Clone this repository and navigate to the project root (
dnc-challenge-05). - Build and start both the frontend and backend containers:
docker-compose up -d --build-
Access the application:
- Frontend UI:
http://localhost:8084 - Backend API:
http://localhost:3002/api
- Frontend UI:
-
To stop the containers, run:
docker-compose downIf you prefer running the services without Docker:
1. Backend:
cd backend
npm install
npx knex migrate:latest --knexfile server/knexfile.cjs
npm startThe API will be available at http://localhost:3002/api/books.
2. Frontend:
cd frontend
npm install
npm run devThe UI will be available at http://localhost:5173 (or the port specified by Vite).