https://github.com/goyam02/flask_blog
Flask_Blog is a web application built using Flask, a lightweight web framework in Python. It is designed for users to create, edit, and share blog posts seamlessly.
https://github.com/goyam02/flask_blog
blog bootstrap css database flask form forms html javascript post python sqlalchemy sqlalchemy-python templates user-authentication virtualenv
Last synced: about 2 months ago
JSON representation
Flask_Blog is a web application built using Flask, a lightweight web framework in Python. It is designed for users to create, edit, and share blog posts seamlessly.
- Host: GitHub
- URL: https://github.com/goyam02/flask_blog
- Owner: Goyam02
- Created: 2025-01-26T06:49:29.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-05T17:32:33.000Z (over 1 year ago)
- Last Synced: 2025-02-05T18:47:23.406Z (over 1 year ago)
- Topics: blog, bootstrap, css, database, flask, form, forms, html, javascript, post, python, sqlalchemy, sqlalchemy-python, templates, user-authentication, virtualenv
- Language: HTML
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π Flask Blog
A full-featured blogging application built with Flask, featuring user authentication, password reset, profile management, pagination, and CRUD functionality for blog posts.

# π Features
β
User Authentication (Register, Login, Logout)
β
Profile Management (Update profile picture & username)
β
Password Reset via Email
β
CRUD for Blog Posts (Create, Read, Update, Delete)
β
Pagination for Posts
β
User-Specific Post Feed
β
Secure Password Hashing with Bcrypt
β
Flask-Mail for Email Notifications
# π Project Structure
```
Flask_Blog/
βββ flaskblog/
β βββ __init__.py # Initialize Flask app & extensions
β βββ routes.py # App routes (login, register, posts, etc.)
β βββ models.py # Database models (User, Post)
β βββ forms.py # Flask-WTF forms for authentication & posts
β βββ static/ # Static assets (CSS, images)
β βββ templates/ # HTML templates
β βββ layout.html # Main template structure
β βββ login.html # User login page
β βββ register.html # User registration page
β βββ post.html # Individual post page
β βββ user_post.html # Posts by a specific user
β βββ reset_request.html # Request password reset page
β βββ reset_token.html # Reset password page
β βββ about.html # About page
β βββ account.html # User profile page (edit details & change profile picture)
β βββ create_post.html # Page to create a new blog post
β βββ home.html # Home page displaying blog posts
β βββ main.html # Base template extended by other templates
β
β βββ site.db # SQLite database (ignored in .gitignore)
βββ config.py # Application configuration (environment variables)
βββ run.py # Entry point for running the app
βββ requirements.txt # Dependencies
βββ screenshots/ # β
Screenshots folder for README
β βββ account.png
β βββ login.png
β βββ register.png
β βββ home.png
βββ .gitignore # Prevents sensitive files from being committed
βββ README.md # Project documentation
```
# β‘ Installation & Setup
1οΈβ£ Clone the Repository
``` bash
git clone https://github.com/yourusername/Flask_Blog.git
cd Flask_Blog
```
2οΈβ£ Create a Virtual Environment
```bash
python -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windows
```
3οΈβ£ Install Dependencies
```bash
pip install -r requirements.txt
```
4οΈβ£ Set Up Environment Variables
```bash
SECRET_KEY=your-secret-key
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-email-app-password
```
Or set them manually:
```bash
export SECRET_KEY="your-secret-key"
export EMAIL_USER="your-email@gmail.com"
export EMAIL_PASS="your-email-app-password"
```
5οΈβ£ Initialize the Database
```bash
flask db init
flask db migrate -m "Initial migration"
flask db upgrade
```
6οΈβ£ Run the Application
```bash
python run.py
```
# πΈ Screenshots
### πΉ Login Page

### πΉ Register Page

### πΉ Home Page

### πΉ Account Page

# π§ Technologies Used
β’ Flask (Backend Framework)
β’ Flask-SQLAlchemy (ORM for Database)
β’ Flask-WTF (Forms & Validation)
β’ Flask-Mail (Sending Emails)
β’ Flask-Login (User Authentication)
β’ Bcrypt (Password Hashing)
β’ SQLite (Database)
β’ Bootstrap (Frontend Styling)
# π Future Improvements
πΉ Add a comment system
πΉ Implement a like/upvote feature for posts
πΉ Improve UI with a modern CSS framework
πΉ Enable image uploads for posts
# π License
This project is licensed under the [MIT License](https://github.com/Goyam02/Flask_Blog/blob/master/LICENSE). You are free to use and modify it as per your needs.
# β Contributing
1. Fork the repository
2. Create a new branch (git checkout -b feature-branch)
3. Commit changes (git commit -m "Added new feature")
4. Push to GitHub (git push origin feature-branch)
5. Open a Pull Request π
# π¬ Contact
π€ Goyam Jain
π§ goyamjain02@gmail.com
π [LinkedIn](https://www.linkedin.com/in/goyam02)
# π If you found this project useful, donβt forget to give it a star! β