An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          



Live Demo


Release


License


Typing SVG


A Progressive Web App for managing church music, tracking practice sessions, generating CCLI reports β€” powered by real-time MediaPipe conductor detection & Unity MIDI synchronization.

---



UnityMediaPipe.ts Technical Architecture β€” Click to view presentation



☝️ 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


Dashboard
Song Library
Conductor View

---

## πŸ“Š 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


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.

---


Copyright


SCN Technologiesβ„’ | SCN Holdings | SCNά«ά˜άβ„’ (SCNshavaβ„’)

🎷 #FindAWay | Built with faith, code, and saxophone soul 🎷