MaidEase is a full-stack web application that connects customers with professional maids for household services. The platform enables users to browse available maids, book services, manage bookings, and leave reviews.
- Features
- Tech Stack
- Project Structure
- Getting Started
- API Documentation
- Environment Variables
- Testing
- Contributing
- π User Authentication - Secure registration and login with JWT tokens
- π Browse Maids - View available maids with ratings, experience, and hourly rates
- π Book Services - Schedule maid services with preferred date and time
- β Review System - Rate and review maids after service completion
- π Booking Management - Track all bookings and their statuses
- π€ Profile Management - Create and update professional profiles
- π Booking Requests - View and manage incoming booking requests
- β Accept/Reject Bookings - Control your schedule and availability
- π° Earnings Tracking - Monitor completed bookings and earnings
- π Secure Authentication - JWT-based authentication with refresh tokens
- π RESTful API - Well-documented API endpoints
- π± Responsive Design - Works seamlessly on desktop and mobile devices
- ποΈ PostgreSQL Database - Reliable data storage with Supabase
- π Cloud Deployment - Backend on Render, Frontend on Vercel
- Framework: FastAPI - Modern, fast Python web framework
- Database: PostgreSQL (via Supabase)
- ORM: SQLAlchemy - Database toolkit and ORM
- Authentication: JWT tokens with python-jose
- Password Hashing: Argon2 - Secure password hashing
- Validation: Pydantic - Data validation using Python type annotations
- Server: Uvicorn + Gunicorn
- Framework: React 19.2.0
- Build Tool: Vite - Next generation frontend tooling
- Routing: React Router v6
- HTTP Client: Axios - Promise-based HTTP client
- State Management: React Context API
- Backend Hosting: Render
- Frontend Hosting: Vercel
- Database: Supabase (PostgreSQL)
- Version Control: Git
maidease/
βββ backend/ # FastAPI backend application
β βββ app/
β β βββ api/ # API route handlers
β β β βββ deps.py # Dependency injection utilities
β β β βββ v1/ # API version 1 endpoints
β β βββ core/ # Core functionality
β β β βββ config.py # Configuration settings
β β β βββ security.py # JWT and password utilities
β β β βββ exceptions.py # Custom exceptions
β β βββ models/ # SQLAlchemy database models
β β β βββ user.py # User model
β β β βββ booking.py # Booking model
β β β βββ review.py # Review model
β β β βββ service.py # Service model
β β βββ schemas/ # Pydantic validation schemas
β β β βββ user.py # User schemas
β β β βββ booking.py # Booking schemas
β β β βββ review.py # Review schemas
β β β βββ token.py # Token schemas
β β βββ services/ # Business logic layer
β β β βββ auth_service.py # Authentication logic
β β β βββ user_service.py # User management
β β β βββ booking_service.py # Booking operations
β β β βββ maid_service.py # Maid listing logic
β β β βββ review_service.py # Review management
β β βββ utils/ # Utility functions
β β βββ database.py # Database connection setup
β β βββ main.py # FastAPI application entry point
β β βββ config.py # App configuration
β βββ alembic/ # Database migrations
β βββ tests/ # Unit and integration tests
β βββ requirements.txt # Python dependencies
β βββ render.yaml # Render deployment config
β βββ .env # Environment variables (not in git)
β
βββ frontend/ # React frontend application
β βββ src/
β β βββ api/ # API client configuration
β β β βββ client.js # Axios instance with interceptors
β β β βββ endpoints.js # API endpoint definitions
β β βββ components/ # Reusable React components
β β βββ contexts/ # React Context providers
β β β βββ AuthContext.jsx # Authentication state
β β βββ pages/ # Page components
β β βββ utils/ # Utility functions
β β βββ App.jsx # Main app component
β β βββ main.jsx # React entry point
β βββ public/ # Static assets
β βββ package.json # Node.js dependencies
β βββ vite.config.js # Vite configuration
β βββ vercel.json # Vercel deployment config
β
βββ database/ # Database scripts and schemas
βββ docker/ # Docker configuration (optional)
- Python 3.9 or higher
- Node.js 18 or higher
- PostgreSQL database (or Supabase account)
- Git
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- Windows:
venv\Scripts\activate
- macOS/Linux:
source venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in thebackenddirectory with the following variables:DATABASE_URL=postgresql://user:password@host:port/database SECRET_KEY=your-secret-key-here ALGORITHM=HS256 ACCESS_TOKEN_EXPIRE_MINUTES=15 REFRESH_TOKEN_EXPIRE_DAYS=7 CORS_ORIGINS=http://localhost:5173,https://your-frontend-url.vercel.app
-
Run database migrations:
alembic upgrade head
-
Start the development server:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
The API will be available at
http://localhost:8000API documentation (Swagger UI) will be at
http://localhost:8000/docs
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Create a
.envfile in thefrontenddirectory (if needed):VITE_API_URL=http://localhost:8000/api/v1
-
Start the development server:
npm run dev
The application will be available at
http://localhost:5173
- Development:
http://localhost:8000/api/v1 - Production:
https://maidease-api.onrender.com/api/v1
POST /auth/register
Content-Type: application/json
{
"email": "[email protected]",
"password": "SecurePass123",
"full_name": "John Doe",
"phone_number": "9876543210",
"role": "customer" // or "maid"
}POST /auth/login
Content-Type: application/x-www-form-urlencoded
[email protected]&password=SecurePass123Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"refresh_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "bearer"
}POST /auth/refresh
Authorization: Bearer {refresh_token}GET /users/me
Authorization: Bearer {access_token}PUT /users/{user_id}
Authorization: Bearer {access_token}
Content-Type: application/json
{
"full_name": "Updated Name",
"bio": "Professional maid with 10 years experience",
"hourly_rate": 500.0
}GET /maidsGET /maids/{maid_id}POST /bookings
Authorization: Bearer {access_token}
Content-Type: application/json
{
"maid_id": "uuid-here",
"service_type": "house_cleaning",
"booking_date": "2025-11-20T14:00:00",
"time_slot": "14:00",
"total_amount": 500.0,
"notes": "Please bring cleaning supplies"
}GET /bookings
Authorization: Bearer {access_token}PUT /bookings/{booking_id}
Authorization: Bearer {access_token}
Content-Type: application/json
{
"status": "accepted" // or "completed", "canceled"
}POST /reviews
Authorization: Bearer {access_token}
Content-Type: application/json
{
"booking_id": "uuid-here",
"rating": 5,
"comment": "Excellent service!"
}GET /reviews/maid/{maid_id}For complete API documentation, visit the Swagger UI at /docs when running the backend server.
| Variable | Description | Example |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | postgresql://user:pass@host:5432/db |
SECRET_KEY |
JWT signing secret | your-secret-key-min-32-chars |
ALGORITHM |
JWT algorithm | HS256 |
ACCESS_TOKEN_EXPIRE_MINUTES |
Access token expiry | 15 |
REFRESH_TOKEN_EXPIRE_DAYS |
Refresh token expiry | 7 |
CORS_ORIGINS |
Allowed CORS origins | http://localhost:5173,https://app.vercel.app |
| Variable | Description | Example |
|---|---|---|
VITE_API_URL |
Backend API URL | http://localhost:8000/api/v1 |
Run the test suite:
cd backend
pytestRun with coverage:
pytest --cov=app tests/cd frontend
npm run testContributions are welcome! Please follow these steps:
- Fork the repository
- Create a 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.
- Development Team - Initial work
- FastAPI for the excellent web framework
- React team for the amazing frontend library
- Supabase for reliable database hosting
- Render and Vercel for seamless deployment
For support, please open an issue in the GitHub repository or contact the development team.
Made with β€οΈ by the MaidEase Team