Skip to content

Latest commit

History

1,042 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Project Janatha

The official app to connect the CHYKs of Chinmaya Mission West.

Om Sri Chinmaya Sadgurave Namaha. Om Sri Gurubyo Namaha.

Tech Stack

  • Frontend: Expo (React Native) — web + iOS + Android from one codebase
  • Backend: Hono on Cloudflare Workers (Pages Functions)
  • Database: Cloudflare D1 (SQLite at the edge)
  • Auth: PBKDF2 password hashing + JWT (via jose)

Project Structure

├── packages/
│ ├── frontend/ # Expo app (screens, components, auth)
│ └── backend/ # Hono API (routes, DB queries, auth)
├── functions/
│ └── api/[[route]].ts # CF Pages Functions entry point
├── migrations/ # D1 SQL migrations
├── wrangler.toml # Cloudflare Pages config
└── package.json # npm workspaces root

Local Development

Prerequisites

  • Node.js >= 20
  • npm >= 10
  • A Cloudflare account with wrangler CLI configured (for deployment)

Setup

git clone https://github.com/Project-Janatha/Project-Janatha.git
cd Project-Janatha
# One command for a fully working local stack: installs deps, applies all# migrations to a sandboxed local D1, seeds centers/events, and registers the# 5 Developer-Mode role accounts (member@/sevak@/admin@… · PreviewTest2026!).
npm run setup:local
# (lower-level: `npm run setup` installs + migrates + seeds, no role accounts)

Running

npm run local# setup:local, then start API (8787) + Frontend (8081)
npm run dev # Just start both (API 8787 + Frontend 8081)

Other dev commands

CommandDescription
npm run devStart API + frontend
npm run dev:backendStart only the API server
npm run dev:frontendStart only the Expo dev server
npm run d1:migrate:localRun D1 migrations
npm run buildTypecheck + build frontend

Running on mobile

npm run ios # Requires Xcode
npm run android # Requires Android Studio

Deployment

The app deploys to Cloudflare Pages (frontend) and Cloudflare Workers (backend API) with D1.

First-time setup

  1. Create the D1 database:
npx wrangler d1 create chinmaya-janata-db --config packages/backend/wrangler.toml
  1. Update database_id in packages/backend/wrangler.toml with the ID from the output.

  2. Run migrations:

npm run d1:migrate # Remote database
  1. Set secrets for the backend:
cd packages/backend
npx wrangler secret put JWT_SECRET
npx wrangler secret put JWT_REFRESH_SECRET

Deploy

npm run deploy # Deploy both frontend + backend
npm run deploy:frontend # Frontend only
npm run deploy:backend # Backend only

Running Tests

# Backend unit tests (vitest + Cloudflare Workers pool)cd packages/backend && npm test# E2E tests (Playwright)
npx playwright test

About

The official project to connect the CHYKs of CMW!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages