Monorepo for the Cloudwrkz product: Vite + Rust API stack, Next.js app, Rust CLI, and iOS app. Single git repository, no submodules.
| Component | Path | Description |
|---|---|---|
| Web (Vite) | apps/web-vite | React SPA, Tailwind; talks to the Rust API |
| API | apps/api | Rust (Axum, SQLx, PostgreSQL) |
| CLI | apps/cli | Rust CLI for DB tasks, bootstrap admin, API-backed menus |
| Web (Next.js) | apps/web | Next.js 16 app (Prisma, dashboard, Docker); legacy/alternate UI |
| iOS | apps/ios | Native iOS app (Swift, Xcode) |
- Node.js ≥ 25.2.0 (apps/web/.nvmrc pins the recommended version)
- pnpm ≥ 9 — enable via Corepack:
corepack enable corepack prepare pnpm@latest --activate - Docker and Docker Compose (v2:
docker compose) — local PostgreSQL, optional API container - Rust (stable) — only if you build or run
apps/apiandapps/clion the host instead of using the API container
From the repository root:
git clone <repository-url> cloudwrkz
cd cloudwrkz
pnpm installThis installs the pnpm workspace packages under apps/web and apps/web-vite (see pnpm-workspace.yaml).
| App | Action |
|---|---|
| API | Copy apps/api/.env.example to apps/api/.env and adjust if needed. Defaults match the root Compose Postgres credentials. |
| Vite | Copy apps/web-vite/.env.example to apps/web-vite/.env. Defaults proxy /api/v1 to the API on port 8080. |
| Next.js | Copy apps/web/.env.example to apps/web/.env.local — see apps/web/README.md. |
| CLI | Optional: copy apps/cli/.env.example to apps/cli/.env for tokens and local overrides. |
From the repository root:
docker compose up -dThis starts:
- PostgreSQL on port
5432(usercloudwrkz, databasecloudwrkz, default passwordcloudwrkz_dev_passwordunless you setPOSTGRES_PASSWORD) - Rust API on port
8080(applies SQLx migrations on startup) - pgAdmin on port
5050(default login[email protected]/admin)
Check API health: http://localhost:8080/api/health.
To stop: docker compose down. To remove data volumes: docker compose down -v.
From the repository root:
pnpm dev:viteOpen http://localhost:5173. The dev server proxies API requests to http://127.0.0.1:8080 when VITE_API_URL is the default /api/v1.
Run the API on the host instead of Docker: from the repo root, with apps/api/.env present:
cargo run -p cloudwrkz-apiEnsure Postgres is reachable at the DATABASE_URL in that file (e.g. after docker compose up -d postgres only, or a local Postgres instance).
With the database up, build the CLI from the repo root and create the first admin (requires a bootstrap secret — see apps/cli/README.md):
cargo build --release -p cloudwrkz-cli
export CLOUDWRKZ_BOOTSTRAP_SECRET=local-dev
./target/release/cloudwrkz-cli admin create-admin [email protected] "YourPassword" "Your Name"On Windows (PowerShell), after cargo build:
$env:CLOUDWRKZ_BOOTSTRAP_SECRET = "local-dev"
.\target\release\cloudwrkz-cli.exe admin create-admin you@example.com "YourPassword" "Your Name"Uses Prisma and its own Docker Compose under apps/web for local Postgres (or align DATABASE_URL with the root stack). Full steps: apps/web/README.md.
Root scripts still target the Next.js package as web:
pnpm dev # Next.js dev server
pnpm build # Next.js production build
pnpm db:studio # Prisma StudioOpen apps/ios/Cloudwrkz.xcodeproj in Xcode and build/run. Point the app at your API base URL as needed.
| Command | Description |
|---|---|
pnpm dev |
Next.js dev server (apps/web) |
pnpm dev:vite |
Vite dev server (apps/web-vite) |
pnpm build / pnpm build:vite |
Production builds |
pnpm db:* |
Prisma commands for apps/web (generate, push, migrate, studio, …) |
docker compose up -d |
Postgres + API + pgAdmin |
cargo run -p cloudwrkz-api |
Run API locally |
cargo build --release -p cloudwrkz-cli |
Build CLI binary |
- JavaScript: pnpm workspace in pnpm-workspace.yaml (
apps/web,apps/web-vite). - Rust: Cargo workspace in Cargo.toml (
apps/api,apps/cli). - CI: GitHub Actions under .github/workflows.
Proprietary.