A modern, full-stack blog and chat web application built with Flask, MongoDB, and Socket.IO. This project features user authentication, real-time chat, friend requests, blog posting, comments, upvotes/downvotes and notifications.
- User registration and login
- Create, edit, and delete blog posts
- Comment on blogs
- Upvote and downvote blogs
- Real-time private and global chat with friends
- Friend request system with autocomplete
- Profile management (username, gender, avatar)
- Notification dropdown for new messages and friend requests
- Responsive, modern UI with Bootstrap 5
The app is deployed and available at: https://demoblog-vrdg.onrender.com/
- Python 3.8+
- MongoDB (local or Atlas)
-
Clone the repository:
git clone https://github.com/yourusername/Blog_App.git cd Blog_App
-
Create a virtual environment and activate it:
python -m venv venv venv\Scripts\activate # On Windows # or source venv/bin/activate # On Mac/Linux
-
Install dependencies:
pip install -r requirements.txt
-
Set environment variables: Create a
.env
file or set these in your environment:SECRET_KEY=your_secret_key_here
MONGO_URI=your_mongodb_uri_here
-
Run the app locally:
python app.py
Or for Socket.IO support:
python -m flask run # or flask run
-
Access the app: Open http://localhost:5000 in your browser.
This app is deployed on Render. You can deploy it to any cloud provider that supports Python and MongoDB.
app.py
- Main Flask applicationstatic/
- Static files (CSS, JS, images)templates/
- Jinja2 HTML templatesrequirements.txt
- Python dependenciesProcfile
- For deployment (e.g., Gunicorn)
- Never commit your real MongoDB credentials or secret keys.
- Use environment variables for all sensitive information.
- The
.gitignore
is set up to exclude local databases, credentials, and virtual environments.
This project is open source and available under the MIT License.
Deployed at: https://demoblog-vrdg.onrender.com/
Feel free to contribute or open issues!