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