nkbmusic/README.md
metatroncubeswdev 178d2d00ab Nanga Kathai: Flutter app, self-hosted backend and song tools
- Flutter app (Android/iOS): home, explore, albums, search, player with
  equalizer, mini player, sign up/sign in with email codes, profile,
  encrypted offline downloads, About page
- server/: one-command deploy of self-hosted Supabase behind HestiaCP/nginx
  (or Caddy), migrations, backups, email templates
- supabase/migrations: schema, row-level security, profiles
- tools/: song scanner and importer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 10:39:26 -04:00

51 lines
1.9 KiB
Markdown

# Nanga Kathai (NK)
*Our song*: a music app for the Badaga people of the Nilgiris. Flutter app for iOS and Android.
- Plan: [docs/NK_IMPLEMENTATION_PLAN.md](docs/NK_IMPLEMENTATION_PLAN.md)
- Design canvas: https://claude.ai/artifact/9ZLCbGn4rUTVTqfRXTtMkq
## Run
```sh
flutter pub get
flutter run # bundled demo catalog (3 demo tones), no backend needed
```
With Supabase, put the keys in `env.json` (git-ignored):
```json
{
"SUPABASE_URL": "https://<project>.supabase.co",
"SUPABASE_PUBLISHABLE_KEY": "<publishable key>",
"MEDIA_BASE_URL": "https://<r2 public domain>"
}
```
```sh
flutter run --dart-define-from-file=env.json
```
## Layout
| Path | What |
|---|---|
| `lib/app/` | Theme (colours from the emblem), routes, onboarding flag |
| `lib/audio/` | `NkAudioHandler` (just_audio + audio_service: background play, lock screen, queue, shuffle, repeat) and its providers |
| `lib/data/` | Catalog repository (demo JSON or Supabase), liked songs and recently played |
| `lib/core/` | Models, occasions, spelling-tolerant search |
| `lib/features/` | Screens: welcome, sign-in, home, explore, occasion, search, now playing, singer, library, downloads |
| `lib/shared/widgets/` | Artwork and photo fade, singer avatar, track row, mini player, tab shell |
| `assets/` | Emblem, Nilgiris photos, demo catalog and demo tones |
| `supabase/migrations/` | Database schema and access rules |
## Supabase setup
1. Create a project and run `supabase/migrations/20261027000000_init.sql` (SQL editor, or `supabase db push`).
2. Auth → Email: turn on email sign-in. In the "Magic Link" email template, include `{{ .Token }}` so people receive the 6-digit code.
3. Make yourself admin: `update profiles set role = 'admin' where id = '<your user id>';`
## Photo credits
Landscape photos from Unsplash (Unsplash License): Vaisakh Satheesan (tea estate), Ravi Raj (Ooty village), Harshal More (Ooty valley).