How abelmruso/p6_mon_vieux_grimoire works
Project type and purpose
• From the file tree and README, “Mon vieux Grimoire” is a full-stack web application for managing books and user accounts.
• Frontend: a React single-page app (in /src, public/, manifest.json).
• Backend: a Node.js/Express REST API (in /backend) with controllers, models, routes, middleware, and a MongoDB connection (config/db.js).
Relationships & data flows
• Browser → (HTTP/HTTPS) → React App (served from backend or static host)
• React App → (REST calls via fetch/axios) → Express API endpoints
• Express API → (Mongoose queries) → MongoDB
• File upload path: React form → POST /api/books/upload (Express multer middleware) → local storage or cloud
• Auth flow: SignIn page → POST /api/users/login → JWT token → stored in client → included in Authorization header on protected routes
Architectural patterns & tech
• Frontend: Component-based SPA, React Router, custom hooks (src/lib), global CSS modules
• Backend: MVCish structure (models/controllers/routes), middleware pipeline (auth, CORS, rate limiting), environment config
• Database: MongoDB via Mongoose (assumed from models naming and db.js)
• Build & deployment: Dockerfile at root, babel-plugin macros