Local Development
Run Auvyra from source.
Setup
corepack enable
pnpm install
pnpm env:generate
docker run -d --name auvyra-mongo -p 127.0.0.1:27017:27017 -v auvyra-mongo:/data/db mongo:8
pnpm devOpen http://localhost:3000/setup.
Commands
| Command | What it does |
|---|---|
pnpm dev | Starts the station website and dashboard on port 3000 |
pnpm dev:website | Starts the official Auvyra website and docs on port 3002 |
pnpm build | Builds every app for production |
pnpm start | Serves the production build of the station website and dashboard |
pnpm test | Runs unit and contract tests |
pnpm test:e2e | Runs browser tests against the production build |
pnpm typecheck | Type-checks every package |
pnpm lint | Runs ESLint |
pnpm db:init | Checks the database and applies migrations |
pnpm env:generate | Creates .env with random secrets |
Tests
Tests use Vitest. MongoDB tests start an in-memory server, which downloads a binary the first time.
The SQLite contract suite always runs. The PostgreSQL, MySQL and MariaDB suites need a real server and are skipped without one. To run them, and optionally use your own MongoDB:
TEST_POSTGRES_URL=postgresql://postgres:test@localhost:5432/postgres TEST_MONGODB_URL=mongodb://localhost:27017 pnpm test
TEST_MYSQL_URL=mysql://root:test@localhost:3306 TEST_MARIADB_URL=mariadb://root:test@localhost:3307 pnpm testThese suites write to their own databases, named after auvyra_contract, and wipe them.
Browser tests
The e2e workspace drives the production build with Playwright, across the setup wizard, dashboard, public site and live player. Each run wipes its database, so the database name must contain e2e.
pnpm --filter @auvyra/e2e exec playwright install chromium
pnpm build
E2E_ENGINE=mongodb E2E_MONGODB_URL=mongodb://localhost:27017/auvyra_e2e pnpm test:e2e
E2E_ENGINE=postgresql E2E_POSTGRES_URL=postgresql://postgres:test@localhost:5432/auvyra_e2e pnpm test:e2e
E2E_ENGINE=mysql E2E_MYSQL_URL=mysql://root:test@localhost:3306/auvyra_e2e pnpm test:e2e
E2E_ENGINE=mariadb E2E_MARIADB_URL=mariadb://root:test@localhost:3307/auvyra_e2e pnpm test:e2e
E2E_ENGINE=sqlite pnpm test:e2eThe suite starts its own stand-ins for AzuraCast and a mail server.
Set E2E_CHANNEL=msedge to use an installed browser instead.
Adding UI components
packages/ui follows shadcn/ui conventions, with theming from the tokens in packages/ui/src/styles/tokens.css. Add components there and export them from packages/ui/src/index.ts.