A full-stack blogging platform similar to Medium, allowing users to sign up, create blogs, view others' blogs, and manage their profiles.
- User Authentication: Sign up and Sign in functionality.
- Create & Publish Blogs: Users can create and publish their own blogs.
- View Blogs: Users can view blogs posted by others.
- Delete Blogs: Authors can delete their own blogs (only if the blog's
userIdmatches the authenticated user'sid). - Profile Management: View user profiles to see published blogs.
- Vite for fast development.
- React with TypeScript for type-safe component development.
- Hono for building lightweight and fast APIs.
- PostgreSQL as the relational database.
- Prisma ORM for database interaction.
- Connection Pooling to optimize database connections and performance.
- Install dependencies:
cd backend
npm install- Set up environment variables in
.envfile:
DATABASE_URL="your_postgres_connection_url"
JWT_SECRET="your_jwt_secret"
- Add in your wrangler.jsonc file:
DATABASE_URL="your_postgres_connection-pool_url"
JWT_SECRET="your_jwt_secret"
- Run database migrations:
npx prisma migrate dev- Start the backend server:
npm run dev- Install dependencies:
cd frontend
npm install- Start the development server:
npm run dev- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit your changes (
git commit -m 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Open a pull request.
This project is licensed under the MIT License.
Feel free to contribute and enhance the platform!