A premium, modern, and highly interactive Full-Stack web application designed to facilitate members' registration and provide administrators with a robust analytics and CRUD dashboard. Built using a Node.js + Express backend (hosted on Render and connected to a Supabase PostgreSQL database) and a React + Tailwind CSS v4 frontend (hosted on cPanel).
- 4-Step Multi-Stage Form:
- Personal Info: Standard bio-data, Whatsapp verification, and age categorization.
- Spiritual Details: Salvation experience field (conditional on "Born Again" status), baptism info, home church name, and completed discipleship courses checklist.
- Parent/Guardian Info: Emergency contact details, relationship type, and current location.
- Academic & Additional Details: LAUTECH-specific fields (Faculty, Department, level selection, hostel address) which toggle dynamically based on student status.
- Client-Side Validation: Immediate step-level validation preventing invalid submissions.
- Dynamic Animations: Smooth transitions between form steps powered by
Framer Motion. - Success Page: Sleek confirmation view showing details have been logged.
- Secure Access: Protected dashboard routes utilizing JWT-based bearer authorization.
- Local Storage Integration: Persistent admin sessions checking token validity with the server.
- Auto-Seeding: Backend dynamically seeds a default administrator account in the PostgreSQL database on initial run using environment config credentials.
- High-Fidelity UI: Redesigned utilizing a sleek, dark-slate sidebar (
bg-slate-950) and warm brand-orange highlights, matching the professional church management template. - Overview & Statistics (
/admin/overview):- Overview Metrics: Active counters for total registered members, LAUTECH students, single members, and born-again statuses.
- Recharts Data Visualizations: Beautiful, custom themed charts displaying gender ratios, age range categories, LAUTECH student/non-student levels, and monthly registration trends.
- Course Analytics: Progress tracking for completed discipleship classes.
- Member Management (
/admin/members):- CRUD Operations: Comprehensive grid displaying registrations, supporting profile additions, detailed views, full profile edits, and member deletion.
- Search & Filters: Real-time multi-criteria searching on Name, Email, and Phone number; filters for Gender, Age-Range, Born-Again Status, LAUTECH Student Status, Faculty, and Marital Status.
- Sorting & Pagination: Clean column sorting and pagination layouts.
- CSV Data Exporter: Instant download of all registered members' records formatted into a clean, comma-separated spreadsheet (
.csv).
| Component | Technology | Description |
|---|---|---|
| Frontend | React 19 | Core UI library for components |
| Styling | Tailwind CSS v4 + Vanilla CSS | Modern utility framework with @import-based config |
| Routing | React Router DOM v7 | Client-side routing and protected route wrappers |
| Animations | Framer Motion | Smooth component transitions and stepper progress |
| Charts | Recharts | Dynamic data visualizations for dashboard analytics |
| Icons | Lucide React + React Icons | Harmonious and premium visual indicators |
| Backend | Node.js + Express | RESTful API server |
| Auth | JWT (jsonwebtoken) + bcryptjs | Protected endpoints and secure credential hashing |
| Database | PostgreSQL (Supabase) | Managed Relational SQL Database |
hgbcmembership/
├── .github/ # Github configuration
├── server/ # Backend API Engine
│ ├── .env # Port, JWT Secret, DB parameters, and Default Admin credentials
│ ├── server.js # Express application & API endpoints
│ ├── db.js # MySQL database connector (tables setup, queries)
│ ├── package.json # Server dependencies
│ └── node_modules/ # Server package binaries
├── src/ # Frontend Application
│ ├── assets/ # Images, logos, static illustrations
│ ├── components/ # Reusable UI widgets
│ │ └── dashboard/ # Sidebar.jsx, Header.jsx
│ ├── constants/ # Layout limits and static drop-down arrays
│ ├── pages/ # Main Application Screen components
│ │ ├── dashboard/ # AdminLayout.jsx, Overview.jsx, Members.jsx
│ │ ├── MembershipForm.jsx# Interactive stepper form page
│ │ ├── Signin.jsx # Admin sign-in screen
│ │ └── Success.jsx # Success landing page
│ ├── App.css # Page-specific styling rules
│ ├── index.css # Tailwind v4 configuration and custom font sets
│ ├── App.jsx # Main Routing hub and ProtectedRoute component
│ └── main.jsx # React Client Entry mount
├── workflows/ # Deployment Pipelines
│ └── cpanel_deploy.yml # FTP deployment script to web host
├── index.html # Main SPA page frame
├── vite.config.js # Build configuration for Vite
├── tailwind.config.js # Optional styling configurations
├── package.json # Client dependencies
└── README.md # Project documentation (this file)
Create a .env file inside the server directory using the following template:
PORT=5000
JWT_SECRET=hgbc_secret_key_2026_jwt
ADMIN_EMAIL=admin@hgbc.org
ADMIN_PASSWORD=hgbcadmin123
# PostgreSQL Configurations (DATABASE_URL is recommended for Supabase/Render)
DATABASE_URL=postgresql://postgres:[YOUR_PASSWORD]@aws-0-[REGION].pooler.supabase.com:6543/postgres
# Alternatively, configure individual PostgreSQL components:
# DB_HOST=localhost
# DB_PORT=5432
# DB_USER=postgres
# DB_PASSWORD=your_password
# DB_NAME=hgbcmembership
# DB_SSL=trueImportant
- Supabase Connection SSL: Supabase requires SSL to connect. The database client will automatically enable SSL if
DATABASE_URLis provided or ifDB_SSL=trueis set. - Seeding: The admin seed credentials
ADMIN_EMAILandADMIN_PASSWORDare automatically populated in the PostgreSQLuserstable upon the server's first execution if it is empty.
- Node.js (v18.0.0 or higher recommended)
- npm (v9.0.0 or higher)
- Navigate to the server folder:
cd server - Install the backend dependencies:
npm install
- Configure the
.envsettings as described in the configuration section. - Run the server locally:
The backend API server will start on
npm run dev
http://localhost:5000.
- Return to the root project folder:
cd .. - Install the client-side dependencies:
npm install
- Start the Vite local server:
npm run dev
- Access the web portal at the address output by Vite (typically
http://localhost:5173).
-
Submit Member Details
- Method:
POST - Path:
/api/members - Request Body: A JSON representation of the member data payload.
- Returns: Confirmation message and newly created Member ID.
- Method:
-
Admin Login
- Method:
POST - Path:
/api/auth/login - Request Body:
{ "email": "admin@hgbc.org", "password": "hgbcadmin123" } - Returns: Session token (JWT) and user attributes.
- Method:
-
Token Verification
- Method:
GET - Path:
/api/auth/verify
- Method:
-
Get Members List (with query filters, sort & search)
- Method:
GET - Path:
/api/members
- Method:
-
Retrieve Single Member Profile
- Method:
GET - Path:
/api/members/:id
- Method:
-
Update Member Details
- Method:
PUT - Path:
/api/members/:id
- Method:
-
Delete Member Profile
- Method:
DELETE - Path:
/api/members/:id
- Method:
-
Aggregate Dashboard Statistics
- Method:
GET - Path:
/api/stats
- Method:
-
Download Members CSV Export
- Method:
GET - Path:
/api/members/export
- Method:
The portal comes configured with a GitHub Actions workflow in workflows/cpanel_deploy.yml. When changes are pushed to the main branch, the workflow:
- Installs client packages.
- Compiles a production build using
npm run build. - Uploads the output bundle contents inside
./dist/to the cPanel web host server using FTPS protocol.
For continuous deployment configuration, add the following secrets to your GitHub Repository settings:
FTP_SERVER- cPanel FTPS server address.FTP_USERNAME- FTP user account name.FTP_PASSWORD- FTP user security password.