Skip to main content

B1 Admin

B1Admin is the church administration dashboard -- a React single-page application built with Vite and Material-UI. Church staff use it to manage people, groups, attendance, donations, content, and more.

Prerequisites

  • Node.js 22+
  • Git

Setup

1. Clone the repository

git clone https://github.com/ChurchApps/B1Admin.git

2. Install dependencies

cd B1Admin
npm install

3. Configure environment variables

cp dotenv.sample.txt .env

Open .env and configure the API endpoints. You can point them at either the staging API or your local API instance.

4. Start the dev server

npm start

This launches the Vite dev server. The app will be available in your browser with hot module replacement enabled.

Key Environment Variables

VariableDescription
REACT_APP_STAGEEnvironment name (e.g., local, staging, prod)
PORTDev server port (default: 3101)
REACT_APP_*_APIAPI endpoint URLs for each module
info

The postinstall script copies locale and CSS files from @churchapps/apphelper. If components look unstyled, run npm run postinstall manually.

Key Commands

CommandDescription
npm startStart Vite dev server
npm run buildProduction build via Vite
npm run testRun end-to-end tests with Playwright
npm run lintRun ESLint with auto-fix

Tech Stack

  • React 19 with TypeScript
  • Vite for build tooling and dev server
  • Material-UI 7 for UI components
  • React Query 5 for server state
  • @churchapps/apphelper* packages for shared components

Deployment

Production builds are deployed to S3 + CloudFront:

  1. npm run build generates static assets
  2. Assets are synced to an S3 bucket
  3. CloudFront invalidation is triggered to serve the new version