Enterprise-grade service booking and vendor management platform
HomeServe Pro is a comprehensive multi-role service booking platform that connects customers with verified vendors through a secure, scalable, and auditable system. Built with modern web technologies, the platform features real-time communication, automated workflows, and enterprise-level security controls.
- Overview
- System Architecture
- Key Features
- Booking Workflow
- Technology Stack
- Getting Started
- Configuration
- Testing
- Deployment
- Project Structure
- Contributing
- License
HomeServe Pro delivers a production-ready platform for organizations requiring secure, auditable service booking operations. The system supports five distinct user roles with granular permissions, automated vendor onboarding, integrated payment processing, and comprehensive audit trails.
Target Use Cases:
- Enterprise home service management
- Multi-vendor coordination platforms
- On-demand service marketplaces
- Facility management operations
architecture-beta
group frontend(cloud)[Client Layer]
service webapp(server)[React SPA] in frontend
group backend(cloud)[Application Layer]
service api(server)[Django REST API] in backend
service websocket(server)[WebSocket Server] in backend
service celery(server)[Task Queue] in backend
group storage(cloud)[Data Layer]
service db(database)[Database] in storage
service cache(disk)[Redis Cache] in storage
group external(cloud)[External Services]
service stripe(internet)[Stripe API] in external
service docusign(internet)[DocuSign API] in external
service twilio(internet)[Twilio SMS] in external
webapp:R --> L:api
webapp:R --> L:websocket
api:B --> T:db
api:B --> T:cache
websocket:B --> T:cache
celery:L --> R:api
celery:T --> B:cache
api:R --> L:stripe
api:R --> L:docusign
api:R --> L:twilio
The architecture follows a modern microservices-inspired approach with clear separation of concerns. The frontend communicates with the backend through RESTful APIs and WebSocket connections for real-time updates. Background tasks are processed asynchronously through Celery, while Redis provides caching and message brokering capabilities.
Authentication & Authorization
- JWT-based authentication with access and refresh tokens
- Multi-factor authentication via SMS OTP
- Role-based access control (RBAC) for five user types
- Session management and token invalidation
Service Booking Management
- End-to-end booking lifecycle management
- Dynamic pricing algorithms based on demand and service complexity
- Real-time vendor availability tracking
- Automated booking assignment and optimization
Payment Processing
- Stripe integration for secure payment handling
- Support for multiple payment methods
- Automated refund processing
- Transaction audit trails
Digital Signatures
- SHA-256 cryptographic signature verification
- DocuSign integration for legal compliance
- Tamper-proof document management
- Audit logging for signature events
Real-time Communication
- WebSocket-based live notifications
- Chat functionality between customers and vendors
- Status update broadcasting
- Admin monitoring dashboards
Vendor Management
- Automated onboarding workflow
- Background verification integration
- Performance analytics and ratings
- Bonus calculation system
sequenceDiagram
actor Customer
participant Frontend
participant API
participant TaskQueue
participant Database
participant Stripe
participant Vendor
Customer->>Frontend: Request service booking
Frontend->>API: POST /api/bookings
activate API
API->>Database: Validate customer & service
Database-->>API: Validation result
API->>Database: Create booking record
API->>TaskQueue: Queue vendor assignment task
API-->>Frontend: Booking created (pending)
deactivate API
Frontend-->>Customer: Confirmation with booking ID
activate TaskQueue
TaskQueue->>Database: Find available vendors
Database-->>TaskQueue: Vendor list
TaskQueue->>Database: Assign optimal vendor
TaskQueue->>API: Trigger notification
deactivate TaskQueue
API->>Vendor: Send booking notification
Vendor->>Frontend: Accept booking
Frontend->>API: PUT /api/bookings/{id}/accept
API->>Database: Update booking status
API->>Customer: Send acceptance notification
Note over Customer,Vendor: Service completion
Vendor->>Frontend: Mark service complete
Frontend->>API: POST /api/bookings/{id}/complete
API->>Stripe: Process payment
Stripe-->>API: Payment confirmation
API->>Database: Update booking & payment status
API-->>Frontend: Completion confirmed
Frontend-->>Customer: Service completed notification
The booking workflow demonstrates the platform's asynchronous architecture, where customer requests are immediately acknowledged while complex operations like vendor assignment and payment processing occur in the background through task queues.
Backend
- Python 3.10+
- Django 4.x
- Django REST Framework
- Django Channels (WebSocket support)
- Celery (distributed task queue)
- Redis (caching and message broker)
Frontend
- React 18
- TypeScript
- Vite (build tool)
- Tailwind CSS
- React Router
- Axios
Database
- SQLite (development)
- PostgreSQL (production recommended)
External Integrations
- Stripe API (payment processing)
- DocuSign API (digital signatures)
- Twilio API (SMS notifications)
Development Tools
- ESLint & Prettier
- Git hooks for code quality
- Comprehensive test suites
Before beginning development, ensure the following dependencies are installed:
- Python 3.10 or higher
- Node.js 16+ with npm or yarn
- Redis server (version 6.0+)
- Git version control system
External Service Accounts:
- Stripe account with test API keys
- Twilio account for SMS functionality (optional)
- DocuSign developer account (optional)
Step 1: Environment Setup
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activateStep 2: Install Dependencies
pip install -r requirements.txtStep 3: Environment Configuration
Create a .env file in the project root:
SECRET_KEY=your-django-secret-key-here
DEBUG=True
DATABASE_URL=sqlite:///db.sqlite3
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
REDIS_URL=redis://localhost:6379/1
TWILIO_ACCOUNT_SID=your_account_sid
TWILIO_AUTH_TOKEN=your_auth_token
TWILIO_PHONE_NUMBER=+1234567890Step 4: Database Initialization
python manage.py migrate
python manage.py createsuperuserStep 5: Sample Data (Optional)
python datacreate/create_sample_data.pyStep 6: Start Services
Terminal 1 - Django Server:
python manage.py runserverTerminal 2 - WebSocket Server:
uvicorn homeserve_pro.asgi:application --host 0.0.0.0 --port 8000 --reloadTerminal 3 - Celery Worker:
celery -A homeserve_pro worker -l infoTerminal 4 - Redis Server:
redis-serverAccess Points:
- API: http://localhost:8000/api/
- Admin Panel: http://localhost:8000/admin/
- WebSocket: ws://localhost:8000/ws/
Step 1: Install Dependencies
cd src
npm installStep 2: Start Development Server
npm run devThe React application will be available at http://localhost:5173/
Build for Production:
npm run buildAll sensitive configuration should be managed through environment variables. Reference the .env.example file for complete configuration options.
Critical Configuration Items:
SECRET_KEY: Django cryptographic signing key (generate usingdjango-admin'sget_random_secret_key)DATABASE_URL: Database connection string (use PostgreSQL in production)ALLOWED_HOSTS: Comma-separated list of allowed hostnamesCORS_ALLOWED_ORIGINS: Permitted frontend origins for CORSREDIS_URL: Redis connection string for caching and task queue
For production deployments:
- Set
DEBUG=False - Use PostgreSQL:
DATABASE_URL=postgresql://user:password@host:port/dbname - Configure proper
ALLOWED_HOSTSandCORS_ALLOWED_ORIGINS - Enable HTTPS and configure SSL certificates
- Use environment-based secrets management (AWS Secrets Manager, Azure Key Vault)
- Configure Stripe webhook endpoints with production keys
- Set up proper logging and monitoring
Run the complete Django test suite:
python manage.py testRun specific test modules:
python manage.py test core.tests.TestBookingFlowRun integration tests:
python test/test_complete_customer_journey.pycd src
npm run testGenerate coverage reports:
coverage run --source='.' manage.py test
coverage report
coverage html # Generates HTML reportInfrastructure Requirements:
- Application server (Gunicorn/uWSGI with Nginx reverse proxy)
- ASGI server for WebSocket support (Uvicorn/Daphne)
- PostgreSQL database (version 12+)
- Redis instance (version 6.0+)
- SSL/TLS certificates
- Process manager (systemd, supervisord, or Docker)
Deployment Steps:
- Application Server Configuration
gunicorn homeserve_pro.wsgi:application --bind 0.0.0.0:8000 --workers 4- WebSocket Server Configuration
uvicorn homeserve_pro.asgi:application --host 0.0.0.0 --port 8001 --workers 2- Celery Worker Configuration
celery -A homeserve_pro worker --concurrency=4 --loglevel=info- Static Files Collection
python manage.py collectstatic --noinput- Database Migration
python manage.py migrate --noinputA Dockerfile and docker-compose.yml can be added for containerized deployments. Recommended architecture:
- Backend container (Django + Celery)
- Frontend container (Nginx serving static React build)
- Database container (PostgreSQL)
- Cache container (Redis)
- Use load balancers for horizontal scaling of application servers
- Implement database read replicas for read-heavy workloads
- Configure Redis clustering for high-availability caching
- Use CDN for static asset delivery
- Implement connection pooling for database connections
homeserve_pro/
├── core/ # Core Django application
│ ├── models.py # Database models
│ ├── views.py # API views
│ ├── serializers.py # DRF serializers
│ ├── services/ # Business logic layer
│ ├── consumers.py # WebSocket consumers
│ └── tasks.py # Celery tasks
├── homeserve_pro/ # Django project configuration
│ ├── settings.py # Application settings
│ ├── urls.py # URL routing
│ ├── asgi.py # ASGI configuration
│ └── wsgi.py # WSGI configuration
├── src/ # React frontend
│ ├── components/ # Reusable UI components
│ ├── pages/ # Page components
│ ├── services/ # API service layer
│ ├── context/ # React context providers
│ └── hooks/ # Custom React hooks
├── datacreate/ # Database seeding scripts
├── test/ # Test suites
├── requirements.txt # Python dependencies
└── package.json # Node.js dependencies
We welcome contributions from the community. Please follow these guidelines:
Development Workflow:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Commit changes with descriptive messages
- Write or update tests for new functionality
- Ensure all tests pass:
python manage.py test - Push to your fork:
git push origin feature/your-feature-name - Submit a pull request with a comprehensive description
Code Standards:
- Follow PEP 8 for Python code
- Use TypeScript strict mode for frontend code
- Write docstrings for all public functions and classes
- Maintain test coverage above 80%
- Use meaningful variable and function names
Pull Request Requirements:
- Descriptive title and detailed description
- Reference related issues
- Include test coverage for new features
- Update documentation as needed
- Pass all CI/CD checks
Developed by Serverless Squad.
Team Members:
This project's licensing terms are not specified. Please contact the project maintainers for licensing information before using this code in production environments.
For technical support, bug reports, or feature requests:
- Open an issue in the GitHub repository
- Contact the development team through the issue tracker
- Review existing documentation in the
Implementation plan/directory
For detailed API documentation, refer to: