# Nazareth Church Management System
## System Overview & Functions

**Presbyterian Church of Ghana, Nazareth Congregation, La**

---

## Introduction

The Nazareth Church Management System is a comprehensive web-based application designed to streamline church administration, member management, financial tracking, and organizational activities. Built with PHP and MySQL, it provides a centralized platform for managing all aspects of church operations.

---

## Core Features

### 1. **Member Management**
- **Member Registration**: Add new members with comprehensive details including:
  - Personal information (name, title, gender, date of birth)
  - Contact details (phone, email, address, Ghana Post address, map links)
  - Status (communicant, child, youth, departed)
  - Marital status and occupation
  - Baptism and join dates
  - Emergency contact information
  - Photo uploads
- **Member Search & Filter**: Search by name, email, phone, or other criteria
- **Member Profiles**: Detailed view of each member including:
  - Personal and contact information
  - Household assignment
  - Fellowship assignment (auto-calculated by age/gender)
  - Ministry memberships
  - Financial contribution history
  - Transaction records
- **Member Analytics**: Visual dashboards showing:
  - Total members by status
  - Age distribution charts
  - Gender distribution
  - Fellowship breakdown
  - Missing contact information reports
- **Member Directory**: Exportable directory view of all members
- **Departed Members**: Separate tracking for deceased members

### 2. **Household Management**
- Create and manage family households
- Assign members to households
- Designate head of household
- View household members and details
- Track family relationships

### 3. **Fellowships**
- Automatic fellowship assignment based on age and gender:
  - **Children's Service** (ages 0-12)
  - **Junior Youth** (ages 12-18)
  - **YPG** (Young People's Group, ages 18-30)
  - **YAF** (Young Adults Fellowship, ages 30-40)
  - **Men's Fellowship** (males 40+)
  - **Women's Fellowship** (females 40+)
- View members by fellowship category
- Fellowship-based member listings

### 4. **Ministries**
- Create and manage church ministries
- Assign members to multiple ministries
- View ministry membership lists
- Age restrictions: Only members 18+ can belong to ministries
- Ministry member management

### 5. **Financial Management**
- **Fund Management**: Create and organize offering funds:
  - Tithes, Building Fund, Harvest, Sunday offerings, etc.
  - Personal funds for individual members
  - Parent-child fund relationships (e.g., day offerings roll up to Harvest)
  - Fund targets and budgets
- **Transaction Recording**: Record offerings and contributions:
  - Link transactions to specific funds
  - Associate with members (optional)
  - Add notes and dates
  - Track who recorded each transaction
- **Financial Reports**:
  - Monthly and yearly summaries
  - Fund-wise breakdowns
  - Member contribution reports
  - Budget vs. actual comparisons
  - Financial trends and analytics
- **Receipts**: Generate and email receipts for contributions
- **Budget Management**: Set targets and track progress

### 6. **Birthday Management**
- View today's birthdays
- View upcoming birthdays (next 7 days)
- Birthday calendar view
- **Automatic Birthday Wishes**:
  - Send SMS and/or email greetings
  - Customizable message templates
  - Automated daily sending

### 7. **Events Management**
- Create and manage church events
- Event details: title, date, time, location, description
- **Preaching Plan**: Schedule Sunday services with:
  - Service dates
  - Occasions
  - Preacher assignments
  - Service types
- Event reminders (optional SMS/email notifications)
- View upcoming events on dashboard

### 8. **User Management & Roles**
- **Admin**: Full system access to all features
- **Clerk**: View-only access to Members list
- **Finance**: Access to Finance module and Members (view-only)
- **Voting**: Access to Voting system and Members (view-only)
- **System Admin**: System-level administration (multi-church support)
- User creation and password management
- Role-based access control

### 9. **Voting System**
- Create and manage elections
- Define positions (e.g., Presbyters, Deacons)
- Add candidates
- Member voting interface
- Vote tracking and results
- Election management by voting administrators

### 10. **Dashboard**
- Overview of key statistics:
  - Total members, households, ministries
  - Events this month
  - Birthdays today
- Quick access cards:
  - Today's birthdays
  - Upcoming birthdays
  - Upcoming events
  - Offerings this month
  - Recent activity (transactions, new members, events)
  - Quick links to major sections

### 11. **Settings & Configuration**
- **Email (SMTP) Configuration**:
  - SMTP server settings
  - From email and name
  - Test email functionality
- **SMS Configuration**:
  - Support for Arkesel and Twilio providers
  - Sender number/name configuration
  - SMS balance checking (Arkesel)
- **Birthday Messages**:
  - Enable/disable SMS and email sending
  - Customize message templates
- **System Settings**: Various application preferences

### 12. **Reports & Analytics**
- Member analytics with charts and statistics
- Financial reports and summaries
- Missing data reports (contact information)
- Export capabilities

---

## Technical Features

### Security
- Session-based authentication
- Password hashing (bcrypt)
- Role-based access control
- SQL injection protection (prepared statements)
- XSS protection (input sanitization)
- Desktop-only access (mobile/tablet blocked for security)

### Communication
- **Email**: PHPMailer integration for sending emails
- **SMS**: Support for Arkesel and Twilio SMS providers
- Automated birthday wishes via SMS/email
- Event reminders

### Data Management
- MySQL database backend
- Photo uploads for members
- Data export capabilities
- Backup-friendly database structure

---

## User Interface

- Clean, modern dashboard design
- Responsive card-based layouts
- Intuitive navigation sidebar
- Search and filter capabilities
- Toast notifications for user feedback
- Form validation and error handling

---

## Installation & Setup

1. **Database Setup**: Run the installer to create database and tables
2. **Default Admin**: Username `admin`, Password `admin123` (change after first login)
3. **Configuration**: Set up SMTP and SMS credentials in Settings
4. **Security**: Delete install folder after setup

---

## System Requirements

- PHP 7.4 or higher
- MySQL 5.7 or higher
- Web server (Apache/Nginx)
- Composer (for PHP dependencies)

---

## Use Cases

- **Member Registration**: Register new church members with complete profiles
- **Financial Tracking**: Record offerings, track funds, generate reports
- **Event Planning**: Schedule services, events, and preaching assignments
- **Communication**: Send birthday wishes and event reminders
- **Administration**: Manage ministries, households, and user access
- **Analytics**: Generate insights on membership and finances
- **Voting**: Conduct church elections and track results

---

## Benefits

- **Centralized Management**: All church data in one place
- **Time Savings**: Automated processes (birthday wishes, fellowship assignment)
- **Data Accuracy**: Structured data entry and validation
- **Financial Transparency**: Detailed financial tracking and reporting
- **Member Engagement**: Easy access to member information and history
- **Scalability**: Handles growing membership and data efficiently

---

*For technical support or questions, refer to the system administrator.*
