A modern blogging platform built with TypeScript, Hono, SQL for the backend, and React for the frontend. This application allows users to create, read, update, and delete blog posts seamlessly. It aims to provide a similar experience to popular blogging platforms like Medium.
- User authentication using JWT.
- Create, read, update, and delete blog posts.
- Fetch all blog posts with pagination support.
- Responsive design for optimal viewing on various devices.
-
Frontend:
- React
- TypeScript
- CSS / Tailwind CSS (for styling)
-
Backend:
- TypeScript
- Hono (web framework)
- Prisma (ORM for SQL database)
- JWT (for authentication)
-
Database:
- SQL (PostgreSQL, MySQL, or any SQL-compliant database)
- Node.js (v14 or higher)
- A SQL database (PostgreSQL, MySQL, etc.)
- Environment variables for
DATABASE_URL
andJWT_SECRET
-
Clone the repository:
git clone https://github.com/your-username/blogging-website.git cd blogging-website
-
Install dependencies:
npm install
-
Set up environment variables: Create a .env file in the root directory of the project and add the following variables:
DATABASE_URL=your_database_connection_string JWT_SECRET=your_jwt_secret
-
Run the application:
For development:
npm run dev
-
For production:
npm run build npm start
-
API Endpoints POST / - Create a new blog post. PUT / - Update an existing blog post. GET /bulk - Fetch all blog posts. GET /
- Fetch a specific blog post by ID. Usage Navigate to the application in your browser to access the blogging platform. Use the API endpoints to interact with the backend. Contributing Contributions are welcome! Please feel free to submit a pull request or open an issue to discuss improvements or features.
License This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments Inspiration from various blogging platforms. Thanks to the open-source community for their valuable resources.