Foodgram is an online platform for publishing and sharing recipes. Users can post their own recipes, add them to favorites, generate shopping lists, and follow other authors. The project is built with Django and runs inside Docker containers for scalability and accessibility.





Sorting and Filtering: Recipes are sorted by publication date across all pages. Tag-based filtering is supported, including on the favorites page and author-specific recipe lists.
Pagination: Pagination works across all recipe views, including filtered results.
Preloaded Test Data: Includes sample users and recipes for testing and demonstration.
Shopping List: Users can download their shopping list in .txt, .pdf, or other formats. Ingredients are summed up by type.
Database: Uses PostgreSQL as the database engine.
Containerized Deployment: Runs on a virtual server using three containers: Nginx, PostgreSQL, and Django+Gunicorn. The frontend is built and served from a separate container.
Persistent Storage Data is stored using Docker volumes.
Code Style: Fully compliant with PEP 8 coding standards.
Clone the repository:
git clone https://github.com/closecodex/foodgram.git cd foodgramCreate an .env file based on .env.example and fill in the required variables.
Build and run Docker containers:
docker-compose up -d --build
Run migrations and collect static files:
docker-compose exec backend python manage.py migrate docker-compose exec backend python manage.py collectstatic --noinput
Create a superuser:
docker-compose exec backend python manage.py createsuperuser