A comprehensive platform for wine, cocktail, and spirit enthusiasts to discover, review, and share their experiences with beverages and venues.
- User Authentication: Secure login/register with JWT tokens
- Beverage Management: Add, edit, and categorize wines, cocktails, and spirits
- Review System: Rate and review beverages with detailed feedback
- Search & Discovery: Advanced search with filters and recommendations
- User Profiles: Personal profiles with review history and preferences
- Follow System: Follow other users and see their activity
- Like System: Like and unlike reviews
- Comments: Comment on reviews with threaded discussions
- Activity Feed: Real-time user activity updates
- User Search: Find and connect with other users
- Photo Uploads: Upload and manage photos for reviews and beverages
- Venue Integration: Add venues, check-ins, and location-based features
- Notification System: Real-time notifications for social interactions
- Admin Dashboard: Complete administrative tools and content moderation
- User Management: Ban/unban users, manage roles and verification
- Content Moderation: Approve/reject beverage submissions
- Audit Logging: Complete tracking of administrative actions
- System Analytics: Platform statistics and performance metrics
- Admin Interface: Responsive admin dashboard with sidebar navigation
- Fastify: High-performance web framework
- Prisma ORM: Type-safe database access
- PostgreSQL: Robust relational database
- JWT: Secure authentication
- Multer: File upload handling
- Sharp: Image optimization
- React 18: Modern UI library
- Vite: Fast build tool
- Tailwind CSS: Utility-first styling
- React Router: Client-side routing
- React Query: Server state management
- React Hot Toast: User notifications
- TypeScript: Type safety across the stack
- ESLint: Code quality and consistency
- Prettier: Code formatting
- Monorepo: Shared packages and types
drinks-review-system/
βββ apps/
β βββ api/ # Fastify backend
β β βββ src/
β β β βββ routes/ # API endpoints
β β β βββ middleware/ # Auth, validation
β β β βββ index.js # Server entry
β βββ web/ # React frontend
β βββ src/
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ contexts/ # React contexts
β β βββ App.jsx # App entry
βββ packages/
β βββ database/ # Prisma schema
β βββ types/ # Shared TypeScript types
β βββ utils/ # Shared utilities
βββ docs/ # Documentation
- Node.js 18+
- PostgreSQL 14+
- npm or yarn
-
Clone the repository
git clone <repository-url> cd drinks-review-system
-
Install dependencies
npm install
-
Set up environment variables
cp apps/api/.env.example apps/api/.env cp apps/web/.env.example apps/web/.env
-
Configure database
# Update database URL in apps/api/.env DATABASE_URL="postgresql://username:password@localhost:5432/drinks_review"
-
Run database migrations
npm run db:migrate
-
Start development servers
# Terminal 1: Start backend npm run dev:api # Terminal 2: Start frontend npm run dev:web
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
- Admin Dashboard: http://localhost:5173/admin
POST /auth/register
- User registrationPOST /auth/login
- User loginGET /auth/profile
- Get user profilePUT /auth/profile
- Update user profile
GET /beverages
- List beverages with filtersPOST /beverages
- Create new beverageGET /beverages/:id
- Get beverage detailsPUT /beverages/:id
- Update beverageDELETE /beverages/:id
- Delete beverage
GET /reviews
- List reviews with filtersPOST /reviews
- Create new reviewGET /reviews/:id
- Get review detailsPUT /reviews/:id
- Update reviewDELETE /reviews/:id
- Delete review
POST /social/follow/:userId
- Follow userDELETE /social/follow/:userId
- Unfollow userPOST /social/like/:reviewId
- Like reviewDELETE /social/like/:reviewId
- Unlike reviewPOST /social/comment
- Add commentGET /social/followers/:userId
- Get user followersGET /social/following/:userId
- Get user following
GET /venues
- List venues with filtersPOST /venues
- Create new venueGET /venues/:id
- Get venue detailsPUT /venues/:id
- Update venueDELETE /venues/:id
- Delete venuePOST /venues/:id/checkin
- Check in to venue
GET /notifications
- Get user notificationsPUT /notifications/:id/read
- Mark notification as readGET /notifications/preferences
- Get notification preferencesPUT /notifications/preferences
- Update notification preferences
GET /admin/dashboard
- Get admin dashboard statsGET /admin/users
- List users with filtersPUT /admin/users/:userId
- Update user (ban/unban, roles)GET /admin/beverages/pending
- Get pending beverage approvalsPUT /admin/beverages/:id/approve
- Approve/reject beverageGET /admin/audit-logs
- Get audit logsDELETE /admin/content/:type/:id
- Delete content
POST /upload/image
- Upload image with optimizationDELETE /upload/image/:filename
- Delete uploaded image
# Run all tests
npm test
# Run backend tests only
npm run test:api
# Run frontend tests only
npm run test:web
# Run tests with coverage
npm run test:coverage
- Unit Tests: Individual component and function testing
- Integration Tests: API endpoint and database testing
- End-to-End Tests: Complete user journey testing
- Set production environment variables
- Configure database for production
- Set up file storage (S3, Cloudflare, etc.)
- Configure domain and SSL certificates
- Vercel: Full-stack deployment
- Railway: Easy deployment with PostgreSQL
- Render: Static site + API deployment
- DigitalOcean: VPS deployment
- Docker: Containerized deployment
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new features
- Submit a pull request
This project is licensed under the MIT License.
For support and questions:
- Create an issue in the repository
- Check the documentation in
/docs
- Review the API documentation
Built with β€οΈ for the beverage community