A web application for managing church member contributions, savings balances, and micro-loans.
- Dashboard -- Overview of total members, deposits, outstanding loans, and monthly collections
- Members -- Searchable member list with savings balances and detailed profiles
- Transactions -- Record deposits and withdrawals, view full transaction history
- Loans -- Manage micro-loan applications, approvals, payments, and amortization schedules
- Reports -- Download Excel reports for transactions, balances, loans, and collections
- Member Portal -- Members can view their own account balance, history, and loan status
- Role-based Access -- Admin, Officer, and Member roles with appropriate permissions
- Next.js 16 (App Router)
- Prisma + SQLite (file-based database)
- Tailwind CSS + shadcn/ui (UI components)
- NextAuth.js (authentication)
- ExcelJS (report generation)
# Install dependencies
npm install
# Generate Prisma client
npx prisma generate
# Create the database
npx prisma db push
# Load demo data
npx prisma db seed
# Start the development server
npm run devOpen http://localhost:3000 in your browser.
All demo accounts use the password: password123
| Role | |
|---|---|
| Admin | admin@christfollowers.ph |
| Officer | maria.santos@christfollowers.ph |
| Member | juan.delacruz@christfollowers.ph |
src/
app/
(dashboard)/ # Admin/Officer pages
dashboard/ # Overview dashboard
members/ # Member list + detail
transactions/ # Transaction list + new form
loans/ # Loan list + detail + new form
reports/ # Excel report downloads
my-account/ # Member self-service portal
api/ # API routes
login/ # Login page
components/ # Reusable UI components
lib/ # Auth, Prisma, formatting utilities
prisma/
schema.prisma # Database schema
seed.ts # Demo data seed script
The app runs as a single Docker container with an embedded SQLite database -- no separate database server needed.
- A Linux server (e.g. DigitalOcean $6/mo droplet, Hetzner VPS, or any machine with Docker)
- Docker and Docker Compose installed
# 1. Clone the repo
git clone git@github.com:newmatik/cffs.git
cd cffs
# 2. Set your secret key (use a random string)
echo 'AUTH_SECRET=your-random-secret-here' > .env
# 3. Build and start
docker compose up -d --buildThe app will be running at http://your-server-ip:3000.
On first startup, the database is automatically created and seeded with demo accounts (see Demo Accounts above).
The SQLite database lives in a Docker volume. To back it up:
# Copy the database file out of the container
docker compose cp app:/app/data/cffs.db ./backup-$(date +%Y%m%d).dbgit pull
docker compose up -d --buildThe entrypoint script automatically applies any schema changes on startup.
To access the app via a domain name with HTTPS, put a reverse proxy like Caddy in front of it:
# Install Caddy on the server, then:
caddy reverse-proxy --from your-domain.com --to localhost:3000Caddy handles HTTPS certificates automatically.
All amounts are in Philippine Peso (PHP), displayed as ₱.