diff --git a/.env.example b/.env.example index b1cab5a..effa91c 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,14 @@ -DATABASE_URL=postgres://paperclip:paperclip@localhost:5432/paperclip +# === Dev local (không cần DATABASE_URL, server dùng embedded PGlite) === +# DATABASE_URL=postgres://paperclip:paperclip@localhost:5432/paperclip + +# Server PORT=3100 -SERVE_UI=false +SERVE_UI=true + +# Auth (bắt buộc cho authenticated mode) +PAPERCLIP_PUBLIC_URL=http://localhost:3100 +BETTER_AUTH_SECRET=dev-secret-change-me-please-replace + +# Agent API keys (optional) +# OPENAI_API_KEY=sk-... +# ANTHROPIC_API_KEY=sk-ant-... diff --git a/.gitignore b/.gitignore index 61b00a2..2c08a0c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ data/ .pnpm-store/ tmp-* cli/tmp/ +package-lock.json +VissSoft_CEO/ # Scratch/seed scripts (but not scripts/ dir) check-*.mjs diff --git a/doc/DEVELOPING.md b/doc/DEVELOPING.md index b39839c..6f1b674 100644 --- a/doc/DEVELOPING.md +++ b/doc/DEVELOPING.md @@ -15,6 +15,30 @@ Current implementation status: - Node.js 20+ - pnpm 9+ +## Windows Development Notes + +The project runs on Windows with a few adjustments: + +**Install pnpm via corepack (bundled with Node.js 20+):** + +```powershell +corepack enable +corepack prepare pnpm@9.15.4 --activate +``` + +**Shell command equivalents:** + +| Linux/macOS | Windows (PowerShell) | +|---|---| +| `rm -rf ~/.paperclip/instances/default/db` | `Remove-Item -Recurse -Force "$env:USERPROFILE\.paperclip\instances\default\db"` | +| `export DATABASE_URL=...` | `$env:DATABASE_URL = "..."` | +| `curl http://localhost:3100/api/health` | `Invoke-RestMethod http://localhost:3100/api/health` | + +**Notes:** +- Shell scripts (`.sh`) under `scripts/` require Git Bash or WSL. Most common dev commands (`pnpm dev`, `pnpm build`, `pnpm typecheck`, `pnpm test:run`) work natively in PowerShell. +- Data paths use `%USERPROFILE%\.paperclip\` instead of `~/.paperclip/`. +- If using Docker Desktop for Windows, ensure WSL 2 backend is enabled. + ## Dependency Lockfile Policy GitHub Actions owns `pnpm-lock.yaml`.