Skip to content

A comprehensive Django-based web application for managing recipes with full user authentication and CRUD operations.

Notifications You must be signed in to change notification settings

alishankhan-coder/Recipe-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Screenshot (10)# Recipe Management System 🍳

A comprehensive Django-based web application for managing recipes with full user authentication and CRUD operations.

Features πŸš€

User Authentication

  • User Registration: Create new accounts with username, first name, last name, and password
  • User Login: Secure authentication with username and password
  • User Logout: Safe session termination
  • Login Protection: Protected routes requiring authentication for recipe management

Recipe Management (Full CRUD)

  • Create Recipes: Add new recipes with name, description, and image upload
  • Read Recipes: Browse all recipes with search functionality
  • Update Recipes: Edit existing recipes (name, description, image)
  • Delete Recipes: Remove recipes with confirmation dialogs

Additional Features

  • Search Functionality: Search recipes by name
  • Recipe Details: Individual recipe pages with full information
  • Image Upload: Support for recipe images with media handling
  • View Counter: Track recipe popularity with view counts
  • Responsive Design: Modern, user-friendly interface
  • Flash Messages: Success/error notifications for user actions
  • Admin Panel: Enhanced Django admin with custom display and image previews

Technology Stack πŸ’»

  • Backend: Django 5.0.4
  • Database: SQLite (default)
  • Frontend: HTML5, CSS3, JavaScript
  • Authentication: Django's built-in authentication system
  • File Upload: Django's file handling for recipe images
  • Admin Interface: Custom Django admin with enhanced features

Project Structure πŸ“

Recipe Site/
β”œβ”€β”€ manage.py                 # Django management script
β”œβ”€β”€ db.sqlite3               # SQLite database
β”œβ”€β”€ media/                   # Uploaded recipe images
β”‚   └── Recipe_pictures/
β”œβ”€β”€ reciepe/                 # Main project directory
β”‚   β”œβ”€β”€ settings.py         # Django settings
β”‚   β”œβ”€β”€ urls.py             # Main URL configuration
β”‚   └── wsgi.py             # WSGI configuration
β”œβ”€β”€ reciepe_app/            # Main application
β”‚   β”œβ”€β”€ models.py           # Recipe model definition
β”‚   β”œβ”€β”€ views.py            # View functions
β”‚   β”œβ”€β”€ urls.py             # App URL patterns
β”‚   β”œβ”€β”€ admin.py            # Admin configuration
β”‚   β”œβ”€β”€ templates/          # HTML templates
β”‚   β”‚   β”œβ”€β”€ index.html      # Homepage with recipe list
β”‚   β”‚   β”œβ”€β”€ login.html      # Login page
β”‚   β”‚   β”œβ”€β”€ register.html   # Registration page
β”‚   β”‚   β”œβ”€β”€ details.html    # Recipe details page
β”‚   β”‚   β”œβ”€β”€ update_recipe.html # Recipe creation/editing
β”‚   β”‚   β”œβ”€β”€ delete.html     # Recipe deletion confirmation
β”‚   β”‚   └── logout.html     # Logout confirmation
β”‚   └── static/             # Static files
β”‚       β”œβ”€β”€ css/
β”‚       └── js/
└── static/                 # Collected static files

Installation & Setup πŸ› οΈ

Prerequisites

  • Python 3.x
  • pip (Python package manager)

Installation Steps

  1. Clone the repository

    git clone https://github.com/alishankhan-coder/Recipe-Management-System.git
    cd "Recipe Site"
  2. Create virtual environment (recommended)

    python -m venv venv
    # On Windows:
    venv\Scripts\activate
    # On macOS/Linux:
    source venv/bin/activate
  3. Install dependencies

    pip install django
    pip install Pillow  # For image handling
  4. Run migrations

    python manage.py makemigrations
    python manage.py migrate
  5. Create superuser (optional, for admin access)

    python manage.py createsuperuser
  6. Run the development server

    python manage.py runserver
  7. Access the application

Usage Guide πŸ“–

For Users

  1. Registration: Visit the registration page to create a new account
  2. Login: Use your credentials to log into the system
  3. Browse Recipes: View all recipes on the homepage
  4. Search: Use the search bar to find specific recipes
  5. View Details: Click on any recipe to see full details
  6. Create Recipe: (Requires login) Add new recipes with images
  7. Edit Recipe: (Requires login) Update your existing recipes
  8. Delete Recipe: (Requires login) Remove recipes with confirmation

For Administrators

  1. Access Admin Panel: Login at /admin/ with superuser credentials
  2. Manage Users: View and manage user accounts
  3. Manage Recipes: Advanced recipe management with image previews
  4. View Statistics: Monitor recipe creation and user activity

Key Models πŸ—„οΈ

Recipe Model

  • recipe_name: Unique recipe name (max 40 characters)
  • recipe_disc: Recipe description (text field)
  • recipe_img: Recipe image upload
  • user: Foreign key to User model
  • slug: Auto-generated URL slug
  • recipe_created_at: Timestamp of creation
  • recipe_view_count: Number of views

URL Patterns 🌐

  • / - Homepage (recipe list)
  • /create/ - Create new recipe (login required)
  • /login/ - User login
  • /register/ - User registration
  • /logout/ - User logout
  • /details/<slug>/ - Recipe details
  • /update_recipe/<slug>/ - Edit recipe (login required)
  • /delete/<slug>/ - Delete confirmation
  • /delete_recipe/<slug>/ - Delete recipe (login required)

Security Features πŸ”’

  • CSRF Protection: Built-in Django CSRF protection
  • Authentication Required: Protected routes for recipe management
  • User-based Access: Users can only edit/delete their own recipes
  • Password Validation: Django's built-in password validators
  • Secure File Upload: Proper handling of uploaded images

Contributing 🀝

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License πŸ“„

This project is open source and available under the MIT License.

Contact πŸ“§

Screenshots πŸ“Έ

Screenshot (13) Screenshot (12) Screenshot (11) Screenshot (9) Screenshot (10)

Future Enhancements πŸš€

  • Recipe categories and tags
  • Recipe rating and reviews
  • Favorite recipes functionality
  • Recipe sharing via social media
  • Advanced search filters
  • Email notifications
  • Recipe print functionality
  • Mobile app development

About

A comprehensive Django-based web application for managing recipes with full user authentication and CRUD operations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published