This project is a blog website similar to Medium, built with React for the frontend and Cloudflare Workers for the backend. It utilizes TypeScript, Prisma, PostgreSQL, and JWT for authentication.
- React
- TypeScript
- Tailwind CSS (for styling)
- React Icons
- React Toastify (for notifications)
- Zod (for validation)
- Cloudflare Workers
- TypeScript
- Prisma (ORM with connection pooling)
- PostgreSQL (as the database)
- JWT (for authentication)
- User authentication using JWT
- CRUD operations for blog posts
- Real-time updates powered by Cloudflare Workers
- Backend type validation using Zod
Ensure you have the following installed:
- Node.js (v14 or higher)
- PostgreSQL database
-
Clone the repository:
git clone https://github.com/Piyush5784/Medium-blog.git
-
Navigate to the project directory:
cd medium
-
Install dependencies (Frontend to be added later):
cd backend npm install # or yarn install
-
Set up environment variables: Create a
.env
file in the root directory and add the following variables:DATABASE_URL=your_postgres_database_url JWT_SECRET=your_jwt_secret
Start the development server:
npm run dev
Now, you’re ready to build and explore the Medium Blog project! 🚀