Welcome to Flockbase
Platform overview, architecture, and operational guidelines for church operations and attendance management.
What is Flockbase?
Flockbase is an enterprise-grade church attendance and operational management system. It provides church leadership, unit heads, and departmental volunteers with a transparent, accountable, and secure platform for managing church services, team attendance, excused absences, and member rosters.
Built with a modern stack—NestJS, PostgreSQL, Prisma, React, and Tailwind CSS—Flockbase ensures that data integrity is maintained at every level of church governance.
Core Pillars
1. Role-Scoped Governance
Flockbase enforces a strict 5-tier role hierarchy. Administrators cannot be modified by departmental leaders; departmental leaders are strictly confined to their assigned units; and executive authority is protected by hard invariants (such as a maximum of 5 Super Admins).
2. High-Integrity Attendance Engine
Attendance is tracked on a per-service, per-worker basis. System records distinguish between PRESENT, LATE, ABSENT, and EXCUSED states. Check-in is supported through:
- Dynamic time-limited QR codes scanned on-site.
- Self check-in within designated service time windows.
- Supervisory manual roll-call override with mandatory reason tracking.
3. Smart Two-Factor Device Trust
Every login checks whether the connecting device is recognized. Known trusted devices bypass unnecessary OTP prompts, while unrecognized browsers or IP shifts require instant SMS OTP verification via Termii. In local development, an automated zero-cost stub provides instant OTP bypass.
4. Transactional Communication
Worker invitations and administrative welcome packages are dispatched via Resend using official organization email templates (notifications.flockbase.live), ensuring credentials and links reach recipients securely.
System Architecture
The Flockbase ecosystem is distributed across specialized runtime layers:
┌─────────────────────────────────────┐
│ Users & Browsers │
└──────────────────┬──────────────────┘
│
┌───────────────────┴───────────────────┐
│ │
┌────────┴────────┐ ┌────────┴────────┐
│ Web Dashboard │ │ Documentation │
│ flockbase.live │ │docs.flockbase. │
│ (Vite + React) │ │ live │
└────────┬────────┘ └─────────────────┘
│
│ REST / Bearer JWT
▼
┌────────────────────────────────────────────────────────┐
│ Flockbase Core API │
│ (NestJS + Prisma) │
└────────┬───────────────────┬───────────────────┬───────┘
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ PostgreSQL │ │ Termii SMS │ │ Resend Email │
│ Database │ │ OTP Deliveries │ │ Notifications │
└─────────────────┘ └─────────────────┘ └─────────────────┘Documentation Roadmap
Explore the sections below to understand rules, workflows, and developer integrations:
Getting Started
Initial onboarding, setting up units, and team orientation.
Roles & Permissions
Complete 5-tier role matrix, security boundaries, and rules.
Admin Guide
Managing units, provisioning admins, worker lifecycles, and audit logs.
Unit Operations
Inviting workers via email and links, QR check-in, and unit rosters.
Attendance & Excuses
Service rosters, check-in flows, absence excuses, and disputes.
Authentication & OTP
Termii SMS verification, device trust cookies, and password security.
API Reference
Full REST API documentation, JWT schemas, and error codes.
Deployment Guide
Railway deployment, custom domain setup, and environment variables.