2 min readMohammad Shaker
[اردو] How We Built a Multi-App Platform From a Single Codebase
[Urdu Translation] Alphazed operates 7+ educational apps (Amal, Thurayya, Qais, KidElite, Alphazed School) from a single backend codebase and shared Flutter mobile frame...
Engineering
فوری جواب
[Urdu Translation] Alphazed operates 7+ educational apps (Amal, Thurayya, Qais, KidElite, Alphazed School) from a single backend codebase and shared Flutter mobile frame...
# How We Built a Multi-App Platform From a Single Codebase
[Urdu content]
## How We Built a Multi-App Platform From a Single Codebase
Alphazed operates 7+ educational apps (Amal, Thurayya, Qais, KidElite, Alphazed School, Alphazed Montessori, and more) from a single backend codebase and a shared Flutter mobile framework. Each app gets its own database tables (prefixed), configuration, push notifications, email templates, and content — but shares authentication (AWS Cognito), analytics infrastructure, and core learning algorithms.
### Backend: Runtime App Selection
**How It Works**
At deployment, an environment variable selects the app:
```bash
# Deploy Amal
export APP_NAME=amal
serverless deploy
# Deploy Thurayya
export APP_NAME=thurayya
serverless deploy
# Deploy Qais
export APP_NAME=qais
serverless deploy
```
Each deployment creates independent Lambda functions, API Gateway routes, and monitoring—but they all connect to the same backend codebase.
**Three-Tier Config Priority**
```python
# src/config.py
import os
app_name = os.getenv('APP_NAME', 'amal')
# Tier 1: Exact app match
config = load_json(f'config/{app_name}.json')
# Tier 2: App family match (if exact config doesn't exist)
if not config:
family = app_name.split('_')[0] # 'amal_beta' → 'amal'
config = load_json(f'config/{family}.json')
# Tier 3: Default
if not config:
config = load_json('config/default.json')
```
**Per-App Configuration** (`config/amal.json`)
```json
{
"app_name": "amal",
"app_id": "com.alphazed.amal",
"database": {
"table_prefix": "a
![[اردو] Serverless at Scale: Running Arabic EdTech on AWS Lambda](/_next/image?url=%2Fimages%2Fblog%2Fserverless-scale-aws-lambda-edtech.jpg&w=3840&q=75)
![[اردو] Our Rive Animation Pipeline: Bringing Arabic Characters to Life](/_next/image?url=%2Fimages%2Fblog%2Frive-animation-pipeline-arabic-characters.jpg&w=3840&q=75)
![[اردو] How We Generate 10,000+ Educational Content Items With AI Pipelines](/_next/image?url=%2Fimages%2Fblog%2Fai-pipelines-generate-10000-educational-content.jpg&w=3840&q=75)