Plan — bahalaka App URL Structure

Where the web app lives, where the downloads live, how Capacitor fits in.

Intent

Define the URL structure for the bahalaka app on bahalaka.com so that the proposal site, the web app, and the native download pages all coexist cleanly under one domain.

The Decision

The Question

Should the app live at bahalaka.com/app/android and bahalaka.com/app/ios as separate paths?

Recommended: One App, One URL + Smart Download Page

bahalaka.com/               → proposal site (current, stays)
bahalaka.com/app/            → the web app (one codebase, works everywhere)
bahalaka.com/app/get/        → smart download page (auto-detects OS)

Why Not /app/android + /app/ios

Scope

Folder Structure on Disk

bahalaka/
  index.html                  ← proposal site (existing)
  be/                         ← Be artifacts
  app/
    index.html                ← web app shell (loads WASM + bridge)
    bahalaka.js               ← JS bridge (~500 LOC)
    libbahalaka.wasm          ← C→WASM binary
    libbahalaka.js            ← Emscripten glue
    pages/
      login.html              ← TOTP auth
      chat.html               ← messaging
      status.html             ← presence + GPS
      schedule.html           ← calendar + requests
      finances.html           ← allowance + ledger
      agreements.html         ← templates + signing
      stories.html            ← field guide
      settings.html           ← preferences
    css/
      app.css                 ← dark theme, mobile-first
    get/
      index.html              ← smart download page

The Download Page (/app/get/)

Approach

Cloudflare Pages Routing

Capacitor Config

// capacitor.config.ts
{
  appId: 'com.bahalaka.app',
  appName: 'bahalaka',
  webDir: 'app',           // points to the /app/ folder
  server: {
    androidScheme: 'https'  // uses https for local assets
  }
}

Capacitor's webDir points to the same /app/ folder. Native builds bundle it. Web deploys serve it. One source of truth.

Constraints

Summary

Three URLs, One Codebase

Share one link: bahalaka.com/app/get. It figures out the rest.