A modern, full-stack web application for poetry enthusiasts to share, discover, and engage with poetry. Built with the MERN stack and modern web technologies.
- React 18 - Modern React with hooks and concurrent features
- JavaScript (ES2022+) - Latest JavaScript features
- Tailwind CSS 3 - Utility-first CSS framework
- React Router v6 - Client-side routing
- Axios - HTTP client for API requests
- React Hook Form - Performant forms with easy validation
- Framer Motion - Smooth animations and transitions
- Node.js 18+ - JavaScript runtime
- Express.js 4 - Fast, unopinionated web framework
- MongoDB 6 - NoSQL database
- Mongoose 7 - MongoDB object modeling
- JWT - JSON Web Tokens for authentication
- bcryptjs - Password hashing
- multer - File upload handling
- express-validator - Input validation middleware
- npm - Package manager
- Vite - Fast build tool and dev server
- ESLint - Code linting
- Prettier - Code formatting
- nodemon - Development server auto-restart
- User registration and authentication
- Profile creation and customization
- Password reset functionality
- User dashboard
- Create, edit, and delete poems
- Rich text editor for poem composition
- Poetry categories and tags
- Search and filter poems
- Featured poems section
- Like and comment on poems
- Follow other poets
- User activity feed
- Poetry collections/favorites
- Share poems on social media
- Responsive design for all devices
- Dark/light theme toggle
- Real-time notifications
- Poetry reading statistics
- Admin panel for content moderation
Before running this project, make sure you have:
- Node.js (v18.0.0 or higher)
- npm (v8.0.0 or higher)
- MongoDB (v6.0 or higher)
- Git
git clone https://github.com/yourusername/poetry-sharing-forum.git
cd poetry-sharing-forumcd backend
npm installcd ../frontend
npm installCreate .env files in both frontend and backend directories:
NODE_ENV=development
PORT=5000
MONGO_URI=mongodb://localhost:27017/poetry_forum
JWT_SECRET=your_jwt_secret_key_here
JWT_EXPIRE=30d
CLOUDINARY_CLOUD_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
EMAIL_SERVICE=gmail
EMAIL_USERNAME=[email protected]
EMAIL_PASSWORD=your_app_passwordVITE_API_URL=http://localhost:5000/api
VITE_APP_NAME=Poetry Sharing ForumMake sure MongoDB is running on your system:
# Start MongoDB service
sudo systemctl start mongod # Linux
brew services start mongodb-community # macOScd backend
npm run devThe backend will run on http://localhost:5000
cd frontend
npm run devThe frontend will run on http://localhost:3000
cd frontend
npm run buildcd backend
npm startpoetry-sharing-forum/
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── hooks/
│ │ ├── context/
│ │ ├── utils/
│ │ ├── services/
│ │ └── styles/
│ ├── package.json
│ └── vite.config.js
├── backend/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── middleware/
│ ├── utils/
│ ├── config/
│ └── package.json
└── README.md
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logoutPOST /api/auth/forgot-password- Password reset requestPUT /api/auth/reset-password/:token- Reset password
GET /api/users/profile- Get user profilePUT /api/users/profile- Update user profileGET /api/users/:id- Get user by IDPOST /api/users/follow/:id- Follow/unfollow user
GET /api/poems- Get all poems (with pagination)POST /api/poems- Create new poemGET /api/poems/:id- Get poem by IDPUT /api/poems/:id- Update poemDELETE /api/poems/:id- Delete poemPOST /api/poems/:id/like- Like/unlike poemPOST /api/poems/:id/comment- Add comment
- PoemCard - Display individual poems
- PoemEditor - Rich text editor for creating poems
- UserProfile - User profile display
- SearchBar - Search functionality
- Navigation - Responsive navigation bar
- ThemeToggle - Dark/light mode switcher
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint errorsnpm start # Start production server
npm run dev # Start development server with nodemon
npm run seed # Seed database with sample data
npm test # Run tests- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- React team for the amazing framework
- MongoDB team for the flexible database
- Tailwind CSS for the utility-first approach
- All contributors and poetry enthusiasts
If you have any questions or need help, please:
- Open an issue on GitHub
- Contact us at [email protected]
- Join our Discord community
Happy Poetry Sharing! 📝✨