A full-featured tech blog platform built with Flask (backend), React.js (frontend), and PostgreSQL. Features include user authentication, post creation/editing, voting, comments, and more.
Page for viewing and searching all blog posts
Page for viewing a single blog post with comments
User profile page with post history
cpt_anything_blog/
├── backend/
│ ├── app.py
│ ├── models.py
│ ├── routes.py
│ ├── config.py
│ ├── requirements.txt
│ ├── .env
│ └── migrations/
├── frontend/
│ ├── public/
│ │ ├── index.html
│ │ └── img/
│ ├── src/
│ │ ├── App.js
│ │ ├── components/
│ │ ├── context/
│ │ ├── services/
│ │ └── index.js
│ ├── styles/
│ ├── package.json
│ └── .env
├── README.md
└── docker-compose.yml
-
Navigate to the
backend
directory:cd backend
-
Install dependencies:
pip install -r requirements.txt
-
⚙️ Set up the database connection in
config.py
, and configure any environment variables you might need. -
📦 Make initial database migrations:
flask db init # Only once, to initialize migrations folder flask db migrate -m "initial migration" flask db upgrade
-
Navigate to the
frontend
directory:cd frontend
-
Install dependencies:
npm install
-
🚀 Start the React application:
npm start
- ✅ User registration, login, and JWT authentication
- 📝 Create, edit, and delete blog posts
- 🗳️ Upvote/downvote posts
- 💬 Comment on posts (with delete support)
- 🔍 Search and filter posts by tags
- 🏷️ Tag support (with automatic formatting)
- 👤 User profile and post history
- 🖼️ Responsive, modern UI with modals and loading overlays
- 🛡️ Secure API endpoints
Frontend (frontend/.env
):
REACT_APP_API_URL=http://localhost:5000/api
Backend (backend/.env
):
DATABASE_URL=your_database_url
SECRET_KEY=your_secret_key
JWT_SECRET_KEY=your_jwt_secret_key
MAIL_USERNAME=[email protected]
MAIL_PASSWORD=your_email_password
This project is licensed under the MIT License.