A complete service marketplace platform for connecting customers with local service providers. Built with modern web technologies and containerized for easy deployment.
- Task Posting: Customers can post tasks with photos, location, and budget
- Provider Offers: Providers can submit offers for tasks
- Real-time Messaging: In-app chat with Socket.IO
- Payment Processing: Stripe integration with mock fallback
- Service Listings: Providers can create and manage service offerings
- Reviews & Ratings: Post-booking review system
- Favorites: Save services for later
- File Uploads: Image uploads for tasks, services, and profiles
- Customers: Post tasks, book services, manage bookings
- Providers: Submit offers, create services, manage availability
- Admin: Platform management and moderation
- Node.js + Express (ESM modules)
- MongoDB with Mongoose
- Socket.IO for real-time messaging
- Stripe for payments (with mock fallback)
- Multer for file uploads
- Express Validator for input validation
- JWT for authentication
- React 18 + Vite
- Tailwind CSS for styling
- React Router for navigation
- React Hook Form + Zod for forms
- Socket.IO Client for real-time features
- React Hot Toast for notifications
- Date-fns for date handling
- Docker + Docker Compose
- MongoDB container
- Nginx for frontend serving
- Mailpit for email testing (optional)
- Docker and Docker Compose
- Git
git clone <repository-url>
cd on-demand-skills-app# Build and start all services
docker-compose up --build
# Or run in background
docker-compose up --build -d# Seed with demo data
docker-compose exec backend npm run seed- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- API Health: http://localhost:5000/api/health
- Mailpit (if enabled): http://localhost:8025
After seeding the database, you can use these accounts:
- Email: admin@example.com
- Password: password123
- Role: Admin (full platform access)
- Email: provider1@example.com
- Password: password123
- Role: Provider (can create services and submit offers)
- Additional: provider2@example.com, provider3@example.com, etc.
- Email: customer1@example.com
- Password: password123
- Role: Customer (can post tasks and book services)
- Additional: customer2@example.com, customer3@example.com
The application uses the following environment variables (configured in docker-compose.yml):
PORT: Backend server port (default: 5000)JWT_SECRET: Secret key for JWT tokensMONGO_URI: MongoDB connection stringFRONTEND_URL: Frontend URL for CORS and redirects
STRIPE_SECRET_KEY: Stripe secret key for paymentsSTRIPE_WEBHOOK_SECRET: Stripe webhook secretCLOUDINARY_URL: Cloudinary URL for cloud image storageNODE_ENV: Environment (development/production)
- Create a Stripe account and get your API keys
- Uncomment and configure in
docker-compose.yml:- STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key_here - STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_here
- Restart the backend container
If Stripe is not configured, the app automatically falls back to mock payments that immediately mark bookings as paid.
Files are stored in ./backend/uploads and served via Express static middleware.
- Create a Cloudinary account
- Uncomment and configure in
docker-compose.yml:- CLOUDINARY_URL=cloudinary://api_key:api_secret@cloud_name - Restart the backend container
- Sign Up/Login with a customer account
- Post a Task:
- Go to "Post Task" in the navbar
- Fill in task details, location, budget, and photos
- Submit and wait for provider offers
- Review Offers:
- View offers on your task detail page
- Accept the best offer to create a booking
- Make Payment:
- Complete payment via Stripe or mock payment
- Message your provider to coordinate
- Leave Reviews:
- After completion, rate and review your provider
- Sign Up/Login and become a provider
- Create Services:
- Go to "Post Service" to create service listings
- Set your rates, availability, and skills
- Browse Tasks:
- Visit the Task Board to find relevant tasks
- Submit offers with your proposed price and timeline
- Manage Bookings:
- View accepted offers in your dashboard
- Communicate with customers via messaging
- Build Reputation:
- Complete jobs to earn reviews and ratings
- Login with admin credentials
- Monitor Platform:
- View all users, tasks, and services
- Moderate content and handle disputes
- Manage Users:
- Approve provider applications
- Handle user reports and issues
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current userPUT /api/auth/me- Update user profile
GET /api/tasks- List tasks with filtersPOST /api/tasks- Create new taskGET /api/tasks/:id- Get task detailsPATCH /api/tasks/:id- Update taskPOST /api/tasks/:id/assign- Assign task to provider
POST /api/offers/task/:id- Submit offer for taskGET /api/offers/task/:id- Get task offersGET /api/offers/my- Get user's offersPATCH /api/offers/:id/status- Update offer status
GET /api/conversations- Get user conversationsPOST /api/conversations- Create/get conversationGET /api/messages/conversation/:id- Get conversation messagesPOST /api/messages/conversation/:id- Send message
POST /api/payments/checkout- Create payment sessionPOST /api/payments/webhooks/stripe- Stripe webhookGET /api/payments/status/:bookingId- Get payment status
POST /api/uploads/single- Upload single imagePOST /api/uploads/multiple- Upload multiple imagesDELETE /api/uploads/:filename- Delete uploaded file
-
Authentication Flow
- User registration
- User login/logout
- Protected route access
-
Task Management
- Create task with photos
- Browse and filter tasks
- Submit and manage offers
- Accept offers and create bookings
-
Messaging
- Start conversations
- Send/receive real-time messages
- Message notifications
-
Payments
- Create payment session
- Complete mock payment
- Verify booking status
-
File Uploads
- Upload task photos
- Upload service images
- Upload profile images
# Check if all services are running
curl http://localhost:5000/api/health
# Expected response:
{
"status": "ok",
"db": "connected",
"time": "2024-01-01T00:00:00.000Z"
}-
Environment Setup:
- Set
NODE_ENV=production - Configure production MongoDB URI
- Set up Stripe production keys
- Configure Cloudinary for file storage
- Set
-
Security:
- Use strong JWT secrets
- Enable HTTPS
- Configure CORS for production domain
- Set up rate limiting
-
Monitoring:
- Set up logging
- Monitor database performance
- Track payment transactions
- Monitor real-time connections
# Build for production
docker-compose -f docker-compose.prod.yml up --build -d- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support and questions:
- Check the API health endpoint
- Review the demo accounts
- Check Docker container logs
- Ensure all environment variables are set
- Added real-time messaging with Socket.IO
- Implemented task posting and offer system
- Added Stripe payment integration
- Created comprehensive user profiles
- Added file upload functionality
- Implemented review and rating system