For Stakeholders and Developers
A modern blog platform built with Flask, featuring AI-powered content generation, social media repurposing, and a beautiful user interface.
Note: This documentation serves both stakeholders looking for product information and developers setting up or contributing to the project. For customer-facing product details, see PRODUCT.md. For technical deep-dives, see DOCUMENT.md.
- 📝 Rich Blog Editor: Markdown support with live preview
 - 🤖 AI Integration: Powered by Google Gemini for content generation
 - 🔄 Social Media Repurposing: Convert blogs to LinkedIn posts and Twitter threads
 - 🏷️ Tag System: Organize content with customizable tags
 - 🔍 Search Functionality: Find blogs by title, description, or tags
 - 📱 Responsive Design: Beautiful UI that works on all devices
 - 💾 Auto-save: Automatic saving while editing
 - 📊 Draft System: Save and manage draft posts
 - 👥 Multi-user: Support for multiple authors
 
- Python 3.8 or higher
 - pip3
 
- 
Clone the repository
git clone <repository-url> cd BlogForge
 - 
Run the setup script
./start.sh
This will:
- Create a virtual environment
 - Install all dependencies
 - Initialize the database
 - Set up the project structure
 
 - 
Configure your environment Edit
.flaskenvand update:SECRET_KEY: Generate a secure secret keyGEMINI_API_KEY: Get your API key from Google AI Studio
 - 
Start the application
./run.sh
 - 
Open your browser Navigate to
http://localhost:5000 
If you prefer to set up manually:
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Initialize database
flask db init
flask db migrate -m "Initial migration"
flask db upgrade
# Start the application
flask runBlogForge/
├── app/
│   ├── __init__.py          # Flask app initialization
│   ├── models.py            # Database models
│   ├── ai/                  # AI-related routes
│   ├── main/                # Main application routes
│   ├── posts/               # Blog post routes
│   ├── templates/           # HTML templates
│   └── static/              # CSS, JS, and assets
├── migrations/              # Database migrations
├── uploads/                 # File uploads
├── start.sh                 # Setup script
├── run.sh                   # Run script
├── requirements.txt         # Python dependencies
└── README.md               # This file
Create a .flaskenv file with the following variables:
FLASK_APP=app
FLASK_ENV=development
SECRET_KEY=your-secret-key-here
DATABASE_URL=sqlite:///blogforge.db
GEMINI_API_KEY=your-gemini-api-key-hereThe application uses SQLite by default. To use a different database:
- Update 
DATABASE_URLin.flaskenv - Run 
flask db upgradeto apply migrations 
- Visit Google AI Studio
 - Create a new API key
 - Add it to your 
.flaskenvfile 
- Click "New Post" in the sidebar
 - Write your content in Markdown
 - Add tags to categorize your post
 - Click "Save" to publish
 
When editing a post, you can:
- Repurpose to LinkedIn: Convert your blog to a LinkedIn post
 - Generate Tweet Thread: Create a Twitter thread from your blog
 - Auto-save: Your changes are automatically saved every 15 seconds
 
Use the search bar in the header (Feed page only) to find blogs by:
- Title
 - Description
 - Tags
 - Author
 
source .venv/bin/activate
flask run --debug# Create a new migration
flask db migrate -m "Description of changes"
# Apply migrations
flask db upgrade- Create new routes in the appropriate blueprint
 - Add templates in the 
templates/directory - Update the database models if needed
 - Create and apply migrations
 
- 
Virtual environment not found
./start.sh
 - 
Database errors
flask db upgrade
 - 
Missing dependencies
pip install -r requirements.txt
 - 
API key errors
- Check your 
.flaskenvfile - Verify your Gemini API key is valid
 
 - Check your 
 
Check the console output for error messages. The application logs important events and errors.
- Fork the repository
 - Create a feature branch
 - Make your changes
 - Test thoroughly
 - Submit a pull request
 
This project is open source and available under the MIT License.
For issues and questions:
- Check the troubleshooting section
 - Review the logs for error messages
 - Create an issue in the repository
 
Happy Blogging! 🚀