Skip to content

Repository files navigation

Contributors Forks Stargazers Issues License: PolyForm Noncommercial


OneRep

OneRep

The open-source personal fitness OS.
Training, nutrition, recovery, progress, and an AI coach, all running on your own infrastructure.

Explore the docs »

Try it · Join the iOS beta · Self-host it · Contribute

Important

OneRep for iOS is available in beta. Join the TestFlight →

A walkthrough of OneRep: daily dashboard with calorie and macro rings, nutrition logging, training, progress charts, and the AI Coach

Why OneRep?

Most workout apps are a single feature wearing a subscription. OneRep is the whole stack: training, nutrition, recovery, and progress, backed by an AI coach, a REST API, an MCP endpoint, and data export, all self-hostable on infrastructure you control.

Built around a single idea: your fitness data should belong to you.

(back to top)

What it is

One React codebase shipping as a web app, a PWA, and Capacitor apps for iOS and Android. Convex holds the database, the sync, the auth, the crons, and every server-side integration; there is no API server in between. Self-hosting brings up the whole thing with one script.

Daily dashboard, training, nutrition with self-hosted food search and barcodes, progress tracking, photo food logging, a Coach whose every write carries an undo payload, and a REST API plus an MCP endpoint so your scripts read the same log you do. The feature list, in the detail it deserves, is in the docs.

AI, food lookup, email, and analytics each switch on with their own environment variables and stay quiet without them. A deployment with no OPENROUTER_API_KEY still runs Coach for anyone who pastes their own OpenRouter key into Settings, on their credential, unmetered.

The production app is at app.onerep.life. No investors, no ads, funded entirely by the paid tier.

(back to top)

Built With

Bun React TypeScript Vite Tailwind CSS Convex Capacitor Turborepo

(back to top)

Layout

.
├── apps/
│   ├── mobile/       # React app, PWA, and the Capacitor iOS/Android projects
│   └── datasource/   # Food + exercise API: USDA, Open Food Facts, wger (Bun + SQLite)
├── convex/           # Schema, auth, functions, HTTP routes, crons
├── packages/
│   ├── models/       # Shared models and Coach operation contracts
│   └── ui/           # Presentation components and Tailwind styles
├── scripts/          # Prompt generation, exercise prep, mirror publishing
└── selfhost/         # install.sh + docker-compose.yml

Secrets stay in the Convex deployment and never appear as VITE_*. @repo/ui renders props and raises callbacks; it does not know Convex exists.

This repository is a one-way mirror of an internal OneDev instance: real history, minus the hosted deployment's private bits and the marketing site. scripts/publish-github.sh says which paths and why.

(back to top)

Self-hosting

You need Docker with Compose v2, Bun 1.3.4+ on the host, and ~10 GB of disk for the USDA food data (~25 GB with all of Open Food Facts).

git clone https://github.com/an2tha/onerep.git
cd onerep/selfhost
./install.sh

That's the install. It asks one question, writes selfhost/.env with generated secrets, brings up the backend, deploys the functions, and starts the datasource and the app at http://127.0.0.1:8081 (dashboard on :6791). Re-running is safe. Accounts on your install are unmetered.

The datasource starts empty, so food search finds nothing until you import something. Everything past the first run — real domains and TLS, the three catalog imports, native iOS and Android builds, the optional integrations — is documented properly:

One trap worth repeating here, because it bites everyone: the default backend URL is http://127.0.0.1:3210, which on a phone means the phone. Set PUBLIC_HOST before the first run, or the app installs, opens, and refuses to sign in.

(back to top)

Development

bun install
cp .env.example .env.local   # VITE_CONVEX_URL, VITE_CONVEX_SITE_URL, read from the repo root
bun run dev                  # http://localhost:5173
Command What it does
bun run build Check prompts, type-check, build the workspaces
bun run typecheck Prompts and TypeScript
bun run test Package tests and the focused Convex suite
bun run test:convex The full Convex integration suite, which knows the most
bun run prompts:generate Regenerate convex/ai/prompts.generated.ts
bun run exercises:import Replace a deployment's exercise catalog (check CONVEX_DEPLOYMENT)

Native work lives in apps/mobile/README.md; search ranking and de-duplication in apps/datasource/README.md.

(back to top)

Contributing

Pull requests are welcome and are not merged here. They're reviewed here, applied to the internal repository, and flow back out in the next sync with your authorship preserved.

Fork, branch, and run bun run typecheck && bun run test && bun run test:convex before you push. This codebase has source-contract tests that assert the actual words on the screen, and they will find you.

By contributing you agree the work may be used under the project license and in the official OneRep deployment, which is a commercial service. Your authorship stays in the history either way.

(back to top)

License & Contact

PolyForm Noncommercial 1.0.0 · support@onerep.life

Thanks to free-exercise-db, USDA FoodData Central, Open Food Facts (ODbL, images CC-BY-SA), wger (CC-BY-SA 4.0), and to Convex, Better Auth, and shadcn/ui, the load-bearing walls.

(back to top)