How moshkovmihail/foodgram-template works
Foodgram is a recipe-sharing web application: visitors browse recipe listings and details; registered users can create recipes, save favorites, assemble a shopping cart, and follow authors. The React client calls a Django REST API, which handles recipe and user operations and persists domain data in PostgreSQL. The graph emphasizes those user-facing stages and the API boundary. Backend URL/view wiring and several capabilities are represented from the repository tree and README context, not sampled implementation; uncertain internal links are omitted.
Main entry points: App.js Page routing · index.js API client · urls.py API routes · views.py Recipe endpoints
Components 17
Web client
- React application
frontend/src/index.js - Page routing
frontend/src/App.js - Recipe pages
frontend/src/pages - Account pages
frontend/src/pages - Cart and follows
frontend/src/pages - API client
frontend/src/api/index.js - Auth and user state
frontend/src/contexts
API backend
- API routes
backend/core/urls.py - Django REST API
backend/core/settings.py
Domain services
- Recipe endpoints
backend/recipes/views.py - User endpoints
backend/users/views.py - Recipe data model
backend/recipes/models.py - User data model
backend/users/models.py - Recipe serialization
backend/recipes/serializers.py - User serialization
backend/users/serializers.py
Other components
- Visitor / user
- PostgreSQL
Connections 19
- Visitor / user → React application: uses
- React application → Page routing: renders
- Page routing → Recipe pages: routes to
- Page routing → Account pages: routes to
- Page routing → Cart and follows: routes to
- Page routing → Auth and user state: provides state
- Recipe pages → API client: requests recipes
- Account pages → API client: requests account
- Cart and follows → API client: requests actions
- API client → Django REST API: HTTP requests
- Django REST API → API routes: dispatches
- API routes → Recipe endpoints: routes recipe calls
- API routes → User endpoints: routes user calls
- Recipe endpoints → Recipe serialization: serializes recipes
- User endpoints → User serialization: serializes users
- Recipe endpoints → Recipe data model: reads and writes
- User endpoints → User data model: reads and writes
- Recipe data model → PostgreSQL: persists
- User data model → PostgreSQL: persists