A modern blogging platform inspired by Dev.to, built with React, Node.js, and Prisma.
├── server/ # Backend server
│ ├── config/ # Configuration files
│ ├── controllers/ # Request handlers
│ ├── dtos/ # Data Transfer Objects
│ ├── errors/ # Custom error handling
│ ├── middlewares/ # Express middlewares
│ ├── models/ # Database models
│ ├── prisma/ # Prisma ORM configuration
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ ├── shared/ # Shared utilities
│ ├── utils/ # Helper functions
│ ├── app.js # Main application file
│ └── package.json # Backend dependencies
├── react/ # Frontend React application
├── socket/ # WebSocket server
└── admin-panel/ # Admin dashboard
- Node.js
- Express.js
- Prisma ORM
- JWT Authentication
- MongoDB
- WebSocket
- React
- TypeScript
- SWR for data fetching
- Tailwind CSS
- Shadcn UI Components
- Node.js (v18 or higher)
- MongoDB
- npm or yarn
-
Navigate to the server directory:
cd server -
Install dependencies:
npm install
-
Set up environment variables: Create a
.envfile in the server directory with:DATABASE_URL="your_mongodb_connection_string" JWT_SECRET="your_jwt_secret" PORT=5000 -
Run database migrations:
npx prisma migrate dev
-
Start the development server:
npm run dev
-
Navigate to the react directory:
cd react -
Install dependencies:
npm install
-
Start the development server:
npm run dev
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userGET /api/auth/me- Get current user profile
GET /api/posts- Get all posts (paginated)GET /api/posts/:id- Get single postPOST /api/posts- Create new postPUT /api/posts/:id- Update postDELETE /api/posts/:id- Delete post
GET /api/posts/:postId/comments- Get post commentsPOST /api/posts/:postId/comments- Add commentDELETE /api/comments/:id- Delete comment
GET /api/tags- Get all tagsPOST /api/tags- Create new tagGET /api/tags/:id- Get tag details
GET /api/users- Get all usersGET /api/users/:id- Get user profilePUT /api/users/:id- Update user profilePOST /api/users/:id/follow- Follow userDELETE /api/users/:id/follow- Unfollow user
- User authentication and authorization
- Create, read, update, and delete blog posts
- Comment system
- Tag management
- User following system
- Real-time notifications
- Admin dashboard
- Responsive design
- Dark/Light mode
- 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
This project is licensed under the MIT License - see the LICENSE file for details.