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.
Technology | Name |
---|---|
HTML5 | |
CSS3 | |
Bootstrap 5 | |
Django 5.1.3 | |
SQLite (dev) | |
PostgreSQL (prod) | |
Cloudinary | |
Vercel | |
Git | |
GitHub |
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
- π 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
-
Clone the repository
git clone https://github.com/yourusername/FlavorFrame-Django-Authenticated.git cd FlavorFrame-Django-Authenticated
-
Create a virtual environment
python -m venv venv venv\Scripts\activate # Windows # source venv/bin/activate # macOS/Linux
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.env
file in the project root with:SECRET_KEY=your_secret_key DEBUG=True
-
Run migrations
python manage.py migrate
-
Start the development server
python manage.py runserver
-
Access the application Open http://127.0.0.1:8000/ in your browser
-
Create a Cloudinary account
- Sign up at cloudinary.com
- Note your cloud name, API key, and API secret
-
Add Cloudinary credentials to your
.env
fileCLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret
-
Create a PostgreSQL database on Render
- Sign up at render.com
- Create a new PostgreSQL database
- Note the connection details
-
Create a Vercel account and install Vercel CLI
npm install -g vercel
-
Run migrations on your production database Temporarily update your
settings.py
to connect to your Render database and run:python manage.py migrate
-
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
- Create
-
Deploy to Vercel
vercel
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:
-
SQLite Database Issues: Initially, I tried to use SQLite, but Vercel's read-only filesystem prevented write operations to the database file.
-
MySQL Connection Problems: Next, I attempted to use MySQL, but had connectivity issues from Vercel's environment.
-
PostgreSQL Integration: Finally, I set up a PostgreSQL database on Render and configured Django to connect to it when running on Vercel.
-
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.
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
- π§ͺ 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! π