Servify is a full-stack service booking platform built with the MERN stack that bridges the gap between professional service providers and customers. Whether you need a plumber, electrician, cleaner, or any other professional service, Servify provides a seamless experience for browsing, comparing, and booking services.
The platform features robust role-based access control, real-time booking management, secure authentication with Google OAuth, and an intuitive interface for both service providers and customers.
- Smart Search & Filtering - Find services by keyword, category, price range, and custom sorting options
- Seamless Booking - Book services for specific dates and times with automatic conflict detection
- Personal Dashboard - Track all your bookings with real-time status updates (Pending, Confirmed, Completed)
- Reviews & Ratings - Rate and review services after completion to help other users
- Profile Management - Update personal details, bio, and preferences
- Service Management - Create, update, and delete service listings with detailed descriptions and images
- Booking Control - Accept or reject incoming booking requests with full autonomy
- Business Dashboard - View earnings, manage active services, and track your schedule
- Conflict Prevention - Automatic detection of scheduling conflicts to prevent double bookings
- Role-Based Access - Specialized provider tools with secure access control
- JWT Authentication - Secure token-based auth with HttpOnly cookies for enhanced security
- Google OAuth 2.0 - One-click login and registration using Google accounts
- Email Verification - Account verification via email using Nodemailer
- Password Security - Bcrypt hashing for password protection
- Payment Ready - Architecture ready for payment gateway integration
- Password Hashing: Bcrypt with salt rounds for secure password storage
- HttpOnly Cookies: Refresh tokens stored in HttpOnly cookies to prevent XSS
- CORS Protection: Configured CORS to allow only trusted origins
- Input Validation: Zod schemas validate all user inputs
- Helmet.js: Implemented to set secure HTTP headers and protect against common web vulnerabilities.
- Rate Limiting: Custom API and Authentication rate limiters to prevent brute-force attacks and API abuse.
- MongoDB Injection Prevention: Utilizes
express-mongo-sanitizeto filter prohibited characters.
| Technology | Purpose |
|---|---|
| React 19 | UI framework with Vite build tool |
| Tailwind CSS 4 | Utility-first styling framework |
| React Query | Server state management and data fetching |
| React Router DOM v7 | Client-side routing |
| React Hook Form | Form handling and validation |
| Zod | Schema validation |
| Lucide React | Modern icon library |
| Technology | Purpose |
|---|---|
| Node.js | JavaScript runtime environment |
| Express.js | Web application framework |
| MongoDB | NoSQL database |
| Mongoose | MongoDB object modeling |
| JWT | JSON Web Tokens for authentication |
| Google Auth Library | Google OAuth integration |
| Cloudinary | Cloud-based image storage and management |
| Nodemailer | Email sending service |
| Bcrypt | Password hashing |
Follow these steps to set up Servify locally.
Ensure you have the following installed:
- Node.js (v18 or higher)
- MongoDB (Local installation or MongoDB Atlas account)
- Cloudinary Account (for image storage)
- Google Cloud Console Project (for OAuth)
git clone https://github.com/darxh/Servify.git
cd ServifyNavigate to the server directory and install dependencies:
cd Server
npm installCreate a .env file in the Server folder with the following configuration:
# Server Configuration
PORT=8080
MONGO_URI=your_mongodb_connection_string
CLIENT_URL=http://localhost:5173
# JWT Configuration
JWT_ACCESS_SECRET=your_super_secret_access_key
JWT_REFRESH_SECRET=your_super_secret_refresh_key
JWT_ACCESS_EXPIRE=15m
JWT_REFRESH_EXPIRE=7d
# Cloudinary (Image Uploads)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Email Service (Nodemailer)
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_email_app_password
# Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secretStart the backend server:
npm run devThe server will run on http://localhost:8080
Open a new terminal, navigate to the client directory, and install dependencies:
cd Client
npm installCreate a .env file in the Client folder:
VITE_API_URL=http://localhost:8080/api/v1
VITE_GOOGLE_CLIENT_ID=your_google_client_idStart the frontend development server:
npm run devThe client will run on http://localhost:5173
Open your browser and navigate to:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8080/api/v1
Servify/
├── Client/ # React Frontend (Vite)
│ ├── public/ # Static assets
│ ├── src/
│ │ ├── context/ # Global state management (AuthContext)
│ │ ├── features/ # Feature-based UI components
│ │ │ ├── auth/ # Forms and OAuth buttons
│ │ │ ├── bookings/ # Booking modals and logic
│ │ │ ├── home/ # Landing page sections (Hero, Categories, etc.)
│ │ │ ├── reviews/ # Review modals
│ │ │ └── services/ # Search & filtering components
│ │ ├── hooks/ # Custom data fetching hooks (React Query)
│ │ ├── layouts/ # UI Layouts (AuthLayout, MainLayout, Dashboard/Sidebar)
│ │ ├── lib/ # Third-party configurations (Axios instance)
│ │ ├── pages/ # Application routes
│ │ │ ├── auth/ # LoginPage, RegisterPage
│ │ │ ├── dashboard/ # Provider/User Dashboard, Settings, Create/Edit Services
│ │ │ ├── home/ # HomePage
│ │ │ └── services/ # ServicesPage, ServiceDetailsPage
│ │ ├── utils/ # Helper functions (formatCurrency)
│ │ ├── main.jsx # React application entry point
│ │ └── router.jsx # Application routing (React Router)
│ ├── index.html # HTML entry point
│ └── vite.config.js # Vite configuration
│
└── Server/ # Node.js & Express Backend
├── config/ # Database (db.js) & Cloudinary configurations
├── controllers/ # Business logic handling
│ ├── authController.js
│ ├── bookingController.js
│ ├── categoryController.js
│ ├── reviewController.js
│ └── serviceController.js
├── middleware/ # Custom Express middlewares (authMiddleware.js)
├── models/ # Mongoose Database Schemas
│ ├── bookingModel.js
│ ├── categoryModel.js
│ ├── reviewModel.js
│ ├── serviceModel.js
│ └── userModel.js
├── routes/ # API route definitions
├── utils/ # Helper functions (emailTemplates, generateToken, sendEmail)
├── seed.js # Database seeding script
└── server.js # Backend entry point
Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated!
-
Fork the Project
git fork https://github.com/darxh/Servify.git
-
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
- Follow the existing code style and conventions
- Write clear commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
- Payment Integration - Stripe/PayPal integration for secure payments
- Real-time Chat - Socket.io for provider-customer communication
- Push Notifications - Real-time booking updates
- Advanced Analytics - Provider dashboard with earnings analytics
- Mobile App - React Native version
- Multi-language Support - i18n internationalization
- Service Packages - Bundle multiple services at discounted rates
- Loyalty Program - Rewards system for frequent users
