Thanks to visit codestin.com
Credit goes to github.com

Skip to content

AsP3X/cloudwrkz

Repository files navigation

Cloudwrkz

Monorepo for the Cloudwrkz product: Vite + Rust API stack, Next.js app, Rust CLI, and iOS app. Single git repository, no submodules.

Structure

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)

Prerequisites

  • 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/api and apps/cli on the host instead of using the API container

Setup

1. Clone and install JavaScript dependencies

From the repository root:

git clone <repository-url> cloudwrkz
cd cloudwrkz
pnpm install

This installs the pnpm workspace packages under apps/web and apps/web-vite (see pnpm-workspace.yaml).

2. Environment files

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.

3. Database and API (recommended: Docker Compose from repo root)

From the repository root:

docker compose up -d

This starts:

  • PostgreSQL on port 5432 (user cloudwrkz, database cloudwrkz, default password cloudwrkz_dev_password unless you set POSTGRES_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.

4. Run the Vite web app

From the repository root:

pnpm dev:vite

Open 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-api

Ensure Postgres is reachable at the DATABASE_URL in that file (e.g. after docker compose up -d postgres only, or a local Postgres instance).

5. First admin account (bootstrap)

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"

6. Next.js app (apps/web) — optional

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 Studio

7. iOS app

Open apps/ios/Cloudwrkz.xcodeproj in Xcode and build/run. Point the app at your API base URL as needed.

Quick reference (repo root)

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

Tooling

License

Proprietary.

About

Next.js 15-powered ticketing, time tracking, ERP, project management, and CRM system (in active development)

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors