Skip to content

Project Structure

EdgeChat uses a frontend/backend Monorepo. The core code is divided primarily between frontend/ and worker/.

text
cfchat/
├─ frontend/          # Vue frontend
│  ├─ src/
│  │  ├─ demo/        # In-browser mock backend
│  │  └─ runtime.js   # Production runtime adapter
│  ├─ vite.config.js
│  └─ vite.demo.config.js
├─ worker/            # Cloudflare Worker backend
│  ├─ src/
│  ├─ migrations/
│  └─ schema.sql
├─ android/           # Temporarily deprecated native Kotlin + Jetpack Compose client
│  └─ app/            # Single app module organized by core/feature/ui packages
├─ capacitor/         # Primary Android release with the Vue Web UI bundled in the APK
│  └─ android/        # Small Kotlin bridge for file picking, notifications, and system navigation
├─ docs/api/          # OpenAPI 3.1 and WebSocket v1 contracts
├─ .github/
│  └─ workflows/
│     ├─ deploy-worker.yml
│     ├─ deploy-demo.yml
│     ├─ android-ci.yml
│     ├─ capacitor-android-ci.yml
│     └─ android-release.yml
├─ wrangler.toml
├─ wrangler.demo.toml
├─ package.json
└─ README.md

Key Directories

  • frontend/src/: pages, routing, state, and WebSocket logic
  • worker/src/: authentication, database access, APIs, and Durable Objects
  • worker/schema.sql: initial D1 schema
  • android/app/: temporarily deprecated native app retained for Room, WorkManager, and Compose verification
  • capacitor/: primary Android release that bundles the Vue frontend and accepts a self-hosted service URL
  • docs/api/: versioned mobile HTTP and WebSocket contracts
  • .github/workflows/deploy-worker.yml: GitHub Actions deployment workflow
  • frontend/src/demo/: fixtures, in-memory APIs, and simulated real-time connections for the frontend-only demo
  • .github/workflows/deploy-demo.yml: standalone demo workflow that only runs manually
  • .github/workflows/android-ci.yml: Android unit tests, Lint, and Debug APK build
  • .github/workflows/capacitor-android-ci.yml: Capacitor Web build, Android unit tests, Lint, and Debug APK build
  • .github/workflows/android-release.yml: signed APK/AAB, checksums, and GitHub Release for the primary Capacitor client
  • wrangler.demo.toml: static demo Worker configuration without data bindings

Resource Responsibilities

  • D1: users, groups, memberships, and messages
  • KV: login sessions
  • R2: files and avatars
  • Durable Objects: real-time rooms