You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 8, 2026. It is now read-only.
A production-ready SaaS platform for automotive repair shop management, featuring multi-tenant architecture with shared-schema isolation, role-based access control, Stripe subscription billing, and a "Precision Industrial" design system.
Built with Flask 3.1, SQLAlchemy 2.0, Neon PostgreSQL, Google OAuth, and Bootstrap 5.3.
One-click deployment to Heroku with cloud-native database on Neon.
Built for the next generation of automotive repair shop management.
Tech Stack:
Important
This project is a comprehensive multi-tenant SaaS platform that combines Flask backend with a modern Bootstrap 5.3 frontend. It features shared-schema multi-tenancy, 6-role RBAC, Stripe subscription billing, Google OAuth, 4-step onboarding, inventory management, and a full-featured admin/technician portal with real-time analytics.
RepairOS is a production-grade multi-tenant SaaS platform purpose-built for automotive repair shops. It enables repair businesses to manage work orders, customers, billing, inventory, and team members through a single unified platform with complete tenant data isolation.
The platform supports multiple organizations on a shared database schema using tenant_id discriminator columns, with automatic query filtering via custom SQLAlchemy mixins. Each organization gets its own isolated workspace with configurable service catalogs, parts inventory, and team roles.
Why This Project?
Automotive repair shops often rely on fragmented tools — paper work orders, spreadsheets for billing, separate inventory systems. This platform consolidates all operations into one cohesive system with:
Multi-tenant isolation so multiple shops can share one deployment
Role-based access so technicians and administrators see only what they need
Stripe billing for SaaS monetization with subscription plans
4-step onboarding to get new shops operational in minutes
Goals
Deliver a complete, deployable SaaS reference architecture using Flask
Demonstrate shared-schema multi-tenancy with automatic data isolation
Provide a modern, responsive UI following the "Precision Industrial" design language
Enable one-click cloud deployment with Heroku + Neon PostgreSQL
Note
Python 3.9+ required
Neon PostgreSQL account required for cloud database (SQLite used for local testing)
Google Cloud Console account optional (for OAuth sign-in)
No installation required! Visit the live demo to experience it firsthand.
✨ Key Features
1 Multi-Tenant SaaS Architecture
Complete shared-schema multi-tenancy with automatic data isolation. Each organization operates in its own workspace with independent service catalogs, customer records, and team management — all on a single database deployment.
Key capabilities include:
🏢 Organization Management: Create and configure multiple repair shops with custom settings
🔒 Data Isolation: TenantScopedMixin automatically filters all queries by tenant_id
👥 Team Invitations: Invite team members with role-based permissions
🚀 4-Step Onboarding: Guided setup for business details, service catalog, parts catalog, and team
🌐 Tenant-Scoped URLs: Routes available at both /technician/... and /org/<slug>/technician/...
2 Role-Based Dual Portals
Two distinct portal experiences for Technicians and Administrators, controlled by a 6-role RBAC system defined on TenantMembership:
Technician Portal:
📋 Work order management with pagination
🔧 Add services and parts to jobs with quantity tracking
💰 Real-time total cost calculation
✅ Job completion workflow
Administrator Portal:
👤 Customer management with search (first name, family name, or both)
💳 Billing management with overdue tracking (14-day threshold)
📦 Service & parts catalog management with categories and descriptions
📊 Inventory tracking with reorder alerts and stock adjustments
👥 Team member management with role assignment
📈 Dashboard with Chart.js analytics (monthly revenue, job status distribution)
⚙️ Organization settings and subscription management
RBAC Roles:
Role
Key Permissions
owner
Full access including organization management
admin
User management, catalog, inventory, jobs, billing, reports
manager
Jobs, customers, billing, reports
technician
Jobs, reports
parts_clerk
Catalog, inventory, reports
viewer
Reports only
3 Stripe Subscription Billing
Integrated SaaS billing with Stripe for subscription management:
💎 4 Plans: Free, Starter ($29/mo), Professional ($79/mo), Enterprise ($199/mo)
🎁 14-Day Trial: Free trial period for new organizations
🛒 Stripe Checkout: Hosted payment pages for secure card processing
🔄 Billing Portal: Customer self-service for plan changes and payment methods
📡 Webhook Handling: Automatic subscription status updates on payment events
* Additional Features
🔐 Google OAuth 2.0: One-click sign-in via Authlib integration
Each technology was selected for production readiness, simplicity, and Flask ecosystem compatibility. No frontend build step is required — static assets are served directly by Flask.
🏗️ Architecture
Tip
The architecture follows Flask best practices with a clear separation of concerns: views handle HTTP, services encapsulate business logic, and models manage data access with automatic tenant scoping.
# Migrations are managed via Alembic in migrations/versions/# Current versions: 001 (multi-tenant tables) → 002 (backfill) → 003 (constraints)
📖 API Reference
Tip
All routes require authentication unless marked otherwise. Tenant-scoped routes are also available at /org/<tenant_slug>/....
Public Routes
Method
Endpoint
Description
GET
/
Home page with statistics dashboard
GET/POST
/login
Login page and handler
GET
/logout
Logout
GET
/about
About page
GET
/help
Help page
GET
/customers
Customer list
GET/POST
/customers/new
New customer form / create
GET
/customers/<id>
Customer detail
GET/POST
/customers/<id>/edit
Edit customer
GET
/api/search/customers?q=
Customer search API (JSON)
GET
/api/customers/<id>
Customer details API (JSON)
Authentication Routes (/auth)
Method
Endpoint
Description
GET/POST
/auth/google
Initiate Google OAuth
GET
/auth/google/callback
Google OAuth callback
GET
/auth/callback
Neon Auth JWT callback
POST
/auth/neon-callback
JS client auth notification
GET
/auth/session
Current session info (JSON)
POST
/auth/logout
API logout
POST
/auth/verify-token
Verify JWT token
POST
/auth/link-account
Link Neon Auth to local account
GET
/auth/status
OAuth provider config status
GET
/auth/select-tenant
Tenant selection page
POST
/auth/switch-tenant
Switch active tenant
GET/POST
/auth/register-organization
Register new organization
Technician Routes (/technician)
Method
Endpoint
Description
GET
/technician/dashboard
Technician dashboard
GET
/technician/current-jobs?page=
Current work orders (paginated)
GET
/technician/jobs/<id>
Work order detail
GET
/technician/jobs/<id>/modify
Modify work order
POST
/technician/jobs/<id>/add-service
Add service to work order
POST
/technician/jobs/<id>/add-part
Add part to work order
POST
/technician/jobs/<id>/complete
Mark work order complete
GET
/technician/jobs/new
New work order form
POST
/technician/jobs
Create work order
GET
/technician/services
Service catalog
GET
/technician/parts
Parts list
GET
/technician/api/services
All services (JSON)
GET
/technician/api/parts
All parts (JSON)
GET
/technician/api/jobs/<id>/status
Work order status (JSON)
Administrator Routes (/administrator)
Method
Endpoint
Description
GET
/administrator/dashboard
Admin dashboard with charts
GET
/administrator/customers?page=
Customer management (paginated)
GET
/administrator/billing
Billing management
GET
/administrator/overdue-bills
Overdue bills
GET
/administrator/pay-bills
Payment processing
POST
/administrator/customers/<id>/pay
Pay all customer bills
POST
/administrator/jobs/<id>/pay
Pay single bill
GET
/administrator/reports
Reports page
GET/POST
/administrator/settings
Organization settings
GET
/administrator/team
Team member management
POST
/administrator/team/invite
Invite team member
GET/POST
/administrator/services
Service catalog management
GET/POST
/administrator/parts
Parts catalog management
GET
/administrator/inventory
Inventory dashboard
POST
/administrator/inventory/adjust
Adjust inventory stock
GET
/administrator/subscription
Subscription management
GET
/administrator/api/dashboard/summary
Dashboard summary (JSON)
GET
/administrator/api/billing/statistics
Billing statistics (JSON)
GET
/administrator/api/customers/<id>/billing-summary
Billing summary (JSON)
GET
/administrator/api/export/customers
Export customer data (JSON)
Billing & Onboarding Routes
Billing (/billing):
Method
Endpoint
Description
GET
/billing/plans
Subscription plans
POST
/billing/checkout
Create Stripe checkout session
GET
/billing/success
Checkout success page
POST
/billing/portal
Redirect to Stripe billing portal
POST
/billing/webhook
Stripe webhook handler (no auth)
Onboarding (/onboarding):
Method
Endpoint
Description
GET
/onboarding/step/<num>
Display onboarding step (1-4)
POST
/onboarding/step/<num>
Save onboarding step data
GET
/onboarding/complete
Onboarding completion
⌨️ Development
Development Scripts
# Development
python run.py # Start dev server (localhost:5000)# Testing
pytest # Run all tests
pytest --cov=app # Run with coverage (70% minimum)
pytest -m unit # Run unit tests only
pytest -m integration # Run integration tests only
pytest -m security # Run security tests only
pytest tests/unit/test_models.py -v # Single test file
pytest tests/unit/test_auth.py::TestUserModel::test_create_user -v # Single test# Code Quality
black --line-length 100 .# Format code
isort .# Sort imports
flake8 app/ # Lint code
mypy app/ # Type checking# Production
gunicorn wsgi:application --bind 0.0.0.0:$PORT --workers 2 --timeout 120
Testing
Tip
Tests use SQLite in-memory database — no PostgreSQL setup needed.
Chan Meng Need a custom app like this one? I build them — let's talk.
About
【Star-crossed coders unite!⭐️】A comprehensive web-based automotive repair shop management system built with Flask and MySQL. Features separate interfaces for technicians and administrators to manage repair jobs, customers, parts inventory, and billing.