Busabase
Busabase는 AI 에이전트를 위한 오픈소스(MIT) 데이터베이스 및 작업 공간입니다
다중 테넌트 피트니스 분석 플랫폼, PostgreSQL 행 수준 보안·Supabase 인증·AI 인사이트 제공
Multi-tenant fitness analytics platform with PostgreSQL row-level security, Supabase auth, Recharts dashboards, and an AI insights layer. Next.js, TypeScript, Tailwind, GitHub Actions CI.
데이터TypeScript · PLpgSQLGitHub @bibeshpyakurel온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A multi-tenant fitness analytics platform where every user's training data is isolated
at the database layer — workout logging, bodyweight and calorie tracking, dashboard
trends, and an AI insights chat, for lifters who want low-friction tracking they can
trust with their data.
Not yet captured. These are the shots that would explain Trainlytics fastest.
Drop each file at the path shown and uncomment the matching line.README 전문 보기 ↗A multi-tenant fitness analytics platform where every user's training data is isolated at the database layer — workout logging, bodyweight and calorie tracking, dashboard trends, and an AI insights chat, for lifters who want low-friction tracking they can trust with their data.
Live demo → trainlytics-two.vercel.app
Not yet captured. These are the shots that would explain Trainlytics fastest. Drop each file at the path shown and uncomment the matching line.
| Screenshot | Path | Why it matters |
|---|---|---|
| The dashboard with strength, muscle-group, and energy-balance charts | docs/screenshots/dashboard.png | The analytics surface — the reason the project exists |
| The workout logger mid-session, with a split selected and sets entered | docs/screenshots/workout-logger.png | Shows the core logging loop and per-user exercise management |
| The AI insights chat answering a question about recent training | docs/screenshots/insights-ai.png | Shows the LLM layer grounded in the user's own workout history |
exercises, workout_sessions, workout_sets, bodyweight_logs, calories_logs,
profiles) has RLS enabled with separate owner policies for select, insert, update,
and delete. db/audit/rls_policy_audit.sql re-verifies that coverage against the live
database, so isolation is auditable rather than assumed.proxy.ts classifies every request as public or
protected, checks the Supabase session, and enforces session timeout before a page
renders — so a new page cannot accidentally ship unguarded./api/insights-ai caps request bodies at 24 KB,
truncates chat history to the last six messages, and aborts the provider call on a
bounded, configurable timeout, so a slow or hostile request cannot hang the route.db/plan.json plus
npm run db:check-plan runs on every build, which catches schema drift before deploy.Trainlytics is built for lifters who want low-friction tracking and trustworthy data isolation.
push, pull, legs, core)xlsx, jspdf, jspdf-autotable for workout exportsnpm install
npm run dev
App URL: http://localhost:3000
Create .env.local:
# Required
NEXT_PUBLIC_SUPABASE_URL=https://YOUR_PROJECT_REF.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY
SUPABASE_SERVICE_ROLE_KEY=YOUR_SUPABASE_SERVICE_ROLE_KEY
# Optional (Insights AI chat only)
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
OPENAI_MODEL=gpt-4o-mini
OPENAI_BASE_URL=https://api.openai.com/v1
SUPABASE_SERVICE_ROLE_KEY in browser/client code.NEXT_PUBLIC_SUPABASE_ANON_KEY must be your anon key, not service role.Core directories:
app/ routes and API endpointsfeatures/ feature modules (UI + domain logic)lib/ shared services/utilities (auth, routes, monitoring, helpers)db/ schema, migrations, audits, migration planscripts/db/ DB plan runner + validatore2e/ Playwright suiteflowchart LR
U[User Browser] --> N[Next.js App Router]
N --> P[proxy.ts Route Guard]
P -->|Public| A[Auth Pages<br/>/login /signup /forgot-password]
P -->|Protected| F[Feature Pages<br/>dashboard/log/bodyweight/calories/profile/insights]
A --> SC[lib/supabaseClient]
F --> SC
SC --> SA[(Supabase Auth)]
SC --> SD[(Supabase Postgres + RLS)]
SC --> SS[(Supabase Storage)]
F --> API2["/api/insights-ai"]
API2 --> OAI[(OpenAI API)]
N --> MON["/api/monitoring/error"]
A --> MON
F --> MON
proxy.ts, enforcing public/protected route access.lib/supabaseClient for auth/session and scoped data./api/monitoring/error.Every command below is a script in package.json.
npm run lint # ESLint
npm run typecheck # tsc --noEmit
npm run test # Vitest unit tests
npm run test:coverage # Vitest with coverage
npm run check # lint + typecheck + coverage, in one pass
npm run db:check-plan # validate the migration plan (also runs in CI)
npm run db:migrate # apply the migration plan
npm run e2e:install # one-time: install the Chromium build Playwright uses
npm run e2e # Playwright suite over the auth-critical flows
CI runs lint, typecheck, unit tests with coverage, a production build, the DB plan check, and the Playwright auth suite on every pull request.
Deployed and actively maintained. Running in production on Vercel with Supabase as the auth and data layer; a scheduled workflow polls the deployment for uptime. Built as a portfolio project rather than a commercial product.
MIT — see LICENSE.