Some checks failed
System Monitoring / Health Checks (push) Has been cancelled
System Monitoring / Performance Monitoring (push) Has been cancelled
System Monitoring / Database Monitoring (push) Has been cancelled
System Monitoring / Cache Monitoring (push) Has been cancelled
System Monitoring / Log Monitoring (push) Has been cancelled
System Monitoring / Resource Monitoring (push) Has been cancelled
System Monitoring / Uptime Monitoring (push) Has been cancelled
System Monitoring / Backup Monitoring (push) Has been cancelled
System Monitoring / Security Monitoring (push) Has been cancelled
System Monitoring / Monitoring Dashboard (push) Has been cancelled
System Monitoring / Alerting (push) Has been cancelled
Security Scanning / Dependency Scanning (push) Has been cancelled
Security Scanning / Code Security Scanning (push) Has been cancelled
Security Scanning / Secrets Scanning (push) Has been cancelled
Security Scanning / Container Security Scanning (push) Has been cancelled
Security Scanning / Compliance Checking (push) Has been cancelled
Security Scanning / Security Dashboard (push) Has been cancelled
Security Scanning / Security Remediation (push) Has been cancelled
7.5 KiB
7.5 KiB
Quickstart Guide
Prerequisites
System Requirements
- Operating System: Linux, macOS, or Windows (with WSL2)
- Docker: 20.10+
- Docker Compose: 2.0+
- Python: 3.11+ (for local development)
- Node.js: 18+ (for frontend development)
- PostgreSQL: 14+ (for local database)
Development Environment Setup
-
Clone the repository
git clone <repository-url> cd saas-platform -
Install Docker and Docker Compose
# Verify Docker installation docker --version docker-compose --version -
Environment Configuration
# Copy environment template cp .env.template .env # Edit environment variables nano .env
Quick Start with Docker
1. Start Development Environment
# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f
2. Initialize Database
# Run database migrations
docker-compose exec backend python manage.py migrate
# Create superuser
docker-compose exec backend python manage.py createsuperuser
# Load initial data
docker-compose exec backend python manage.py load_initial_data
3. Access Applications
- Backend API: http://localhost:8000
- Frontend: http://localhost:3000
- Admin Dashboard: http://localhost:8000/admin
- API Documentation: http://localhost:8000/api/docs
4. Stop Environment
# Stop all services
docker-compose down
# Stop and remove volumes
docker-compose down -v
Local Development Setup
Backend Development
-
Setup Python Virtual Environment
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt -
Database Setup
# Start PostgreSQL docker run --name postgres-dev -e POSTGRES_PASSWORD=devpass -p 5432:5432 -d postgres:14 # Create database createdb saas_platform_dev # Run migrations python manage.py migrate # Create superuser python manage.py createsuperuser -
Run Backend Server
# Start development server python manage.py runserver # Run with hot reload python manage.py runserver --noreload
Frontend Development
-
Setup Node.js Environment
cd frontend npm install -
Environment Configuration
cp .env.template .env.local # Edit environment variables -
Run Frontend Development Server
npm run dev
First Steps
1. Create Your First Tenant
- Access the admin dashboard: http://localhost:8000/admin
- Login with your superuser credentials
- Navigate to "Tenants" section
- Click "Add Tenant" and fill in the details:
- Name: Your business name
- Email: Business email
- Business Type: Select industry
- Subscription Plan: Choose appropriate plan
2. Create User Accounts
- In admin dashboard, navigate to "Users"
- Click "Add User" and create users for your tenant
- Assign appropriate roles (Admin, Manager, Staff, Viewer)
3. Activate Modules
- Navigate to tenant's subscription
- Select modules to activate:
- Retail: For stores and food stalls
- Healthcare: For clinics and medical practices
- Education: For tuition centers
- Logistics: For delivery companies
- Beauty: For salons and spas
4. Access Tenant Portal
- Open frontend application: http://localhost:3000
- Login with tenant-specific URL:
http://localhost:3000/{tenant-slug} - Use credentials created in step 2
Module Setup Guides
Retail Module Quick Start
-
Add Products
# Navigate to Retail section # Click "Products" → "Add Product" # Fill product details and save -
Create Sale
# Navigate to Point of Sale # Add products to cart # Select payment method # Complete sale -
Check Inventory
# View stock levels # Set reorder points # Monitor low stock alerts
Healthcare Module Quick Start
-
Register Patients
# Navigate to Healthcare → Patients # Click "Add Patient" # Fill medical information # Save patient record -
Schedule Appointments
# Navigate to Appointments # Select date and time # Choose patient and doctor # Set appointment type # Confirm booking
Education Module Quick Start
-
Add Students
# Navigate to Education → Students # Click "Add Student" # Fill student details # Link parent account # Save record -
Create Classes
# Navigate to Classes # Click "Add Class" # Set schedule and teacher # Add students to class # Save class
Testing
Run Test Suite
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm test
# Integration tests
docker-compose exec backend pytest integration/
API Testing
# Import Postman collection
# File: docs/api/SaaS_Platform.postman_collection.json
# Or use curl examples
curl -X GET "http://localhost:8000/api/v1/tenants/" \
-H "Authorization: Bearer YOUR_TOKEN"
Deployment
Production Deployment
-
Environment Configuration
# Production environment cp .env.production .env # Update production settings # Set DEBUG=False # Configure production database # Set up SSL certificates -
Build and Deploy
# Build production images docker-compose -f docker-compose.prod.yml build # Deploy to production docker-compose -f docker-compose.prod.yml up -d
Cloud Deployment Options
- AWS: ECS Fargate with RDS
- Google Cloud: Cloud Run with Cloud SQL
- Azure: Container Instances with Database
- Malaysian Cloud: MYNIC, EXABYTE, or TM One
Troubleshooting
Common Issues
-
Database Connection Issues
# Check database status docker-compose ps postgres # Restart database docker-compose restart postgres # Check logs docker-compose logs postgres -
Backend Server Issues
# Check backend logs docker-compose logs backend # Restart backend docker-compose restart backend # Check database migrations docker-compose exec backend python manage.py showmigrations -
Frontend Build Issues
# Clear node modules rm -rf node_modules package-lock.json # Reinstall dependencies npm install # Rebuild frontend npm run build
Port Conflicts
# Check port usage
lsof -i :8000
lsof -i :3000
lsof -i :5432
# Kill processes using ports
kill -9 <PID>
Support
Documentation
- API Documentation: http://localhost:8000/api/docs
- Admin Guide: docs/admin-guide.md
- Module Documentation: docs/modules/
- Deployment Guide: docs/deployment.md
Getting Help
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@saas-platform.com
- Community: Discord community channel
Contributing
- Fork the repository
- Create feature branch
- Make your changes
- Add tests
- Submit pull request
Next Steps
- Explore Modules: Try out different industry modules
- Customize Branding: Upload your logo and customize colors
- Set Up Payment: Configure payment processors
- Add Users: Invite team members
- Configure Notifications: Set up email/SMS notifications
- Explore Reports: Check out analytics and reporting
Happy building! 🚀