A full-stack blog application built with React and Flask, featuring a clean and intuitive user interface for creating, reading, updating, and deleting blog posts. This application provides a seamless experience for both bloggers and readers with its modern design and robust functionality.
- Secure login and registration system with JWT tokens
- Protected routes and session management
- Email validation and password security
- Create, edit, and delete blog posts
- Image upload and preview functionality
- Responsive grid layout for blog listing
- Real-time content editing
- Responsive design for all devices
- Clean and intuitive interface
- Loading states and error handling
- Smooth navigation and transitions
- React.js 18 with functional components and hooks
- React Router v6 for navigation
- Axios for API requests
- Tailwind CSS for styling
- Flask (Python) with RESTful API
- SQLAlchemy for database operations
- SQLite database
- Flask-CORS for cross-origin requests
- Python 3.8 or higher
- Node.js 14 or higher
- npm or yarn
- Git
- Clone and Setup:
git clone https://github.com/yourusername/blogify.git
cd blogify
- Backend Setup:
cd server
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
- Configure Environment:
Create
.env
in server directory:
FLASK_APP=app.py
FLASK_ENV=development
SECRET_KEY=your-secret-key
DATABASE_URL=sqlite:///blog.db
- Frontend Setup:
cd client
npm install
npm run dev
- Access the Application:
Open your browser and navigate to
http://localhost:5173
blogify/
├── client/ # Frontend React application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── config.js # Configuration settings
│ │ └── App.jsx # Main application component
│ └── package.json
│
└── server/ # Backend Flask application
├── app.py # Main Flask application
├── models/ # Database models
├── routes/ # API routes
└── uploads/ # Image upload directory
POST /api/register
- Register a new userPOST /api/login
- User login
GET /api/blogs
- Get all blog postsGET /api/blog/<id>
- Get a specific blog postPOST /api/submit
- Create a new blog postPUT /api/blog/<id>/edit
- Update a blog postDELETE /api/blog/<id>
- Delete a blog post
We welcome contributions to improve Blogify! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Follow the existing code style
- Write meaningful commit messages
- Add tests for new features
- Update documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Made with 💖 by Rishabh Dhawad