Skip to content

A Django-based application for managing recipes with user authentication, allowing for the addition, update, and deletion of recipes. Features include searchable and filterable recipe listings, with a responsive frontend designed using Bootstrap.

Notifications You must be signed in to change notification settings

shashankssp12/FlavorFrame-Django-Authenticated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍽️ FlavorFrame - Recipe Management Application

Welcome to FlavorFrame, a recipe management application I built using Django! This project allows users to create, manage, and organize their favorite recipes with ease. I wanted to create a platform where users could store recipes digitally with images and access them from anywhere. FlavorFrame provides a simple yet effective way to build your own personal cookbook.

FlavorFrame Demo

πŸ› οΈ Tech Stack

Technology Name
HTML5
CSS3
Bootstrap 5
Django 5.1.3
SQLite (dev)
PostgreSQL (prod)
Cloudinary
Vercel
Git
GitHub

πŸ“ Project Structure

FlavorFrame/
β”œβ”€β”€ core/                 # Django project configuration
β”‚   β”œβ”€β”€ settings.py       # Settings including database & Cloudinary config
β”‚   β”œβ”€β”€ urls.py           # URL routing
β”‚   └── wsgi.py           # WSGI configuration
β”œβ”€β”€ FlavorFrame/          # Main application
β”‚   β”œβ”€β”€ migrations/       # Database migrations
β”‚   β”œβ”€β”€ templates/        # HTML templates
β”‚   β”œβ”€β”€ models.py         # Data models (Recipe)
β”‚   └── views.py          # View functions
β”œβ”€β”€ home/                 # Home application
β”‚   β”œβ”€β”€ templates/        # Home page templates
β”‚   └── views.py          # Home views
β”œβ”€β”€ media/                # Local media storage (development)
β”œβ”€β”€ .gitignore            # Git ignore file
β”œβ”€β”€ requirements.txt      # Project dependencies
β”œβ”€β”€ manage.py             # Django management script
└── vercel.json           # Vercel deployment configuration

✨ Features

  • πŸ” User Authentication: Register, login, and secure account management
  • πŸ“ Recipe Management: Create, read, update, and delete recipes
  • πŸ–ΌοΈ Image Upload: Add images to recipes using Cloudinary integration
  • πŸ“± Responsive Design: Mobile-friendly interface built with Bootstrap

πŸ“Έ Application Pages

Home Page

Home Page

Login Page

Login Page

Registration Page

Registration Page

Recipes Dashboard

Recipes Dashboard

Add/Edit Recipe Page

Add/Edit Recipe Page

Setup Guide

Local Development

  1. Clone the repository

    git clone https://github.com/yourusername/FlavorFrame-Django-Authenticated.git
    cd FlavorFrame-Django-Authenticated
  2. Create a virtual environment

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

    pip install -r requirements.txt
  4. Set up environment variables Create a .env file in the project root with:

    SECRET_KEY=your_secret_key
    DEBUG=True
    
  5. Run migrations

    python manage.py migrate
  6. Start the development server

    python manage.py runserver
  7. Access the application Open http://127.0.0.1:8000/ in your browser

☁️ Cloudinary Setup

  1. Create a Cloudinary account

    • Sign up at cloudinary.com
    • Note your cloud name, API key, and API secret
  2. Add Cloudinary credentials to your .env file

    CLOUDINARY_CLOUD_NAME=your_cloud_name
    CLOUDINARY_API_KEY=your_api_key
    CLOUDINARY_API_SECRET=your_api_secret
    

🚒 Deployment to Vercel

  1. Create a PostgreSQL database on Render

    • Sign up at render.com
    • Create a new PostgreSQL database
    • Note the connection details
  2. Create a Vercel account and install Vercel CLI

    npm install -g vercel
  3. Run migrations on your production database Temporarily update your settings.py to connect to your Render database and run:

    python manage.py migrate
  4. Configure Vercel deployment

    • Create vercel.json in your project root
    • Add environment variables in the Vercel dashboard:
      • DB_NAME, DB_USER, DB_PASSWORD, DB_HOST, DB_PORT
      • CLOUDINARY credentials
      • SECRET_KEY
  5. Deploy to Vercel

    vercel

🧩 Challenges and Solutions

One of the major challenges I faced during this project was deploying to Vercel with a working database connection. The serverless nature of Vercel created several obstacles:

  1. SQLite Database Issues: Initially, I tried to use SQLite, but Vercel's read-only filesystem prevented write operations to the database file.

  2. MySQL Connection Problems: Next, I attempted to use MySQL, but had connectivity issues from Vercel's environment.

  3. PostgreSQL Integration: Finally, I set up a PostgreSQL database on Render and configured Django to connect to it when running on Vercel.

  4. Migration Challenges: The most persistent issue was getting database migrations to run on the production database. The error logs from Vercel were crucial in diagnosing that tables weren't being created.

I enjoyed the deployment process despite the challenges. Working through error after error in the Vercel logs, I gained a deeper understanding of how Django connects to databases in different environments. When I finally identified that the missing database tables were the root issue, the relief was immense! This experience taught me so much about cloud deployment and database configuration.

πŸš€ Future Improvements

I have several ideas to enhance FlavorFrame in the future:

  • 🏷️ Recipe Categories: Add the ability to categorize recipes (desserts, main dishes, etc.)
  • πŸ” Search Functionality: Implement a robust search feature to find recipes by ingredient or name
  • πŸ‘€ User Profiles: Create public/private user profiles with avatar images
  • πŸ”— Recipe Sharing: Allow users to share recipes with others via links or social media
  • ⭐ Rating System: Add the ability for users to rate their own recipes or favorites
  • πŸ”„ API Integration: Connect with external recipe APIs to import recipes
  • πŸ“… Meal Planning: Add calendar integration for meal planning
  • πŸ›’ Shopping List: Generate shopping lists based on selected recipes
  • βš–οΈ Recipe Scaling: Add functionality to scale recipe ingredients up or down

πŸ’» Possible Technical Improvements

  • πŸ§ͺ Add Testing: Implement unit and integration tests
  • ⚑ Implement Caching: Use Redis for improved performance
  • πŸ–ΌοΈ Optimize Images: Add automatic image optimization
  • πŸ”„ Add CI/CD: Set up continuous integration and deployment
  • πŸ”Œ Refactor to DRF: Convert to Django Rest Framework for a more robust API
  • βš›οΈ Frontend Framework: Integrate React or Vue for a more dynamic UI

I hope you enjoy exploring FlavorFrame as much as I enjoyed building it! If you have any questions or suggestions, please feel free to reach out or open an issue on GitHub.

Feel free to create a pull request if you'd like to contribute to FlavorFrame. Thank you for checking out my project! πŸ™

About

A Django-based application for managing recipes with user authentication, allowing for the addition, update, and deletion of recipes. Features include searchable and filterable recipe listings, with a responsive frontend designed using Bootstrap.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published