# YA Zone 5 Volunteer Management Platform - Technical Specification ## 1. Project Overview **Project Name:** YA Zone 5 Connect - Volunteer Management Platform **Organization:** Young Adult (YA) - Zone 5 **Target Users:** 15,000 volunteers across Zone 5 **Project Goal:** Comprehensive digital platform for dual-hierarchy volunteer management ## 2. Organizational Structure ### 2.1 Dual Hierarchy System ```mermaid graph TD A[Zone Coordinator - Zone 5] --> B[Geographic Structure] A --> C[Departmental Structure] B --> D[Sector Coordinator 1] B --> E[Sector Coordinator 2] B --> F[Sector Coordinator N] D --> G[Center 1] D --> H[Center 2] D --> I[Centers 3-7] E --> J[Center 8] E --> K[Center 9] E --> L[Centers 10-14] G --> M[Volunteers] H --> M I --> M J --> M K --> M L --> M C --> N[FC - IT Team] C --> O[FC - Creative Team] C --> P[FC - 28 Other Depts] N --> Q[Team Lead 1] N --> R[Team Lead 2] O --> S[Team Lead 3] Q --> T[Cross-Location Volunteers] R --> T S --> T P --> T style A fill:#ff9999 style B fill:#99ccff style C fill:#99ff99 style M fill:#ffcc99 style T fill:#ffcc99 ``` **Geographic Hierarchy:** - **Zone Coordinator** (Zone 5) - **Sector Coordinators** (Managing 5-7 centers each) - **Center Coordinators** (Individual center management) - **Volunteers** (Center-based, every volunteer must have center affiliation) **Departmental Hierarchy:** - **Zone Coordinator** (Overall oversight) - **Functional Coordinators (FCs)** (30 departments - IT, Creative, Media, Events, etc.) - **Team Leads (TLs)** (Internal department teams) - **Volunteers** (Cross-location, primary + secondary department affiliations) ### 2.2 Key Rules - Every volunteer MUST be affiliated with a center - Volunteers can have primary + secondary department affiliations - FCs report to Zone Coordinators - Zone Coordinators cannot be FCs - Center Coordinators have authority over center matters - FCs have authority over departmental matters ## 3. User Roles & Detailed Permissions ### 3.1 Role Definitions **Zone Coordinator:** - Complete oversight of Zone 5 (geographic + departmental) - Can see all data across centers and departments - Approval authority for department join/leave requests - Can broadcast to entire zone **Sector Coordinator:** - Manages 5-7 centers within their sector - Geographic focus with cross-district scope - Approval authority for profile changes - Can broadcast to sector volunteers **Center Coordinator:** - Manages individual center - Direct interface with center volunteers - Approval authority for profile changes (first level) - Can create center-specific activities - Provides volunteer ratings (1-5 + review) **Functional Coordinator (FC):** - Heads specific department (1 of 30 departments) - Manages volunteers across all locations - Can create department-specific activities - Provides volunteer ratings for department work - Approval authority for department join/leave requests **Team Lead (TL):** - Leads internal teams within departments - Reports to FCs - Can mark attendance for team activities - Limited volunteer management within team scope **Volunteer:** - Base level user with center + department affiliations - Can view own profile and request changes - Can request to join/leave departments - Receives notifications and activity assignments ### 3.2 Permission Matrix ``` Feature | Vol | TL | CC | SC | FC | ZC | Admin ---------------------------------|-----|----|----|----|----|----|----- View Own Profile | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ Edit Own Profile (Approval Req.) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ View Center Team Members | ✗ | ✗ | ✓ | ✓ | ✗ | ✓ | ✓ View Department Team Members | ✗ | ✓ | ✗ | ✗ | ✓ | ✓ | ✓ Create Center Activities | ✗ | ✗ | ✓ | ✓ | ✗ | ✓ | ✓ Create Department Activities | ✗ | ✓ | ✗ | ✗ | ✓ | ✓ | ✓ Mark Attendance | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ Rate Volunteers | ✗ | ✗ | ✓ | ✗ | ✓ | ✓ | ✓ View Ratings (Others) | ✗ | ✗ | ✓ | ✗ | ✓ | ✓ | ✓ Approve Profile Changes | ✗ | ✗ | ✓ | ✓ | ✗ | ✓ | ✓ Approve Dept Join/Leave | ✗ | ✗ | ✗ | ✗ | ✓ | ✓ | ✓ View Center Reports | ✗ | ✗ | ✓ | ✓ | ✗ | ✓ | ✓ View Department Reports | ✗ | ✗ | ✗ | ✗ | ✓ | ✓ | ✓ View Zone-wide Reports | ✗ | ✗ | ✗ | ✗ | ✗ | ✓ | ✓ Broadcast Messages | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ Export Data | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ User Management | ✗ | ✗ | ✗ | ✗ | ✗ | Limited| ✓ ``` ## 4. Core Platform Features ### 4.1 Landing Page & Statistics **Real-time Statistics Display:** - Total volunteers in Zone 5 (15,000+) - Active volunteers this month - Center count across UP & Uttarakhand - Department count (30) - Recent activities completed - Upcoming events - Zone 5 achievements **Additional Features:** - YA/SKRM branding - Login call-to-action - About Zone 5 section - Mobile-responsive design ### 4.2 Authentication System **Login Process:** 1. User enters YA ID (numeric, auto-assigned) 2. System validates YA ID in database 3. 6-digit OTP sent to registered mobile 4. OTP verification (5-minute expiry) 5. JWT token generation 6. Role-based dashboard redirect **Key Features:** - No manual registration UI (volunteers added via API) - Session sharing across multiple devices allowed - No session timeout - Audit logging for all login attempts ### 4.3 Combined Dashboard **Unified View Components:** - Personal summary (role, affiliations, recent activities) - Upcoming activities (both center and department) - Recent notifications and announcements - Quick stats relevant to user role - Pending approvals (for coordinators) - Action buttons based on permissions **Role-specific Widgets:** - **Volunteers:** My activities, my ratings summary - **Coordinators:** Team overview, pending tasks - **Zone Coordinator:** Zone-wide metrics, all reports access ### 4.4 Profile Management **Personal Information:** - Full Name, YA ID (read-only), Mobile, Email - Date of Birth, Gender, Profile Picture - Complete Address (District, State) - Emergency Contact, Blood Group **Organizational Information:** - Date of Joining YA - Current Role/Position - Zone Assignment (Zone 5) - Sector Assignment (if applicable) - Center Affiliation (mandatory) - Primary Department Assignment - Secondary Department Assignments - Team Assignments (if applicable) - Volunteer Level/Grade **Change Approval Workflow:** 1. Volunteer requests change 2. Center Coordinator approval 3. Sector Coordinator approval 4. Change implemented 5. Notification to all parties ### 4.5 Activity Management **Activity Types:** - Center-based activities (seva, satsang, meetings) - Department activities (projects, training, coordination) - Zone-wide events - Recurring activities support **Activity Features:** - Category classification - Date, time, venue management - Participant listing - RSVP functionality - Activity history - Search and filter options **Creation Rules:** - Center Coordinators: Center activities only - FCs: Department activities only - Zone Coordinators: All activity types - Team Leads: Team-specific activities ### 4.6 Attendance & Rating System **Attendance Management:** - Date and place selection - Volunteer name selection from lists - Offline marking with sync button - Bulk attendance marking support - Pending sync indicator - Conflict resolution for multiple entries **Rating System:** - 1-5 star rating scale - Text review/comments - Center Coordinators rate center participation - FCs rate department participation - Rating history and analytics - Coordinators can view all ratings - Volunteers cannot see their ratings ### 4.7 Approval Management **Profile Change Approvals:** - Queue of pending approvals - Approval/rejection with comments - Email/SMS notifications for requests - No auto-approval system - Complete audit trail **Department Join/Leave Requests:** - FC and Zone Coordinator dual approval required - Request reason and approval comments - Status tracking for volunteers ### 4.8 Communication & Broadcasting **Broadcasting Features:** - Zone Coordinator: Zone-wide broadcasts - Sector Coordinator: Sector-wide broadcasts - Center Coordinator: Center broadcasts - FC: Department broadcasts - Message templates + free text - SMS and email delivery - No scheduling (future phase) - No message limits **Contact Information:** - Name and phone number display - No direct messaging system - Directory based on user permissions ### 4.9 Reports & Analytics **Report Types:** - **Center Reports:** Weekly, monthly, yearly - **Department Reports:** Weekly, monthly, yearly - **Zone Reports:** Weekly, monthly, yearly - **Custom Reports:** Coordinators only **Report Features:** - Visual charts and graphs - Screen viewing with export options - PDF and Excel export - Auto-generation and email delivery - On-demand generation - Historical data comparison **Auto-delivery Schedule:** - Weekly reports: Every Monday - Monthly reports: 1st of each month - Delivered to relevant coordinators automatically ### 4.10 Data Import/Export **Import Features:** - Volunteer data from spreadsheets - Bulk attendance import - Activity data import - Excel/CSV format support **Export Features:** - Complete volunteer lists - Activity reports - Attendance records - Custom data exports - API endpoints for external integration ## 5. Technical Architecture ### 5.1 Technology Stack - **Frontend:** React.js with TypeScript, Tailwind CSS - **Backend:** python - **Database:** PostgreSQL with Redis caching - **File Storage:** AWS S3 for documents and images - **SMS Service:** Fast2SMS or MSG91 for OTP delivery - **Authentication:** JWT with OTP verification - **Hosting:** AWS EC2 with load balancer - **CDN:** CloudFront for static assets ### 5.2 Database Schema ```mermaid erDiagram USERS { uuid id PK varchar ya_id UK varchar full_name varchar mobile UK varchar email date date_of_birth enum gender varchar profile_picture text address varchar district varchar state varchar emergency_contact varchar blood_group date date_joined enum role enum status timestamp created_at timestamp updated_at } ZONES { uuid id PK varchar name varchar code UK uuid coordinator_id FK timestamp created_at } SECTORS { uuid id PK varchar name uuid zone_id FK uuid coordinator_id FK timestamp created_at } CENTERS { uuid id PK varchar name varchar skrm_center_code text address varchar district varchar state uuid sector_id FK uuid coordinator_id FK timestamp created_at } DEPARTMENTS { uuid id PK varchar name text description uuid fc_id FK uuid zone_id FK timestamp created_at } TEAMS { uuid id PK varchar name uuid department_id FK uuid team_lead_id FK timestamp created_at } USER_AFFILIATIONS { uuid id PK uuid user_id FK uuid center_id FK uuid department_id FK uuid team_id FK enum affiliation_type timestamp created_at } ACTIVITIES { uuid id PK varchar title text description varchar category enum activity_type varchar venue timestamp start_datetime timestamp end_datetime boolean is_recurring json recurrence_pattern uuid created_by FK uuid target_center_id FK uuid target_department_id FK uuid target_team_id FK enum status timestamp created_at timestamp updated_at } ATTENDANCE { uuid id PK uuid activity_id FK uuid user_id FK uuid marked_by FK date attendance_date varchar place enum status boolean is_synced timestamp created_at } RATINGS { uuid id PK uuid user_id FK uuid rated_by FK uuid activity_id FK int rating text review_text enum rating_type timestamp created_at } APPROVAL_REQUESTS { uuid id PK uuid user_id FK enum request_type json current_data json requested_data text reason enum status uuid approved_by FK text approval_comments timestamp created_at timestamp updated_at } BROADCASTS { uuid id PK uuid sender_id FK varchar title text message enum target_type uuid target_id enum delivery_method enum status timestamp sent_at timestamp created_at } AUDIT_LOGS { uuid id PK uuid user_id FK varchar action varchar entity_type uuid entity_id json old_data json new_data inet ip_address text user_agent timestamp created_at } ZONES ||--o{ SECTORS : contains SECTORS ||--o{ CENTERS : contains ZONES ||--o{ DEPARTMENTS : belongs_to DEPARTMENTS ||--o{ TEAMS : contains USERS ||--o{ ZONES : coordinates USERS ||--o{ SECTORS : coordinates USERS ||--o{ CENTERS : coordinates USERS ||--o{ DEPARTMENTS : leads USERS ||--o{ TEAMS : leads USERS ||--o{ USER_AFFILIATIONS : has CENTERS ||--o{ USER_AFFILIATIONS : contains DEPARTMENTS ||--o{ USER_AFFILIATIONS : includes TEAMS ||--o{ USER_AFFILIATIONS : includes USERS ||--o{ ACTIVITIES : creates ACTIVITIES ||--o{ ATTENDANCE : tracks ACTIVITIES ||--o{ RATINGS : receives USERS ||--o{ ATTENDANCE : marks USERS ||--o{ RATINGS : gives USERS ||--o{ APPROVAL_REQUESTS : requests USERS ||--o{ BROADCASTS : sends USERS ||--o{ AUDIT_LOGS : generates ``` **Core Tables:** ```sql -- Users and Authentication users ( id: UUID PRIMARY KEY, ya_id: VARCHAR(20) UNIQUE NOT NULL, full_name: VARCHAR(100) NOT NULL, mobile: VARCHAR(15) UNIQUE NOT NULL, email: VARCHAR(100), date_of_birth: DATE, gender: ENUM('Male', 'Female', 'Other'), profile_picture: VARCHAR(255), address: TEXT, district: VARCHAR(50), state: VARCHAR(50), emergency_contact: VARCHAR(15), blood_group: VARCHAR(10), date_joined: DATE, role: ENUM('volunteer', 'team_lead', 'center_coordinator', 'sector_coordinator', 'fc', 'zone_coordinator', 'admin'), status: ENUM('active', 'inactive', 'suspended'), created_at: TIMESTAMP, updated_at: TIMESTAMP ) -- Organizational Structure zones ( id: UUID PRIMARY KEY, name: VARCHAR(100) NOT NULL, code: VARCHAR(10) UNIQUE, coordinator_id: UUID REFERENCES users(id), created_at: TIMESTAMP ) sectors ( id: UUID PRIMARY KEY, name: VARCHAR(100) NOT NULL, zone_id: UUID REFERENCES zones(id), coordinator_id: UUID REFERENCES users(id), created_at: TIMESTAMP ) centers ( id: UUID PRIMARY KEY, name: VARCHAR(100) NOT NULL, skrm_center_code: VARCHAR(20), address: TEXT, district: VARCHAR(50), state: VARCHAR(50), sector_id: UUID REFERENCES sectors(id), coordinator_id: UUID REFERENCES users(id), created_at: TIMESTAMP ) departments ( id: UUID PRIMARY KEY, name: VARCHAR(100) NOT NULL, description: TEXT, fc_id: UUID REFERENCES users(id), zone_id: UUID REFERENCES zones(id), created_at: TIMESTAMP ) teams ( id: UUID PRIMARY KEY, name: VARCHAR(100) NOT NULL, department_id: UUID REFERENCES departments(id), team_lead_id: UUID REFERENCES users(id), created_at: TIMESTAMP ) -- User Affiliations user_affiliations ( id: UUID PRIMARY KEY, user_id: UUID REFERENCES users(id), center_id: UUID REFERENCES centers(id), -- Mandatory department_id: UUID REFERENCES departments(id), team_id: UUID REFERENCES teams(id), affiliation_type: ENUM('primary', 'secondary'), created_at: TIMESTAMP ) -- Activities and Events activities ( id: UUID PRIMARY KEY, title: VARCHAR(200) NOT NULL, description: TEXT, category: VARCHAR(50), activity_type: ENUM('center', 'department', 'zone', 'team'), venue: VARCHAR(200), start_datetime: TIMESTAMP, end_datetime: TIMESTAMP, is_recurring: BOOLEAN DEFAULT FALSE, recurrence_pattern: JSON, created_by: UUID REFERENCES users(id), target_center_id: UUID REFERENCES centers(id), target_department_id: UUID REFERENCES departments(id), target_team_id: UUID REFERENCES teams(id), status: ENUM('planned', 'ongoing', 'completed', 'cancelled'), created_at: TIMESTAMP, updated_at: TIMESTAMP ) -- Attendance and Ratings attendance ( id: UUID PRIMARY KEY, activity_id: UUID REFERENCES activities(id), user_id: UUID REFERENCES users(id), marked_by: UUID REFERENCES users(id), attendance_date: DATE, place: VARCHAR(200), status: ENUM('present', 'absent', 'late'), is_synced: BOOLEAN DEFAULT TRUE, created_at: TIMESTAMP ) ratings ( id: UUID PRIMARY KEY, user_id: UUID REFERENCES users(id), rated_by: UUID REFERENCES users(id), activity_id: UUID REFERENCES activities(id), rating: INTEGER CHECK (rating >= 1 AND rating <= 5), review_text: TEXT, rating_type: ENUM('center_performance', 'department_performance'), created_at: TIMESTAMP ) -- Approval Workflows approval_requests ( id: UUID PRIMARY KEY, user_id: UUID REFERENCES users(id), request_type: ENUM('profile_change', 'department_join', 'department_leave'), current_data: JSON, requested_data: JSON, reason: TEXT, status: ENUM('pending', 'approved', 'rejected'), approved_by: UUID REFERENCES users(id), approval_comments: TEXT, created_at: TIMESTAMP, updated_at: TIMESTAMP ) -- Communications broadcasts ( id: UUID PRIMARY KEY, sender_id: UUID REFERENCES users(id), title: VARCHAR(200), message: TEXT, target_type: ENUM('zone', 'sector', 'center', 'department', 'team'), target_id: UUID, delivery_method: ENUM('sms', 'email', 'both'), status: ENUM('draft', 'sent', 'failed'), sent_at: TIMESTAMP, created_at: TIMESTAMP ) -- Audit Logs audit_logs ( id: UUID PRIMARY KEY, user_id: UUID REFERENCES users(id), action: VARCHAR(100), entity_type: VARCHAR(50), entity_id: UUID, old_data: JSON, new_data: JSON, ip_address: INET, user_agent: TEXT, created_at: TIMESTAMP ) ``` ### 5.3 API Specifications **Authentication APIs:** ``` POST /api/auth/login POST /api/auth/verify-otp POST /api/auth/refresh-token POST /api/auth/logout ``` **User Management APIs:** ``` GET /api/users/profile PUT /api/users/profile GET /api/users/team POST /api/users/import (bulk upload) GET /api/users/export ``` **Activity APIs:** ``` GET /api/activities POST /api/activities PUT /api/activities/:id DELETE /api/activities/:id POST /api/activities/:id/register ``` **Attendance APIs:** ``` POST /api/attendance/mark POST /api/attendance/bulk-mark POST /api/attendance/sync-offline GET /api/attendance/pending-sync ``` **Rating APIs:** ``` POST /api/ratings GET /api/ratings/user/:id GET /api/ratings/activity/:id ``` **Approval APIs:** ``` GET /api/approvals POST /api/approvals/:id/approve POST /api/approvals/:id/reject ``` **Reporting APIs:** ``` GET /api/reports/center/:id GET /api/reports/department/:id GET /api/reports/zone/:id POST /api/reports/custom GET /api/reports/export ``` ## 6. Security & Performance ### 6.1 Security Architecture ```mermaid graph TB A[User Login Request] --> B[YA ID Validation] B --> C[OTP Generation & SMS] C --> D[OTP Verification] D --> E[JWT Token Generation] E --> F[Role-based Access Control] F --> G[Secure Dashboard Access] H[Data Layer Security] --> I[Input Validation] H --> J[SQL Injection Prevention] H --> K[XSS Protection] H --> L[Data Encryption at Rest] M[Audit System] --> N[Login Attempts] M --> O[Data Changes] M --> P[Access Logs] M --> Q[System Actions] style A fill:#ffcccc style G fill:#ccffcc style H fill:#ccccff style M fill:#ffffcc ``` **Security Features:** - JWT-based authentication with OTP verification - Role-based access control (RBAC) - Input validation and sanitization - SQL injection prevention - XSS protection - Complete audit logging - Data encryption at rest - HTTPS enforcement ### 6.2 Performance Requirements - Support 500-1000 concurrent users - Page load time < 3 seconds - API response time < 500ms - Offline functionality for attendance - Bulk operations support (100+ records) - Auto-sync with conflict resolution ### 6.3 Scalability - Horizontal scaling capability - Database optimization for 15,000+ users - Redis caching for frequent queries - CDN for static assets - Load balancing setup ## 7. Development Timeline ```mermaid graph LR A[Phase 1: Foundation] --> B[Phase 2: Core Features] B --> C[Phase 3: Advanced Features] C --> D[Phase 4: Testing & Deployment] A --> A1[Database Setup] A --> A2[Authentication System] A --> A3[Landing Page] A --> A4[Basic User Management] B --> B1[Dashboard Development] B --> B2[Profile Management] B --> B3[Activity Management] B --> B4[Approval Workflows] C --> C1[Attendance System] C --> C2[Rating System] C --> C3[Broadcasting System] C --> C4[Reports & Analytics] D --> D1[Testing Phase] D --> D2[Performance Optimization] D --> D3[Security Audit] D --> D4[Pilot Deployment] style A fill:#ffcccc style B fill:#ccffcc style C fill:#ccccff style D fill:#ffffcc ``` ### Phase 1: Foundation - Database setup and schema implementation - Authentication system with OTP - Basic user management - Landing page development ### Phase 2: Core Features - Dashboard development - Profile management with approval workflow - Activity creation and management - Basic reporting structure ### Phase 3: Advanced Features - Attendance marking with offline support - Rating system implementation - Broadcasting system - Data import/export functionality ### Phase 4: Testing & Deployment - Comprehensive testing - Performance optimization - Security audit - Pilot deployment setup ## 8. Deployment Strategy ### 8.1 Infrastructure Architecture ```mermaid graph TB A[Users] --> B[CloudFront CDN] B --> C[Application Load Balancer] C --> D[EC2 Instance 1] C --> E[EC2 Instance 2] C --> F[EC2 Instance N] D --> G[RDS PostgreSQL Primary] E --> G F --> G G --> H[RDS PostgreSQL Read Replica] I[Redis Cache Cluster] --> D I --> E I --> F J[S3 Bucket] --> K[Static Assets] J --> L[File Uploads] J --> M[Backup Storage] N[SMS Gateway] --> O[OTP Delivery] P[Email Service] --> Q[Notifications] style A fill:#ffcccc style G fill:#ccffcc style J fill:#ccccff ``` **Infrastructure:** - AWS EC2 instances with load balancer - RDS PostgreSQL with Multi-AZ deployment - S3 for file storage - CloudFront CDN - Route 53 for DNS management ### 8.2 Pilot Launch - Initial deployment for 100-500 volunteers - Gradual rollout to full 15,000 user base - Monitoring and feedback collection - Performance optimization based on usage ### 8.3 Monitoring & Maintenance - Application performance monitoring - Database performance tracking - Error logging and alerting - Regular backup procedures - Security update management ## 9. Success Metrics ### 9.1 Key Performance Indicators - User adoption rate (target: 80% of pilot group) - Daily active users - System uptime (target: 99.5%) - Average response time - Data accuracy and sync success rate ### 9.2 Business Metrics - Volunteer engagement improvement - Coordination efficiency gains - Report generation time reduction - Communication reach and effectiveness ## 10. Risk Mitigation ### 10.1 Technical Risks - Database performance with large datasets - Network connectivity issues in remote areas - Data synchronization conflicts - Peak load handling ### 10.2 Mitigation Strategies - Database indexing and optimization - Offline functionality implementation - Conflict resolution algorithms - Load testing and capacity planning --- *This technical specification provides a comprehensive blueprint for developing the YA Zone 5 volunteer management platform, designed to serve 15,000+ volunteers with a robust dual-hierarchy system and modern web technologies.*