LogiFlow is a production-grade multi-tenant logistics SaaS platform that enables companies to manage their entire supply chain β from inventory and warehousing through to production, distribution, and billing β in a single unified platform.
Live Demo: logi-flow-three.vercel.app
GitHub: github.com/wachira7/LogiFlow
- Complete data isolation between tenant companies
- Role-based access control (Platform Admin, Company Admin, Manager, Staff)
- Custom branding per tenant
- Subscription-based tier system with feature gating
- Product catalog with categories and variants
- Stock level tracking with reorder points (
min_stock_level,max_stock_level) - Transaction history (
RECEIPT,SHIPMENT,RETURN) - Low stock alerts and automated reorder notifications
- Multi-warehouse support with zone management
- Stock transfer workflows with approval system
- Stock movement audit trail
- Capacity tracking and utilization reports
- Production orders with step-by-step tracking
- Bill of materials (BOM) management
- Materials consumption tracking
- Production dashboard with progress indicators
- Route planning and delivery management
- Real-time route tracking with Leaflet.js and OpenStreetMap geocoding
- Delivery status with progress bars and delay detection
- Route stops with lat/lng coordinates via Nominatim geocoding
- Automated trial expiration via Celery
- Recurring billing with email reminders
- Stripe β card payments
- M-Pesa β mobile money (Safaricom Daraja API)
- NOWPayments β cryptocurrency payments
- Invoice generation and payment history
- Tenant management and subscription oversight
- System health monitoring
- Audit logs for all platform actions
- Financial analytics and revenue reports
- Notification management
- Per-tenant analytics: inventory, distribution, production, warehousing
- Revenue reports and subscription metrics
- Prometheus + Grafana monitoring stack
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, TypeScript, Tailwind CSS, Leaflet.js |
| Backend | Django 4.x, Django REST Framework |
| Database | PostgreSQL 15 |
| Cache | Redis 7 |
| Task Queue | Celery + Celery Beat |
| Payments | Stripe, M-Pesa Daraja API, NOWPayments |
| Storage | Cloudinary (profile pictures, company logos), AWS S3 |
| Maps | Leaflet.js, react-leaflet, Nominatim (OpenStreetMap) |
| Monitoring | Prometheus, Grafana |
| Deployment | Northflank (backend + Celery), Vercel (frontend) |
| CI/CD | GitHub Actions |
| Containers | Docker, Docker Compose |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (Vercel) β
β Next.js 16 + TypeScript β
β State: Services + Hooks pattern (no Redux) β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β REST API
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β Backend (Northflank) β
β Django REST Framework β
β Auth Guard: middleware β layout β pages β
ββββββββββ¬βββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β β
ββββββββββΌββββββββ βββββββββΌβββββββββββββββββββββββββββ
β PostgreSQL 15 β β Redis β
β (all data) β β Cache + Celery broker β
ββββββββββββββββββ ββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββΌββββββββββββββββ
β Celery Workers β
β - Trial expiration β
β - Recurring billing β
β - Email reminders β
β - Analytics aggregation β
ββββββββββββββββββββββββββββββ
HTTP Request
β
Middleware (cookie/token check)
β
Layout.tsx (full user object + role check)
β
Page (no guard needed β layout handles it)
- Python 3.11+
- Node.js 20+
- PostgreSQL 15+
- Redis 7+
- Yarn
git clone https://github.com/wachira7/LogiFlow.git
cd LogiFlowcp .env.example .env
# Fill in your valuesdocker-compose up -d
# Starts: PostgreSQL, Redis, Prometheus, Grafanacd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements/base.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver# In a separate terminal (from backend directory)
celery -A logistics_project worker -l info
# Celery Beat scheduler
celery -A logistics_project beat -l info --scheduler django_celery_beat.schedulers:DatabaseSchedulercd frontend
yarn install
yarn devThe app will be available at http://localhost:3000
Django Admin at http://localhost:8000/admin
LogiFlow/
βββ backend/
β βββ apps/
β β βββ accounts/ # User auth and profiles
β β βββ companies/ # Multi-tenant company management
β β βββ inventory/ # Products, stock, transactions
β β βββ warehousing/ # Warehouses, transfers, movements
β β βββ production/ # Orders, steps, materials
β β βββ distribution/ # Routes, stops, delivery tracking
β β βββ billing/ # Subscriptions, payments, invoices
β β βββ analytics/ # Reports and dashboards
β β βββ platform_admin/ # Platform-level administration
β βββ logistics_project/ # Django project settings
β βββ requirements/
βββ frontend/
β βββ src/
β β βββ app/ # Next.js App Router pages
β β βββ components/ # React components per module
β β βββ services/ # API service layer
β β βββ hooks/ # Custom React hooks
β β βββ types/ # TypeScript type definitions
βββ infrastructure/
β βββ monitoring/ # Prometheus + Grafana config
βββ .github/
β βββ workflows/ # GitHub Actions CI/CD
βββ docker-compose.yml
Each company gets:
- Isolated data (all queries scoped by
company_id) - Dedicated subscription with tier-based feature access
- Role-based permissions (Admin, Manager, Staff)
- Custom company profile with logo and branding
Platform Admin
βββ Company A (Premium)
β βββ Admin User
β βββ Manager Users
β βββ Staff Users
βββ Company B (Basic)
βββ Admin User
βββ Staff Users
| Feature | Free | Basic | Premium |
|---|---|---|---|
| Users | 3 | 10 | Unlimited |
| Warehouses | 1 | 5 | Unlimited |
| Products | 100 | 1,000 | Unlimited |
| Distribution Routes | β | β | β |
| Analytics | Basic | Standard | Advanced |
| API Access | β | β | β |
| Priority Support | β | β | β |
See .env.example for all required variables. Key ones:
# Core
DEBUG=False
SECRET_KEY=...
DATABASE_URL=postgresql://...
# Redis / Celery
REDIS_URL=redis://...
CELERY_BROKER_URL=redis://...
# Payments
STRIPE_SECRET_KEY=...
MPESA_CONSUMER_KEY=...
NOWPAYMENTS_API_KEY=...
# Storage
CLOUDINARY_CLOUD_NAME=...
AWS_ACCESS_KEY_ID=...
# Monitoring
SENTRY_DSN=...GitHub Actions workflow on push to main:
Build & Push Docker images (backend + frontend) β GHCR
β
Run Django migrations (Northflank job)
β
Deploy backend service β Northflank
Deploy Celery worker β Northflank
β
Frontend β Vercel (auto-deploy via GitHub integration)
β
Health check β /api/health/
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
Emmanuel Warutere Wachira
Full-Stack Developer & DevOps Engineer
Portfolio Β· GitHub Β· LinkedIn