Videre Platform is the TypeScript monorepo for the Videre Project. It contains the public API, website, Cloudflare services, and shared packages used across Videre applications.
The Tracker desktop application is maintained separately and uses packages published from this repository.
| Path | Purpose |
|---|---|
src/ |
React/Vite website for videreproject.com |
packages/constants |
@videreproject/constants, generated enums and shared constants from mtgo-db |
packages/sql-builder |
@videreproject/sql-builder, typed SQL fragments, predicates, filters, and schema helpers |
packages/ui |
@videreproject/ui, shared Tracker UI components, layouts, card-media providers, fixtures, and theme assets |
services/videre-api |
Public API at api.videreproject.com for MTGO cards, events, decks, matches, standings, prices, and metagame data |
services/videre-bot |
Videre's Discord bot and interaction handler |
services/videre-ml |
Routing and API policy for format-specific Manafold inference Workers |
docs/ |
API and reference documentation |
The API uses data produced by the Videre ingestion pipeline and mtgo-db. Generated constants and database types come from mtgo-db and should not be edited by hand.
- Node.js 22.16.0 (see
.node-version) - pnpm 10.28.2 through Corepack
Enable Corepack and install dependencies:
corepack enable
pnpm installThe website uses Playwright to generate its Open Graph image. If Chromium is not already installed, install it once:
pnpm exec playwright install chromiumRun the website locally:
pnpm devBuild and preview it:
pnpm build
pnpm previewDeploy it to the configured Cloudflare Pages project:
pnpm deploy:siteDeployment requires an authenticated Wrangler/Cloudflare environment. The Pages configuration is in wrangler.toml.
Run package checks from the repository root:
pnpm --filter @videreproject/constants typecheck
pnpm --filter @videreproject/constants test
pnpm --filter @videreproject/sql-builder test
pnpm --filter @videreproject/ui typecheck
pnpm --filter @videreproject/ui buildUse Storybook and the checked-in visual baselines to develop and test @videreproject/ui:
pnpm ui:storybook
pnpm ui:storybook:build
pnpm ui:test
pnpm ui:visualFor package development against Tracker, use the local Verdaccio registry:
pnpm registry:start
npm adduser --registry http://127.0.0.1:4873
pnpm constants:publish:local
pnpm sql-builder:publish:local
pnpm sql-schema:publish:local
pnpm ui:publish:localSee packages/constants/README.md and packages/ui/README.md for details on generation, media providers, visual testing, and local publishing.
Publishable packages are released together from a v* Git tag. The tag determines the release version.
Package manifests use 0.0.0-development during normal development. When a version tag is pushed, CI replaces that placeholder with the tag version in its checkout, runs the repository checks, publishes all four packages, and creates the matching GitHub release.
git tag v0.3.0
git push origin v0.3.0Note
Regular commits that do not contain a version tag do not publish packages.
Run a service locally:
pnpm --filter videre-api dev
pnpm --filter videre-bot dev
pnpm --filter videre-ml devDeploy a service through Wrangler:
pnpm --filter videre-api deploy
pnpm --filter videre-bot deploy
pnpm --filter videre-ml deployThe root commands run the corresponding scripts in parallel:
pnpm dev:all
pnpm deploy:allSync Discord commands with:
pnpm --filter videre-bot sync
pnpm --filter videre-bot sync:devmtgo-db is the source of truth for generated database enums, card attributes, rarities, and schema types.
Configure the API database credentials in services/videre-api/.dev.vars, then run:
pnpm db:generate-types
pnpm db:check-typesDo not edit packages/constants/src/enums.g.ts or packages/sql-schema/src/schema.g.ts by hand.
CI database checks use the read-only public_api role through the public-db.videreproject.com Cloudflare TCP bridge.
The API publishes its OpenAPI 3.0 specification at api.videreproject.com/openapi.json. Generate client SDKs and API model types from this document.
- API overview
- Cards
- Sets
- Products
- Prices
- Events
- Decks
- Matches
- Standings
- Metagame
- Archetypes
- Matchups
- MTGO manifest
- Card search syntax
- Data sources and freshness
- Rate limits
- Responses and errors
Run the API tests:
pnpm --filter videre-api test
VIDERE_API_BASE_URL=http://localhost:8787 pnpm --filter videre-api testRun linting and tests before publishing or deploying:
pnpm lint
pnpm testUse the Verdaccio commands above to publish packages locally for testing.
Licensed under the Apache-2.0 License.