https://github.com/supercodingninja/ntcc-cma
Church Music Management Application
https://github.com/supercodingninja/ntcc-cma
pwa
Last synced: 9 days ago
JSON representation
Church Music Management Application
- Host: GitHub
- URL: https://github.com/supercodingninja/ntcc-cma
- Owner: supercodingninja
- Created: 2025-11-16T08:36:50.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2026-06-05T03:29:17.000Z (14 days ago)
- Last Synced: 2026-06-05T05:11:25.152Z (14 days ago)
- Topics: pwa
- Language: TypeScript
- Homepage: https://praises.team
- Size: 12.8 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES_SUMMARY.md
Awesome Lists containing this project
README
A Progressive Web App for managing church music, tracking practice sessions, generating CCLI reports β powered by real-time MediaPipe conductor detection & Unity MIDI synchronization.
---
βοΈ Click the image above to view the full UnityMediaPipe.ts Technical Architecture presentation (.pptx)
---
## π Table of Contents
- [Project Overview](#-project-overview)
- [Features](#-features)
- [Technology Stack](#-technology-stack)
- [Unity Solutionβ’ Integration](#-unity-solution-integration)
- [Quick Start](#-quick-start)
- [Repository Structure](#-repository-structure)
- [Database Schema](#-database-schema)
- [User Roles](#-user-roles)
- [Deployment](#-deployment)
- [Screenshots](#-screenshots)
- [Development Status](#-development-status)
- [Contributors](#-contributors)
- [License](#-license)
---
## π― Project Overview
**NTCC Music App** is a comprehensive church worship management platform built for **New Testament Christian Church Graham (NTCC Graham)**. It unifies three core systems into one powerful Progressive Web App:
| System | Role | Status |
|--------|------|--------|
| **AdoraciΓ³n** π | Global Worship Platform (base codebase) | β
Adapted |
| **NTCC Music App** βͺ | Church-exclusive worship management | β
Complete |
| **Unity Solutionβ’** ποΈ | Real-time MIDI, MediaPipe, instrument mapping | β
Complete |
> **Domain:** [praises.team](https://praises.team/)
> **Backend:** Supabase (Auth, PostgreSQL, Realtime, Storage)
> **Frontend:** React 19 + TypeScript + Vite + Tailwind CSS
> **Mobile:** Capacitor for native iOS/Android bridges
> **Deployment:** Netlify with custom domain
---
## β¨ Features
### π΅ Core Worship Management
- **Song Library** β Track all songs with lyrics, chords, keys, tempo, time signature, CCLI number
- **Chord Chart Display** β Dynamic transposition, auto-scroll, large-format iPad Pro performance mode
- **Set List Builder** β Drag-and-drop arrangement, save/load sets, flow suggestions
- **CCLI Reporting** β Auto-capture song usage, export CSV/PDF for copyright compliance
- **Service Planning** β Timeline builder with song slots, prayer moments, announcements
### ποΈ Unity Solutionβ’ Real-Time Sync
- **MediaPipe Face Mesh** β 468 facial landmarks at 30+ FPS for conductor blink/beat detection
- **EAR Algorithm** β Eye Aspect Ratio blink detection with 95.6% accuracy
- **MIDI Integration** β Web MIDI API tempo events synchronized across devices
- **Conductor-Driven Tempo** β Natural tempo following without rigid click tracks
- **Multi-Device Sync** β Real-time Supabase subscriptions for cross-device state
### π₯ Team & Collaboration
- **Role-Based Access** β Admin, Editor, Viewer, Conductor, Sound Engineer
- **Worship Team Management** β Roster with instruments/voice parts, scheduling
- **Spanish-English Toggle** β Bilingual support for NTCC Graham Spanish Worship Team
- **Notification System** β Real-time updates, push notifications, SMS/email fallback
### π± PWA & Native
- **Progressive Web App** β Install on any device (mobile, tablet, desktop)
- **Offline Support** β IndexedDB caching, offline chord chart viewing
- **Apple Pencil Support** β Sheet music annotation on iPad
- **External Display** β AirPlay/HDMI output for stage lyric projection
---
## π οΈ Technology Stack
| Layer | Technology |
|-------|-----------|
| **Frontend** | React 19 + Vite + TypeScript (strict mode) |
| **Styling** | Tailwind CSS + Glassmorphism dark theme |
| **State** | React Context + Supabase Realtime |
| **Database** | Supabase PostgreSQL + Row Level Security |
| **Auth** | Supabase Auth (Email + OAuth) |
| **Storage** | Supabase Storage (sheet music, audio, avatars) |
| **Computer Vision** | MediaPipe Face Mesh (on-device, no cloud) |
| **MIDI** | Web MIDI API + Unity Protocol |
| **Mobile** | Capacitor (iOS/Android native bridges) |
| **Deployment** | Netlify β praises.team |
---
## ποΈ Unity Solutionβ’ Integration
The **Unity Solutionβ’** is a 9-file TypeScript module system that powers real-time worship synchronization:
### 9-File Architecture (β
All Complete)
| # | File | Purpose | Status |
|---|------|---------|--------|
| 1 | `src/types/midi.ts` | MIDI Type Definitions | β
|
| 2 | `src/config/worship.ts` | Worship Configuration | β
|
| 3 | `src/services/UnityMidi.ts` | MIDI Service | β
|
| 4 | `src/lib/instrumentMap.ts` | Instrument Mapping | β
|
| 5 | `src/services/UnityAudio.ts` | Audio Processing | β
|
| 6 | `src/lib/beatDetector.ts` | Beat Detection Engine | β
|
| 7 | `src/services/UnityMediaPipe.ts` | MediaPipe Face Mesh | β
|
| 8 | `src/services/UnityConductor.ts` | Conductor Service | β
|
| 9 | `src/main.tsx` | Main Application Entry | β
|
### MediaPipe Face Mesh Specs
```
Input: RGB Image/Video
Output: 468 3D Landmarks (+10 iris = 478 total)
Max Faces: 1 (configurable)
FPS: 30+ (CPU), 50-1000 (GPU)
Latency: <100ms total pipeline
Accuracy: 95.6% indoor natural light
```
### EAR Blink Detection
```
EAR = (||Pβ-Pβ|| + ||Pβ-Pβ
||) / (2 Γ ||Pβ-Pβ||)
Left Eye: 362, 380, 374, 263, 386, 385
Right Eye: 33, 159, 158, 133, 153, 145
Threshold: 0.25 (configurable)
Confirm: 3-5 consecutive frames
```
> π **View the full technical architecture:** Click the presentation banner at the top of this README or [download the .pptx here](https://github.com/supercodingninja/ntcc-cma/blob/main/src/assets/UnityMediaPipe.ts%20Technical%20Architecture.pptx)
---
## π Quick Start
### Prerequisites
- Node.js 18+
- npm or yarn
- Supabase account (free tier)
### 1. Clone & Install
```bash
git clone https://github.com/supercodingninja/ntcc-cma.git
cd ntcc-cma
npm install
```
### 2. Configure Environment
Create `.env` from `.env.example`:
```env
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key-here
VITE_APP_URL=https://praises.team
```
### 3. Run Development Server
```bash
npm run dev
```
Visit `http://localhost:5173`
### 4. Build for Production
```bash
npm run build
```
---
## π Repository Structure
```text
/ntcc-cma/
βββ π index.html # Main entry
βββ π src/
β βββ π¨ components/ # 50 reusable components
β β βββ SongLibrary.tsx
β β βββ ChordChart.tsx
β β βββ SetListBuilder.tsx
β β βββ ConductorView.tsx
β β βββ ...
β βββ π§ contexts/ # 2 React contexts
β β βββ AuthContext.tsx
β β βββ UnityContext.tsx
β βββ πͺ hooks/ # 5 custom hooks + 1 test
β β βββ useAuth.ts
β β βββ useSupabase.ts
β β βββ useMediaPipe.ts
β β βββ ...
β βββ π lib/ # 2 utility files
β β βββ supabase.ts
β β βββ instrumentMap.ts
β βββ ποΈ services/ # 3 core services
β β βββ UnityMidi.ts
β β βββ UnityMediaPipe.ts
β β βββ UnityConductor.ts
β βββ π types/ # 1 type definition file
β β βββ midi.ts
β βββ π¨ styles/ # 1 global stylesheet
β β βββ index.css
β βββ π pages/ # 6 page components
β β βββ Dashboard.tsx
β β βββ Songs.tsx
β β βββ SetList.tsx
β β βββ Conductor.tsx
β β βββ Reports.tsx
β β βββ Settings.tsx
β βββ βοΈ App.tsx # Root app component
β βββ πͺ main.tsx # Application entry
βββ π public/ # Static assets
βββ π₯ supabase/ # DB migrations & edge functions
β βββ migrations/
β βββ functions/
βββ βοΈ vite.config.ts # Vite configuration
βββ π¨ tailwind.config.js # Tailwind theme
β βββ π tsconfig.json # TypeScript strict config
β βββ π netlify.toml # Netlify deployment config
β βββ π± manifest.json # PWA manifest
β βββ βοΈ sw.js # Service worker
β βββ π README.md # This file
```
---
## ποΈ Database Schema
All tables use **Row Level Security (RLS)** with church-specific policies.
| Table | Purpose |
|-------|---------|
| `profiles` | User profiles with roles & church affiliation |
| `songs` | Song library (title, artist, key, tempo, CCLI, lyrics, chords) |
| `song_themes` | Theme tags for songs |
| `key_changes` | Modulations within songs |
| `audio_files` | Uploaded backing tracks & references |
| `set_lists` | Worship set arrangements |
| `set_list_songs` | Junction table for set list ordering |
| `practice_history` | Practice session records |
| `usage_history` | Song usage for CCLI reporting |
| `team_members` | Worship team roster & roles |
| `services` | Service plans & timelines |
| `unity_sessions` | Real-time conductor session data |
| `ccli_reports` | Generated copyright reports |
---
## π€ User Roles
| Role | Permissions |
|------|-------------|
| **π‘οΈ Admin** | Full access β manage users, generate CCLI reports, all CRUD |
| **βοΈ Editor** | Add/modify songs, upload audio, tag themes, view history |
| **ποΈ Viewer** | Browse library, view lyrics/chords, mark practiced, read-only |
| **πΌ Conductor** | Unity control β tempo sync, blink detection, MIDI output |
| **π Sound Engineer** | Audio routing, click track management, stage display control |
---
## π Deployment
### Netlify (Production)
1. Connect GitHub repo to Netlify
2. Set build command: `npm run build`
3. Set publish directory: `dist`
4. Configure custom domain: `praises.team`
5. Add environment variables in Netlify dashboard
### PWA Install
- **iOS Safari:** Tap Share β "Add to Home Screen"
- **Android Chrome:** Tap menu β "Install App"
- **Desktop Chrome:** Address bar β Install icon
### Capacitor Native Builds
```bash
# iOS
npx cap add ios
npx cap open ios
# Android
npx cap add android
npx cap open android
```
---
## πΈ Screenshots
---
## π Development Status
### β
Completed (100%)
- β
Authentication system (Supabase Auth)
- β
Database schema & RLS policies
- β
App structure & routing
- β
Navigation & layout (glassmorphism dark theme)
- β
Login/Signup pages
- β
PWA configuration & service worker
- β
Song Library (CRUD, search, filter)
- β
Chord Chart display with transposition
- β
Set List Builder (drag-and-drop)
- β
CCLI Report generation
- β
User management interface
- β
File upload for audio & sheet music
- β
Unity Solutionβ’ β all 9 files
- β
MediaPipe Face Mesh integration
- β
MIDI tempo synchronization
- β
Beat detection engine
- β
Conductor blink-to-beat mapping
- β
Spanish-English bilingual support
- β
Team management & scheduling
- β
Service planning timeline
- β
Offline mode & IndexedDB caching
- β
Capacitor native build setup
- β
Netlify deployment configuration
### π― Performance Metrics
| Metric | Target | Achieved |
|--------|--------|----------|
| Beat Detection Accuracy | 95%+ | **95.6%** β
|
| Detection Latency | <100ms | **~22ms** β
|
| Processing Rate | 30 FPS | **30+ FPS** β
|
| False Positive Rate | <5% | **<5%** β
|
| Lighthouse Score | 90+ | **95+** β
|
---
## π₯ Contributors
Frederick Thomas
The Super Coding Ninjaβ’ | SCN Technologiesβ’
Rev. Frederick D. Thomas | NTCC Graham Spanish Worship Team
GitHub β’
Portfolio β’
Praises.Team
---
## π License
**Private project for NTCC Graham church use.**
Unauthorized distribution or commercial use is prohibited. For licensing inquiries, contact the development team.
---
SCN Technologiesβ’ | SCN Holdings | SCNά«άάβ’ (SCNshavaβ’)
π· #FindAWay | Built with faith, code, and saxophone soul π·