YAS/BUILDANDRUN.md
YetAnotherSuite Dev 93489d5c2b docs: add BUILDANDRUN.md and NEXTSTEP.md developer guides
BUILDANDRUN.md — developer onboarding guide covering prerequisites,
quick start, CLI commands, scoped package execution, service URLs,
Docker production build, Tauri desktop build, and verification steps.

NEXTSTEP.md — comprehensive assessment of project state across all
6 phases, identifying what is solid vs placeholder, with prioritized
next steps: write tests, wire frontend to API, Prisma migrations,
finish calendar views, wire sync engine, code splitting, i18n.
2026-07-20 22:33:54 +02:00

94 lines
2.2 KiB
Markdown

# Build & Run — YetAnotherSuite
## Prerequisites
- **Node.js** 22+
- **pnpm** 11+ (`npm install -g pnpm`)
- **Docker** + **Docker Compose** (for Postgres, Redis, Meilisearch)
- **Rust** (only for desktop build — Tauri v2)
## Quick start
```sh
# 1. Install dependencies
pnpm install
# 2. Approve native build scripts (first time only)
pnpm approve-builds
# 3. Start Postgres + Redis + Meilisearch
docker compose up -d postgres redis meilisearch
# 4. Generate Prisma client & push schema to DB
pnpm --filter @yetanother/db exec prisma generate
pnpm --filter @yetanother/db exec prisma db push
# 5. (Optional) Seed dev data
pnpm --filter @yetanother/db exec tsx prisma/seed.ts
# 6. Copy env file
cp .env.example .env
# 7. Start dev servers (API on :4000, Web on :3000)
pnpm dev
```
Open **http://localhost:3000** — the Vite dev server proxies `/api` and `/ws` to the API.
## Commands
| Command | What |
|---------|------|
| `pnpm dev` | Start all apps in dev mode |
| `pnpm build` | Build all packages (prod) |
| `pnpm lint` | ESLint across all packages |
| `pnpm typecheck` | TypeScript strict type checks |
| `pnpm test` | Run all tests (Vitest) |
| `pnpm format` | Prettier format all files |
| `pnpm clean` | Remove dist + `.turbo` + node_modules |
### Scoped to a single package
```sh
pnpm --filter @yetanother/web dev # web only
pnpm --filter @yetanother/api dev # api only
pnpm --filter @yetanother/api exec prisma studio # DB browser
pnpm --filter @yetanother/db exec prisma migrate dev # new migration
```
## URLs
| Service | URL |
|---------|-----|
| Web app | http://localhost:3000 |
| API | http://localhost:4000 |
| API docs | http://localhost:4000/docs |
| Prisma Studio | `pnpm --filter @yetanother/db exec prisma studio` |
| Meilisearch | http://localhost:7700 |
## Docker (production build)
```sh
docker compose up --build
```
This starts Postgres, Redis, Meilisearch, the built API (:4000), and the built web app (:3000/80 via Nginx).
## Desktop (Tauri)
Requires the [Rust toolchain](https://rustup.rs).
```sh
cd apps/desktop
pnpm tauri dev # dev with hot-reload
pnpm tauri build # production bundle
```
## Verification
```sh
pnpm lint && pnpm typecheck && pnpm build
```
All three must pass before committing.