Technology Stack & Architecture
Technology Stack & Architecture
Section titled “Technology Stack & Architecture”Complete overview of the technologies, frameworks, and infrastructure that power iSu Technologies solutions.
🎯 Philosophy
Section titled “🎯 Philosophy”Technology Selection Criteria
Section titled “Technology Selection Criteria”- Production-Ready: Battle-tested in enterprise environments
- Scalable: Handle growth from hundreds to millions of users
- Modern: Current best practices, active communities
- Maintainable: Clear documentation, good developer experience
- Cost-Effective: Balance performance with operational costs
- African Context: Work well with African internet infrastructure
🖥️ Frontend Stack
Section titled “🖥️ Frontend Stack”React 18
Section titled “React 18”Purpose: UI component framework Why We Chose It:
- Industry standard with massive ecosystem
- Component-based architecture for reusability
- Excellent performance with virtual DOM
- Strong TypeScript support
- Extensive library of third-party components
Use Cases:
- SACE Provider Intelligence dashboards
- ThriveSend B2B2G interface
- AssessFlow assessment interfaces
- AutoSlip web portal and admin interface
Next.js 14
Section titled “Next.js 14”Purpose: React framework with SSR/SSG Why We Chose It:
- Server-side rendering for SEO and performance
- App Router for modern routing patterns
- Built-in API routes for backend functionality
- Excellent developer experience
- Production-optimized builds
- Image optimization out of the box
Use Cases:
- SACE frontend (3 portals: Admin, Provider, Educator)
- Marketing websites and landing pages
- Public-facing documentation sites
Key Features We Use:
- App Router for file-based routing
- Server Components for performance
- Middleware for authentication
- API routes for lightweight backend operations
TypeScript
Section titled “TypeScript”Purpose: Type-safe JavaScript Why We Chose It:
- Catch errors at compile time, not runtime
- Better IDE support and autocomplete
- Self-documenting code with types
- Easier refactoring and maintenance
- Industry standard for modern web development
Use Cases:
- All frontend codebases
- API client libraries
- Shared type definitions
TailwindCSS
Section titled “TailwindCSS”Purpose: Utility-first CSS framework Why We Chose It:
- Rapid UI development
- Consistent design system
- No naming conventions to memorize
- Tiny production bundle sizes
- Excellent responsive design support
- Dark mode built-in
Use Cases:
- All web interfaces
- Component styling
- Responsive layouts
Configuration:
module.exports = { content: ['./src/**/*.{js,ts,jsx,tsx}'], theme: { extend: { colors: { gold: '#D4AF37', black: '#1A1A1A', } } }}Zustand
Section titled “Zustand”Purpose: State management Why We Chose It:
- Simpler than Redux with similar power
- No boilerplate code
- TypeScript-first design
- Excellent performance
- Small bundle size (1KB)
Use Cases:
- User authentication state
- Dashboard filters and preferences
- Form state management
- Cache management
⚙️ Backend Stack
Section titled “⚙️ Backend Stack”Python + FastAPI
Section titled “Python + FastAPI”Purpose: High-performance async API framework Why We Chose It:
- Async/await support for high concurrency
- Automatic API documentation (OpenAPI/Swagger)
- Built-in data validation with Pydantic
- Excellent for ML/AI integration
- Fast (comparable to Node.js and Go)
- Type hints for better code quality
Use Cases:
- SACE backend API
- ML model serving
- Predictive analytics endpoints
- High-throughput data processing
Key Libraries:
- Pydantic: Data validation and settings management
- SQLAlchemy: Async ORM for database operations
- Alembic: Database migrations
- python-jose: JWT token handling
- passlib: Password hashing
- structlog: Structured logging
Architecture Pattern:
app/├── api/ # API routes and endpoints├── core/ # Configuration and database├── models/ # SQLAlchemy ORM models├── schemas/ # Pydantic schemas for validation├── services/ # Business logic layer└── main.py # Application entry pointNode.js + Express
Section titled “Node.js + Express”Purpose: JavaScript runtime and web framework Why We Chose It:
- JavaScript across frontend and backend
- Massive npm ecosystem
- Excellent for lightweight APIs
- Good for real-time applications (Socket.io)
- Well-understood by most developers
Use Cases:
- Lightweight microservices
- Real-time notification systems
- Webhook handlers
- Integration services
WhatsApp Business API
Section titled “WhatsApp Business API”Purpose: Real-time receipt processing via WhatsApp Why We Chose It:
- Users already have WhatsApp (no app download)
- Instant delivery and processing
- Reliable messaging infrastructure
- Easy for site managers, restaurant staff, retail managers
Use Cases:
- AutoSlip receipt automation
- Real-time document submission
- Client communication
Architecture:
- Webhook integration for incoming messages
- Media download for receipt images
- Status updates sent back to users
🗄️ Database Stack
Section titled “🗄️ Database Stack”PostgreSQL
Section titled “PostgreSQL”Purpose: Primary relational database Why We Chose It:
- ACID compliance for data integrity
- Powerful query capabilities (JSON support, full-text search)
- Excellent performance at scale
- Strong data consistency guarantees
- Advanced features (CTEs, window functions, partitioning)
- Battle-tested in production environments
- Great for complex queries and analytics
Use Cases:
- SACE database (educators, providers, activities, enrollments)
- User authentication and authorization
- Transactional data
- Analytics and reporting
Configuration:
- Async Driver: psycopg[binary] version 3.x
- Connection Pooling: SQLAlchemy async engine
- Migrations: Alembic for version control
Key Tables (SACE Example):
-- Core entitiesproviders -- Training providerseducators -- Teacher recordsactivities -- Training coursesenrollments -- Educator enrollmentsusers -- Authentication
-- Analyticsquality_scores -- Provider quality metricsrisk_assessments -- Compliance risk predictionsPurpose: In-memory data store for caching Why We Chose It:
- Sub-millisecond latency
- Simple key-value store
- TTL (time-to-live) for automatic cache expiration
- Pub/sub for real-time features
- Session storage
- Rate limiting
Use Cases:
- API response caching (15-minute TTL)
- Session management
- Real-time notifications
- Rate limiting for API endpoints
- Temporary data storage
Configuration:
# Redis connectionREDIS_URL = "redis://localhost:6379/0"CACHE_EXPIRE_MINUTES = 15🤖 AI & Machine Learning
Section titled “🤖 AI & Machine Learning”TensorFlow.js
Section titled “TensorFlow.js”Purpose: Machine learning in JavaScript Why We Chose It:
- Run ML models in browser or Node.js
- Pre-trained models available
- Transfer learning support
- Real-time predictions without server round-trips
Use Cases:
- Client-side prediction models
- Real-time risk assessment
- Browser-based analytics
Python ML Stack
Section titled “Python ML Stack”Purpose: Model training and data science
Libraries:
- Scikit-learn: Traditional ML algorithms
- Pandas: Data manipulation and analysis
- NumPy: Numerical computing
- Matplotlib/Seaborn: Data visualization
Use Cases:
- Compliance risk prediction (78% accuracy)
- Completion rate forecasting
- Enrollment pattern analysis
- Provider quality scoring
Model Pipeline:
- Data extraction from PostgreSQL
- Feature engineering with Pandas
- Model training with Scikit-learn
- Model evaluation and validation
- Deployment via FastAPI endpoints
- Continuous monitoring and retraining
🌐 Infrastructure & DevOps
Section titled “🌐 Infrastructure & DevOps”Hetzner VPS
Section titled “Hetzner VPS”Purpose: Production server hosting Why We Chose It:
- Cost-effective European hosting
- Good performance for African users
- Full root access for native deployments
- Reliable uptime
- Simple pricing model
Specifications:
- IP: 46.224.40.5
- OS: Ubuntu 22.04 LTS
- Services: PostgreSQL, Redis, Nginx
- Applications: docs.isutech.co.za, sace.isutech.co.za
Purpose: Web server and reverse proxy Why We Chose It:
- Industry-standard web server
- Excellent performance for static content
- Powerful reverse proxy capabilities
- SSL/TLS termination
- Load balancing support
- Minimal resource usage
Configuration Pattern:
server { server_name app.isutech.co.za;
# API Backend Proxy location /api/ { proxy_pass http://localhost:8000/api/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }
# Frontend Proxy location / { proxy_pass http://localhost:3000; }
# SSL Configuration listen 443 ssl; ssl_certificate /etc/letsencrypt/live/app.isutech.co.za/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/app.isutech.co.za/privkey.pem;}Systemd
Section titled “Systemd”Purpose: Service management and auto-start Why We Chose It:
- Native Linux service management
- Automatic restart on failure
- Easy logging with journalctl
- Dependency management
- No Docker overhead
Service Pattern:
[Unit]Description=Application NameAfter=network.target postgresql.service
[Service]Type=simpleUser=rootWorkingDirectory=/var/www/appEnvironment="PATH=/var/www/app/venv/bin"ExecStart=/var/www/app/venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000Restart=alwaysRestartSec=10
[Install]WantedBy=multi-user.targetLet’s Encrypt (Certbot)
Section titled “Let’s Encrypt (Certbot)”Purpose: Free SSL certificates Why We Chose It:
- Free automated SSL certificates
- Auto-renewal built-in
- Trusted by all browsers
- Simple setup with Nginx integration
Configuration:
# Install certificatesudo certbot --nginx -d app.isutech.co.za
# Auto-renewal (via systemd timer)sudo systemctl status certbot.timer📚 Documentation Stack
Section titled “📚 Documentation Stack”MkDocs Material
Section titled “MkDocs Material”Purpose: Static site generator for documentation Why We Chose It:
- Beautiful Material Design theme
- Excellent search functionality
- Markdown-based (easy to write)
- Git-friendly workflow
- Fast static site generation
- Mobile-responsive
- Dark mode support
Use Cases:
- docs.isutech.co.za (this site)
- DocsHub SaaS product (customer-facing documentation platforms)
- Technical documentation
- Knowledge base
- Process documentation
Key Features:
- Auto-generated navigation
- Full-text search
- Code syntax highlighting
- Mermaid diagram support
- Git revision dates
- Social cards for sharing
Configuration:
theme: name: material features: - navigation.instant - navigation.tabs - search.suggest - content.code.copy
plugins: - search - git-revision-date-localized - minify🔐 Security Stack
Section titled “🔐 Security Stack”JWT (JSON Web Tokens)
Section titled “JWT (JSON Web Tokens)”Purpose: Stateless authentication Why We Chose It:
- No server-side session storage needed
- Works well with distributed systems
- Contains user claims (role, permissions)
- Industry standard
Implementation:
- HS256 algorithm
- 7-day access token expiry
- 30-day refresh token expiry
- Stored in HTTP-only cookies or localStorage
Passlib + bcrypt
Section titled “Passlib + bcrypt”Purpose: Password hashing Why We Chose It:
- Industry-standard password hashing
- Configurable work factor (future-proof)
- Protection against rainbow tables
- Slow by design (prevents brute force)
CORS (Cross-Origin Resource Sharing)
Section titled “CORS (Cross-Origin Resource Sharing)”Purpose: Secure cross-origin requests Configuration:
ALLOWED_HOSTS = [ "https://sace.isutech.co.za", "https://docs.isutech.co.za", "http://localhost:3000" # Development only]🧪 Development Tools
Section titled “🧪 Development Tools”Version Control: Git + GitHub
Section titled “Version Control: Git + GitHub”Why We Chose It:
- Industry standard for version control
- Excellent branching and merging
- GitHub Actions for CI/CD
- Issue tracking and project management
Package Managers
Section titled “Package Managers”- npm/pnpm: Node.js package management
- pip: Python package management
- venv: Python virtual environments
Code Quality Tools
Section titled “Code Quality Tools”- ESLint: JavaScript/TypeScript linting
- Prettier: Code formatting
- Black: Python code formatting
- mypy: Python static type checking
📊 Monitoring & Logging
Section titled “📊 Monitoring & Logging”Structured Logging (structlog)
Section titled “Structured Logging (structlog)”Purpose: Machine-readable logs Implementation:
import structlog
logger = structlog.get_logger()logger.info("user_login", user_id="123", ip="1.2.3.4")Systemd Journald
Section titled “Systemd Journald”Purpose: Centralized logging Usage:
# View logssudo journalctl -u sace-backend -f
# Filter by prioritysudo journalctl -u sace-backend -p err🚀 Deployment Architecture
Section titled “🚀 Deployment Architecture”Current Architecture (SACE Example)
Section titled “Current Architecture (SACE Example)”Internet ↓Nginx (Port 443) ↓ ├─→ Frontend (Next.js on port 3000) │ └─→ Static assets + SSR pages │ └─→ Backend API (FastAPI on port 8001) ├─→ PostgreSQL (port 5432) ├─→ Redis (port 6379) └─→ ML Models (in-process)
Auto-Updates: Git Repository → Systemd Timer → Build & DeployScalability Path
Section titled “Scalability Path”Current State: Single VPS, native deployment Next Steps:
- Horizontal scaling with load balancer
- Database read replicas
- Redis cluster for distributed caching
- CDN for static assets
- Kubernetes for container orchestration (future)
💰 Cost Optimization
Section titled “💰 Cost Optimization”Why We Avoid Docker (Currently)
Section titled “Why We Avoid Docker (Currently)”- Reason 1: Lower overhead on single VPS
- Reason 2: Simpler debugging and monitoring
- Reason 3: Direct access to systemd benefits
- Future: Will use Docker/K8s when scaling horizontally
Why We Use Native Deployments
Section titled “Why We Use Native Deployments”- Performance: No containerization overhead
- Simplicity: Fewer moving parts
- Control: Full system access
- Cost: Maximum resource utilization
📈 Performance Benchmarks
Section titled “📈 Performance Benchmarks”API Response Times
Section titled “API Response Times”- Health Check: < 50ms
- Database Queries: < 100ms (with caching)
- ML Predictions: < 500ms
- Full Page Load: < 2s (including SSR)
Database Performance
Section titled “Database Performance”- Connection Pooling: 10 connections, max overflow 20
- Query Optimization: Indexed foreign keys
- Caching Strategy: 15-minute Redis TTL
🔄 Technology Decision Framework
Section titled “🔄 Technology Decision Framework”When evaluating new technologies, we ask:
- Is it production-ready? Stable version, good documentation
- Does it solve a real problem? Not just trendy
- Can we maintain it? Team expertise or learning curve
- Does it scale? Handle future growth
- What’s the cost? Licensing, hosting, maintenance
- Is there community support? Active development, large community
- Does it fit our stack? Integrates well with existing tools
📚 Technology Resources
Section titled “📚 Technology Resources”Learning Resources
Section titled “Learning Resources”- FastAPI Documentation
- Next.js Documentation
- PostgreSQL Documentation
- TensorFlow.js Guides
- MkDocs Material
Internal Documentation
Section titled “Internal Documentation”🎯 Future Technology Roadmap
Section titled “🎯 Future Technology Roadmap”Short-Term (3-6 months)
Section titled “Short-Term (3-6 months)”- Implement CI/CD pipelines with GitHub Actions
- Add automated testing (Jest, Pytest)
- Set up monitoring with Prometheus + Grafana
- Implement database backups automation
Medium-Term (6-12 months)
Section titled “Medium-Term (6-12 months)”- Migrate to Docker for easier deployments
- Add Redis Cluster for high availability
- Implement CDN for static assets
- Add real-time features with Socket.io
Long-Term (12+ months)
Section titled “Long-Term (12+ months)”- Kubernetes for container orchestration
- Multi-region deployments
- Advanced ML model serving (TFX, MLflow)
- Microservices architecture
iSu Technologies Technology Stack | Version 1.0 | Last Updated: 11/11/2025 Built for scale, optimized for Africa, powered by modern technology