Skip to content

Full-stack maid booking platform with React + FastAPI + PostgreSQL. Features include user authentication, booking management, ratings & reviews. Cloud-deployed with CI/CD pipeline.

License

Notifications You must be signed in to change notification settings

thedixitjain/maidease

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏠 MaidEase

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.


πŸ“‹ Table of Contents


✨ Features

For Customers

  • πŸ” 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

For Maids

  • πŸ‘€ 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

Platform Features

  • πŸ”’ 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

πŸ› οΈ Tech Stack

Backend

Frontend

  • 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

DevOps & Deployment

  • Backend Hosting: Render
  • Frontend Hosting: Vercel
  • Database: Supabase (PostgreSQL)
  • Version Control: Git

πŸ“ Project Structure

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)

πŸš€ Getting Started

Prerequisites

  • Python 3.9 or higher
  • Node.js 18 or higher
  • PostgreSQL database (or Supabase account)
  • Git

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Create a virtual environment:

    python -m venv venv
  3. Activate the virtual environment:

    • Windows:
      venv\Scripts\activate
    • macOS/Linux:
      source venv/bin/activate
  4. Install dependencies:

    pip install -r requirements.txt
  5. Create a .env file in the backend directory 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
  6. Run database migrations:

    alembic upgrade head
  7. Start the development server:

    uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

    The API will be available at http://localhost:8000

    API documentation (Swagger UI) will be at http://localhost:8000/docs

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Create a .env file in the frontend directory (if needed):

    VITE_API_URL=http://localhost:8000/api/v1
  4. Start the development server:

    npm run dev

    The application will be available at http://localhost:5173


πŸ“š API Documentation

Base URL

  • Development: http://localhost:8000/api/v1
  • Production: https://maidease-api.onrender.com/api/v1

Authentication Endpoints

Register User

POST /auth/register
Content-Type: application/json

{
  "email": "[email protected]",
  "password": "SecurePass123",
  "full_name": "John Doe",
  "phone_number": "9876543210",
  "role": "customer"  // or "maid"
}

Login

POST /auth/login
Content-Type: application/x-www-form-urlencoded

[email protected]&password=SecurePass123

Response:

{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "refresh_token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "bearer"
}

Refresh Token

POST /auth/refresh
Authorization: Bearer {refresh_token}

User Endpoints

Get Current User

GET /users/me
Authorization: Bearer {access_token}

Update User Profile

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
}

Maid Endpoints

Get All Maids

GET /maids

Get Maid Details

GET /maids/{maid_id}

Booking Endpoints

Create Booking

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 User Bookings

GET /bookings
Authorization: Bearer {access_token}

Update Booking Status

PUT /bookings/{booking_id}
Authorization: Bearer {access_token}
Content-Type: application/json

{
  "status": "accepted"  // or "completed", "canceled"
}

Review Endpoints

Create Review

POST /reviews
Authorization: Bearer {access_token}
Content-Type: application/json

{
  "booking_id": "uuid-here",
  "rating": 5,
  "comment": "Excellent service!"
}

Get Maid Reviews

GET /reviews/maid/{maid_id}

For complete API documentation, visit the Swagger UI at /docs when running the backend server.


πŸ” Environment Variables

Backend (.env)

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

Frontend (.env)

Variable Description Example
VITE_API_URL Backend API URL http://localhost:8000/api/v1

πŸ§ͺ Testing

Backend Tests

Run the test suite:

cd backend
pytest

Run with coverage:

pytest --cov=app tests/

Frontend Tests

cd frontend
npm run test

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License.


πŸ‘₯ Authors

  • Development Team - Initial work

πŸ™ Acknowledgments

  • FastAPI for the excellent web framework
  • React team for the amazing frontend library
  • Supabase for reliable database hosting
  • Render and Vercel for seamless deployment

πŸ“ž Support

For support, please open an issue in the GitHub repository or contact the development team.


Made with ❀️ by the MaidEase Team

About

Full-stack maid booking platform with React + FastAPI + PostgreSQL. Features include user authentication, booking management, ratings & reviews. Cloud-deployed with CI/CD pipeline.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •