Unique Wellness Institute is a TanStack Start web application for a coaching and wellness platform. It includes public program pages, authentication, student/coach/admin dashboards, Supabase-backed data, and EnableX live-class room support.
- Public pages for playing chess, career guidance, wellness programs, founder profile, demo booking, and contact.
- Email/password and Google-based auth flows with forgot/reset password screens.
- Protected dashboard shell with role-specific student, coach, admin, content, settings, and live-room pages.
- Supabase integration for auth, profiles, roles, enrollments, courses, live classes, content, and testimonials.
- EnableX server functions for creating rooms and generating live-class join tokens.
- Reusable Radix/shadcn-style UI components, Tailwind CSS styling, and Lucide icons.
- Vite/TanStack Start build configured for SSR and Cloudflare-style deployment.
- React 19
- TanStack Start, TanStack Router, TanStack Query
- TypeScript
- Vite
- Tailwind CSS 4
- Supabase
- EnableX video APIs
- Radix UI primitives
- ESLint
- Node.js 22 or newer recommended
- npm
- A Supabase project
- EnableX app credentials, if live classes are enabled
npm installCreate a local .env file from the example:
cp .env.example .envFill in the values:
# Client-safe Supabase settings
SUPABASE_URL="https://your-project-ref.supabase.co"
SUPABASE_PUBLISHABLE_KEY="your-supabase-anon-key"
# Vite-exposed client variables
VITE_SUPABASE_URL="https://your-project-ref.supabase.co"
VITE_SUPABASE_PUBLISHABLE_KEY="your-supabase-anon-key"
VITE_SUPABASE_PROJECT_ID="your-project-ref"
# Server-only Supabase secret for admin actions
SUPABASE_SERVICE_ROLE_KEY="your-supabase-service-role-key"
# EnableX live-class credentials
ENABLEX_APP_ID="your-enablex-app-id"
ENABLEX_APP_KEY="your-enablex-app-key"
# Optional Vite aliases for EnableX in local dev
# VITE_ENABLEX_APP_ID="your-enablex-app-id"
# VITE_ENABLEX_APP_KEY="your-enablex-app-key"SUPABASE_SERVICE_ROLE_KEY is used by server-side admin functionality. Keep it only in trusted server/deployment environments and never expose it through VITE_* variables.
npm run devnpm run buildnpm run previewThis project includes a Capacitor Android wrapper. The web app is SSR-based, so the Android app should load a deployed HTTPS URL instead of packaging dist/client as an offline static app.
- Android Studio or Android SDK installed
ANDROID_HOMEpointing to the SDK path, orandroid/local.propertiescontainingsdk.dir=C:\\Users\\your-user\\AppData\\Local\\Android\\Sdk- A deployed app URL, for example
https://your-domain.com
In PowerShell:
$env:CAPACITOR_SERVER_URL="https://your-domain.com"
npm run android:sync
cd android
.\gradlew.bat assembleDebugThe debug APK will be created at:
android/app/build/outputs/apk/debug/app-debug.apk
For an Android emulator that should load the local dev server, use http://10.0.2.2:8080 as CAPACITOR_SERVER_URL while npm run dev is running.
| Command | Purpose |
|---|---|
npm run dev |
Start the Vite dev server. |
npm run build |
Build the production client and server output. |
npm run build:dev |
Build using development mode. |
npm run preview |
Preview the production build locally. |
npm run android:sync |
Sync Capacitor assets/config to Android. |
npm run android:open |
Open the Android project in Android Studio. |
npm run android:build:debug |
Build a debug APK. |
npm run lint |
Run ESLint. |
npm run format |
Auto-fix lint issues with ESLint. |
src/
assets/ Static brand and program media
components/site/ Site-specific layout and marketing components
components/ui/ Reusable UI primitives
hooks/ Shared React hooks
integrations/ Supabase integration code
lib/ Server functions, auth helpers, error handling, utilities
routes/ TanStack Router file-based routes
router.tsx Router creation
server.ts SSR server entry wrapper
start.ts Client entry
styles.css Global Tailwind/theme styles
supabase/
migrations/ Database schema migrations
/- home page/chess- play chess/career- career guidance/wellness- wellness programs/founder- founder profile/book-demo- demo booking/contact- contact page/login,/signup,/forgot-password,/reset-password- auth flows/_authenticated/student- student dashboard/_authenticated/coach- coach dashboard/_authenticated/admin- admin dashboard/_authenticated/content- course/content management/_authenticated/live-room- live class room/_authenticated/settings- account settings
Supabase migrations live in supabase/migrations. Apply them to your Supabase project before using the authenticated dashboards.
The app expects tables and policies for profiles, user roles, courses, enrollments, live classes, content, demo bookings, contact messages, and testimonials.
The repository includes:
wrangler.jsoncfor Cloudflare-oriented runtime configuration.vite.config.tsusing standard Vite, TanStack Start, Tailwind, and Cloudflare plugins.
Set all production environment variables in the deployment provider. Do not commit .env, .dev.vars, dist, .wrangler, or dependency/build cache directories.
Before pushing changes:
npm run format
npm run lint
npm run buildnpm run lint may report React Fast Refresh or hook dependency warnings. Treat new warnings as review items before merging.