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

متعلقہ مضامین