Enterprise-grade church management platform for Baptists and other faith communities. Full fund accounting, member management, giving tracking, and operations.
Tech Stack: FastAPI (Python) Β· PostgreSQL Β· Redis Β· React Β· Docker Β· DigitalOcean
# Clone the repo
git clone https://github.com/gitbuell/aiChurchFlow.git
cd aiChurchFlow
# Copy environment template
cp .env.example .env
# Start all services (Postgres, Redis, API, Frontend)
docker-compose up -d
# Wait for services to be healthy
docker-compose ps
# Access the app
# Frontend: http://localhost:3000
# API: http://localhost:8000
# API Docs: http://localhost:8000/docs# SSH into your DO Droplet (Ubuntu 22.04 recommended)
ssh root@your-droplet-ip
# Install Docker & Docker Compose
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo curl -L "https://github.com/docker/compose/releases/download/v2.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Clone repo
git clone https://github.com/gitbuell/aiChurchFlow.git /opt/church-admin
cd /opt/church-admin
# Create .env from template and edit values
cp .env.example .env
nano .env # Update with production values
# Start services
docker-compose up -d
# Verify all healthy
docker-compose pschurch-admin/
βββ services/
β βββ gateway/ # FastAPI reverse proxy (port 8000)
β βββ people-service/ # Members, households, pastoral care (port 8001)
β βββ finance-service/ # Donations, accounting, receipts (port 8002) [WIP]
β βββ groups-service/ # Small groups, volunteers (port 8003) [Planned]
β βββ events-service/ # Services, room booking (port 8004) [Planned]
β βββ comms-service/ # Email/SMS broadcast (port 8005) [Planned]
β βββ checkin-service/ # Child safety check-in (port 8006) [Planned]
β βββ content-service/ # Sermons, media (port 8007) [Planned]
β
βββ frontend/ # React SPA (port 3000)
βββ shared/ # Handoff schemas & audit logs
βββ infra/ # Docker, Kubernetes, Terraform
Design Principles:
- Decoupled Services: Each service is independent, scalable, replaceable
- Audit-Ready: Every write operation logged with user, timestamp, old/new values
- Encrypted: Sensitive data (pastoral notes, giving) encrypted at rest
- Production-Grade: Connection pooling, caching, error handling, graceful degradation
Manage members, households, and pastoral care.
Endpoints:
GET /api/v1/members List all members (paginated, filterable)
POST /api/v1/members Create new member
GET /api/v1/members/{id} Get single member
PATCH /api/v1/members/{id} Update member
DELETE /api/v1/members/{id} Soft-delete (mark inactive)
GET /api/v1/households List households
POST /api/v1/households Create household
GET /api/v1/households/{id} Get household with members
POST /api/v1/notes Add pastoral note (encrypted)
GET /api/v1/notes/{member_id} Get notes for member (staff only)
Database:
membersβ Core member recordshouseholdsβ Family groupingspastoral_notesβ Encrypted sensitive notesaudit_logsβ Compliance trail
Donations, fund accounting, tax receipts.
Features:
- Full GAAP fund accounting (restricted/unrestricted funds)
- Donor receipt generation
- Stripe + ACH integration
- Scheduled giving
- Annual 990 export
Planned rollout. Each service follows the same architecture as People Service.
- JWT-based on all endpoints (except health checks)
- Token expires in 24 hours (configurable)
- Roles:
admin,pastor,staff,member
- AES-256 at rest for:
- Pastoral notes
- Giving amounts (optional)
- Phone numbers / addresses (optional)
- Decryption only in memory for authorized staff
Every mutation (create/update/delete) logs:
- Who (user ID)
- What (entity type, ID, operation)
- When (timestamp)
- Before/After values (JSONB)
- IP address (for forensics)
-- Example audit query
SELECT * FROM audit_logs
WHERE entity_type='member' AND operation='update'
ORDER BY timestamp DESC LIMIT 10;- Create Ubuntu 22.04 Droplet ($12β24/mo)
- SSH in, install Docker
git clone+docker-compose up -d- Access via droplet IP on port 3000
Pros: Simple, cheap
Cons: All services on one machine; no auto-scaling
- Create DOKS cluster ($12/mo + node costs)
- Provision managed PostgreSQL ($15+/mo)
- Provision managed Redis ($15+/mo)
- Deploy services as Kubernetes workloads
- Auto-scaling, high availability, easy updates
Kubernetes manifests coming soon in infra/k8s/
CREATE TABLE members (
id UUID PRIMARY KEY,
household_id UUID REFERENCES households,
first_name VARCHAR(100) NOT NULL,
last_name VARCHAR(100) NOT NULL,
email VARCHAR(255) UNIQUE,
phone VARCHAR(20),
status ENUM('active', 'inactive', 'prospect', 'transferred', 'deceased'),
member_since DATETIME DEFAULT NOW(),
baptism_date DATETIME,
birth_date DATETIME,
address_line1 VARCHAR(255),
city VARCHAR(100),
state VARCHAR(50),
zip_code VARCHAR(10),
created_at DATETIME DEFAULT NOW(),
updated_at DATETIME DEFAULT NOW() ON UPDATE NOW(),
created_by UUID NOT NULL
);
CREATE INDEX idx_member_status_created ON members(status, created_at);
CREATE INDEX idx_member_household ON members(household_id);CREATE TABLE audit_logs (
id UUID PRIMARY KEY,
entity_type VARCHAR(50), -- 'member', 'donation', etc.
entity_id UUID,
operation VARCHAR(20), -- 'create', 'update', 'delete'
user_id UUID,
old_values JSONB,
new_values JSONB,
timestamp DATETIME DEFAULT NOW()
);
CREATE INDEX idx_audit_entity_timestamp ON audit_logs(entity_type, entity_id, timestamp);# Run all tests
docker-compose exec people-service pytest
# Run with coverage
docker-compose exec people-service pytest --cov=app
# Run specific test
docker-compose exec people-service pytest tests/test_members.py::test_list_membersOnce the gateway is running, visit:
http://localhost:8000/docs
This is Swagger UI with live request/response examples.
# Edit code locally (mounted in container)
vim services/people-service/app/models.py
# Services auto-reload on file changes (dev mode)
# Check logs
docker-compose logs -f people-service
# Run tests
docker-compose exec people-service pytest- Add route in
services/people-service/app/routes/members.py - Add schema in
app/schemas.pyif needed - Add model in
app/models.pyif new table - Test with
pytestor Swagger UI - Commit + push
# Check logs
docker-compose logs [service-name]
# Verify database is healthy
docker-compose exec postgres psql -U church_admin -d church_db -c "SELECT 1"
# Rebuild and restart
docker-compose down
docker-compose up --build -d# Run migrations manually
docker-compose exec people-service alembic upgrade head# Verify gateway is running
curl http://localhost:8000/health
# Check CORS settings in .env
# Default: CORS_ORIGINS=http://localhost:3000- Implement Finance Service (donations, accounting, receipts)
- Add Groups/Volunteers module
- Build Events & Scheduling
- Add Communication (Email/SMS broadcast)
- Implement Child Check-in (high-security)
- Deploy to Kubernetes on DO DOKS
- Set up monitoring (DataDog, New Relic, or open-source)
- Backup strategy (DO Spaces, automated snapshots)
For issues:
- Check logs:
docker-compose logs [service] - Review
.env.examplefor missing variables - Verify database connectivity:
docker-compose ps - Check Swagger UI for API errors:
http://localhost:8000/docs
Proprietary (Church Admin). Do not distribute without permission.
Making church operations simple, secure, and transparent.