How mahmoud-mh/foood works
Project Type and Purpose
• This is a full‐stack web application for managing cooking recipes.
• Frontend is built with Next.js (App Router, React, Tailwind CSS), providing server‐rendered and client‐side pages for browsing, creating, editing, and administrating recipes.
• Backend is a modular NestJS monolith exposing a versioned REST API (/api/v1/*), handling authentication (JWT, Passport), business logic (recipes, ingredients, categories, users), file uploads (avatars, recipe images), and persistence (PostgreSQL via TypeORM).
File Structure Analysis
• Top‐level directories:
• /frontend – Next.js application
• /backend – NestJS API server + scripts + upload storage
• Backend modules under /backend/src/modules: auth, users, recipes, ingredients, categories, uploads.
• Shared code in /backend/src/common (DTOs, decorators, guards), configuration in /backend/src/config, entrypoint /backend/src/main.ts.
• Frontend pages organized under /frontend/src/app by domain (auth, recipes, admin, categories, profile).
• Frontend reusable components in /frontend/src/components and API wrappers in /frontend/src/services.
Key Insights from README
• System features: JWT‐based auth, role‐based access (USER/ADMIN), CRUD for recipes/ingredients/categories, file upload with Multer, image storage on disk, PostgreSQL backed by TypeORM, and automated API docs with Swagger.
• Tech stack: Next.js, React, TypeScript, Tailwind, Axios, NextAuth.js on the frontend; NestJS, TypeORM, Passport, JWT, bcrypt, Multer on the backend.