A comprehensive, performance-optimized church management system for tracking new convert spiritual growth, milestone progression, and attendance across monthly groups.
FLCSeek is a Progressive Web App (PWA) designed to help churches systematically track and nurture new converts through their spiritual journey. It provides role-based dashboards, real-time progress monitoring, bulk registration tools, and analytics to ensure no new believer falls through the cracks.
β
Month-Based Organization - Organize new converts by registration month (January - December)
β
18 Milestone Progression - Track spiritual growth through 18 customizable milestones
β
Attendance Tracking - Monitor church attendance with 26-week goal
β
Role-Based Access Control - Super Admin, Lead Pastor, Admin (Month Leader), and Sheep Seeker roles
β
Bulk Registration - Register multiple converts via Excel import
β
Real-Time Analytics - Department performance dashboards with visual progress indicators
β
Performance Optimized - Sub-second page loads with advanced database indexing
β
Theme Support - Light and dark mode with WCAG AA color contrast compliance
- Node.js 18+ and npm installed
- A Neon Database account (free tier available)
git clone https://github.com/firstlovecenter/flcseek.git
cd flcseek
npm install- Create a free Neon database account at neon.tech
- Create a new project (choose your preferred region)
- Copy your connection string (looks like
postgresql://user:pass@host/database)
Create a .env.local file in the root directory:
# Database Connection (REQUIRED)
NEON_DATABASE_URL=postgresql://username:password@host.neon.tech/database?sslmode=require
# Authentication Secret (REQUIRED - Change this to a random string!)
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production-min-32-charsπ Security Note: Generate a strong JWT_SECRET using:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Run the initial migration to create all tables, indexes, and seed data:
npm run db:setupThis will create:
- 6 database tables (
users,groups,milestones,new_converts,progress_records,attendance_records) - 15+ performance indexes for optimized queries
- Default superadmin account (username:
superadmin, password:admin123) - 18 spiritual growth milestones
- 12 month groups for 2025
npm run devVisit http://localhost:3000 and log in with:
- Username:
superadmin - Password:
admin123 - Role: Super Administrator (full system access)
- Full System Access - Manage all months, users, and converts
- User Management - Create admin and sheep seeker accounts
- Milestone Customization - Define and edit spiritual growth stages
- Analytics Dashboard - View system-wide statistics and trends
- Bulk Operations - Export data, bulk delete records
- Database Management - Run migrations, view table statistics
- Multi-Month View - Track progress across all monthly groups
- Comparative Analytics - See which months are performing well
- Leadership Oversight - Monitor sheep seeker effectiveness
- Progress Reports - Generate month-by-month progress reports
- Month Management - Oversee a specific monthly group
- Convert Registration - Register new converts (bulk or individual)
- Progress Tracking - View milestone completion for all group members
- Attendance Management - Mark attendance for group members
- Assigned Converts - Manage specific converts in your month
- Milestone Updates - Mark milestones as completed
- Attendance Recording - Track church attendance
- Individual Progress - View detailed convert profiles
- Quick Actions - Fast navigation to common tasks
| Technology | Purpose |
|---|---|
| Next.js 13 | React framework with App Router and Server Components |
| TypeScript | Type-safe development |
| Ant Design | Professional UI component library |
| Tailwind CSS | Utility-first CSS framework |
| Neon Database | Serverless PostgreSQL with auto-scaling |
| JWT + bcrypt | Secure authentication and password hashing |
| next-pwa | Progressive Web App capabilities |
- users - User accounts with role-based access
- groups - Month-based groups (e.g., "January 2025")
- milestones - Spiritual growth stages (18 default stages)
- new_converts - Registered new converts with contact info
- progress_records - Milestone completion tracking
- attendance_records - Church attendance records
- 15+ strategic indexes on frequently queried columns
- Optimized JOIN queries eliminate N+1 problems
- Single-query data fetching with JSON aggregation
- Partial indexes for conditional filtering
flcseek/
βββ app/ # Next.js 13 App Router
β βββ api/ # API Routes
β β βββ auth/ # Authentication endpoints
β β βββ people/ # Convert management APIs
β β β βββ with-progress/ # Optimized endpoint (eliminates N+1)
β β β βββ with-stats/ # Aggregated stats endpoint
β β β βββ bulk/ # Bulk registration
β β βββ milestones/ # Milestone CRUD
β β βββ groups/ # Group management
β β βββ attendance/ # Attendance tracking
β β βββ progress/ # Progress updates
β β βββ superadmin/ # Admin-only endpoints
β βββ sheep-seeker/ # Sheep Seeker dashboard
β β βββ page.tsx # Main milestone board
β β βββ progress/ # Progress view
β β βββ attendance/ # Attendance tracking
β β βββ people/ # Convert registration
β βββ leader/ # Admin (Month Leader) dashboard
β βββ leadpastor/ # Lead Pastor dashboard
β β βββ [month]/ # Month-specific views
β βββ superadmin/ # Super Admin dashboard
β β βββ users/ # User management
β β βββ groups/ # Group management
β β βββ milestones/ # Milestone configuration
β β βββ converts/ # All converts view
β β βββ analytics/ # System analytics
β β βββ database/ # Database management
β βββ person/[id]/ # Individual convert profile
β βββ layout.tsx # Root layout with theme provider
β βββ globals.css # Global styles with theme variables
βββ components/ # Reusable React components
β βββ ui/ # shadcn/ui components
β βββ Navigation.tsx # Role-based navigation
β βββ TopNav.tsx # Top navigation bar
β βββ PullToRefresh.tsx # Mobile pull-to-refresh
βββ contexts/
β βββ AuthContext.tsx # Authentication context
βββ lib/ # Utility functions
β βββ auth.ts # JWT token management & bcrypt
β βββ neon.ts # Database connection & query helper
β βββ constants.ts # App-wide constants
β βββ utils.ts # Helper functions
βββ db/
β βββ migrations/ # Database migrations
β βββ 000_initial_setup.sql # Complete schema setup (NEW!)
β βββ 013_add_performance_indexes.sql
β βββ 013_remove_full_name_column.sql
βββ public/ # Static assets
β βββ manifest.json # PWA manifest
β βββ sw.js # Service worker (auto-generated)
β βββ icons/ # PWA icons
βββ .env.local # Environment variables (create this)
βββ next.config.js # Next.js configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ package.json # Dependencies & scripts
Super Admin (Full Access)
β
Lead Pastor (All Months Read)
β
Admin (Single Month Edit Access)
β
Leader (Single Month View Access)
| Feature | Super Admin | Lead Pastor | Admin | Leader |
|---|---|---|---|---|
| View All Months | β | β | β | β |
| Manage Assigned Month | β | β | β | β |
| Register New Converts | β | β | β | β |
| Mark Milestones | β | β | β | β |
| Track Attendance | β | β | β | β |
| Create Users | β | β | β | β |
| Edit Milestones | β | β | β | β |
| View Analytics | β | β | β | β |
| Database Management | β | β | β | β |
| Bulk Delete | β | β | β | β |
-
Connect Repository
# Push your code to GitHub git remote add origin https://github.com/yourusername/flcseek.git git push -u origin main -
Configure Netlify
- Go to netlify.com and click "New site from Git"
- Select your repository
- Build settings:
- Build command:
npm run build - Publish directory:
.next
- Build command:
-
Set Environment Variables In Netlify Dashboard β Site settings β Environment variables:
NEON_DATABASE_URL=your_production_database_url JWT_SECRET=your_production_jwt_secret -
Deploy
- Click "Deploy site"
- Your app will be live at
https://your-site-name.netlify.app
npm install -g vercel
vercel --prodSet environment variables in Vercel Dashboard or via CLI:
vercel env add NEON_DATABASE_URL production
vercel env add JWT_SECRET production- Log in as admin
- Navigate to Super Admin β Users
- Click on admin user β Edit β Change Password
- Super Admin β Users β Create User
- Fill in username, role, and assign to group (for admins/leaders)
- Provide credentials to new user
- Super Admin β Milestones
- Edit existing milestones or add new ones
- Stage numbers must be unique (1-99)
- Download Excel template from Sheep Seeker β Bulk Register
- Fill in convert information (Name, Phone, DOB, Gender, Location)
- Upload Excel file
- Review and confirm registration
- Super Admin β Groups β Create Group
- Create 12 groups for new year (e.g., "January 2026")
- Assign leaders to each month
- Super Admin β Database Management
- View available migrations
- Click "Run Migration" on pending migrations
- Super Admin β Converts
- Use filters (month, progress status, etc.)
- Click "Export to Excel"
FLCSeek has been heavily optimized for performance:
| Metric | Before | After | Improvement |
|---|---|---|---|
| Milestone Board Load (100 people) | 12s | <1s | 92% faster |
| API Requests per Page | 101 | 1 | 99% reduction |
| Bulk Registration (50 people) | 8s | <1s | 87% faster |
| Database Queries (progress fetch) | 202+ | 1 | 99.5% reduction |
β
Eliminated N+1 query problem with JOIN aggregation
β
Strategic database indexes on all foreign keys
β
HTTP caching with stale-while-revalidate
β
Bulk INSERT operations instead of loops
β
Server-side data aggregation
β
Single-query data fetching with JSON_AGG
See PERFORMANCE_OPTIMIZATIONS.md for technical details.
Problem: "Database connection not configured" error
Solution:
- Verify
.env.localfile exists in root directory - Check
NEON_DATABASE_URLis correctly formatted - Ensure connection string includes
?sslmode=require - Test connection:
psql $NEON_DATABASE_URL -c "SELECT 1"
Problem: Build fails with TypeScript errors
Solution:
# Clear Next.js cache and rebuild
rm -rf .next
npm run buildProblem: Migration fails with "relation already exists"
Solution:
This is normal if tables already exist. The migrations use IF NOT EXISTS clauses and will skip existing structures.
Problem: "Invalid credentials" despite correct password
Solution:
- Verify superadmin account exists:
SELECT username, role FROM users WHERE username = 'superadmin';
- If issues persist, verify environment variables and database connectivity.
Problem: Pages load slowly despite optimizations
Solution:
- Verify performance indexes are created:
# Check if indexes exist psql $NEON_DATABASE_URL -c "\d+ progress_records"
- Run index migration if missing:
- Super Admin β Database β Run Migration
013_add_performance_indexes.sql
- Super Admin β Database β Run Migration
npm run devnpm testnpm run build
npm startnpm run lint# Setup database (run once)
npm run db:setup
# Run specific migration
psql $NEON_DATABASE_URL -f db/migrations/000_initial_setup.sql
# Check database schema
psql $NEON_DATABASE_URL -c "\dt" # List tables
psql $NEON_DATABASE_URL -c "\d+ users" # Describe tableAll API endpoints require JWT authentication via Authorization: Bearer <token> header.
Login:
POST /api/auth/login
Content-Type: application/json
{
"username": "superadmin",
"password": "admin123"
}
Response: { "token": "jwt_token_here", "user": {...} }| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/auth/login |
POST | β | User login |
/api/people/with-progress |
GET | β | Fetch people with progress (optimized) |
/api/people/bulk |
POST | β | Bulk register converts |
/api/milestones |
GET | β | Get all milestones (cached 1hr) |
/api/progress/[person_id] |
PUT | β | Update milestone progress |
/api/attendance/[person_id] |
POST | β | Mark attendance |
/api/groups |
GET | β | List groups |
/api/superadmin/users |
GET/POST | β (superadmin) | User management |
See inline code documentation for detailed API schemas.
This is a proprietary project for First Love Church. For feature requests or bug reports, contact the development team.
- Follow TypeScript strict mode
- Use Ant Design components for consistency
- Write optimized database queries
- Test on mobile devices (PWA focus)
- Maintain WCAG AA color contrast compliance
Proprietary Β© 2025 First Love Church (FLC). All rights reserved.
For Organizations Interested in Forking:
- Fork the repository
- Run the
000_initial_setup.sqlmigration on your Neon database - Update branding in
app/layout.tsxandpublic/manifest.json - Customize milestones in Super Admin dashboard
- Deploy to Netlify/Vercel with your own environment variables
Support: For setup assistance, email your dev team or create an issue in the repository.
- Technical Issues: Check PERFORMANCE_OPTIMIZATIONS.md and this README
- Database Issues: Review db/migrations/000_initial_setup.sql
- Feature Requests: Contact church tech team
Built with β€οΈ for First Love Church | Version 2.0 | October 2025