Commands
Run these from the repo root with pnpm run <command>.
Everyday Commands
| Command | What it does |
|---|---|
dev | Starts the dev server with all required components |
build | Builds all packages for production |
test | Run all tests |
fix | Auto-fix lint and format issues |
ci | Type-check, lint, and test (this is what CI runs) |
Code Quality
| Command | What it does |
|---|---|
lint | Check for lint errors |
lint:fix | Fix lint errors automatically |
format | Format all files with Prettier |
format:check | Check formatting without changing files |
type-check | Run TypeScript checks |
Deployment
| Command | What it does |
|---|---|
deploy | Deploy everything sequentially |
deploy:api | Deploy API worker only |
deploy:frontend | Deploy frontend only |
deploy:gateway | Deploy gateway only |
deploy:docs | Deploy docs only |
Database
| Command | What it does |
|---|---|
migrate:d1:local | Apply migrations to local D1 |
migrate:d1 | Apply migrations to production D1 |
Utilities
| Command | What it does |
|---|---|
setup:local | First-time local setup |
clean | Delete all node_modules and build artifacts |
Package Scripts
Each package has its own scripts. Most follow the same pattern.
Runnable Packages
These have dev servers.
| Package | dev | build | test | deploy |
|---|---|---|---|---|
| api | :8787 | - | ✓ | ✓ |
| frontend | vite | ✓ | - | ✓ |
| gateway | :8788 | - | - | ✓ |
| docs | vitepress | ✓ | - | ✓ |
| i18n | watch | ✓ | - | - |
Library Packages
These are imported by other packages. No dev server needed.
| Package | What it contains |
|---|---|
| config | Constants, limits, validation rules |
| database | Drizzle schema, migrations |
| shared | Types, utilities, URL helpers |
| tooling | ESLint and Prettier configs |
All library packages have lint, lint:fix, format, format:check, fix, and type-check scripts.
i18n Extras
The i18n package has translation-specific commands:
| Command | What it does |
|---|---|
check | Show translation stats |
check:all | Run all translation checks |
check:hardcoded | Find hardcoded strings in frontend |
check:unused-keys | Find unused translation keys |
check:missing-translations | Find missing translations |
Database Extras
| Command | What it does |
|---|---|
generate | Generate new migration from schema changes |
migrate:local | Apply migrations locally |
migrate:remote | Apply migrations to production |
Running Individual Packages
To run a script in a specific package:
bash
pnpm --filter @pixflare/api dev
pnpm --filter @pixflare/frontend build
pnpm --filter @pixflare/i18n check:allOr cd into the package and run directly:
bash
cd packages/api
pnpm run devDev Server Ports
When you run pnpm run dev, these ports are used:
| Service | Port | URL |
|---|---|---|
| API | 8787 | http://localhost:8787 |
| Gateway | 8788 | http://localhost:8788 |
| Frontend | 5173 | http://localhost:5173 |
| Docs | 5174 | http://localhost:5174 |
The gateway proxies requests in production, but for local dev you'll usually hit the services directly.
File Reference
| Config | File |
|---|---|
| Root scripts | package.json |
| ESLint config | packages/tooling/eslint/base.js |
| Prettier config | packages/tooling/prettier/index.js |