main
md 3.78 KB

name: local-environment

description: A skill for working with the local environment for sigit.si — running the dev stack (bin/dev + local smbcloud-api), env vars, test accounts, and the gotchas that break local sign-in (missing .env, unbuilt tailwind.css, macOS 26/27 native-gem dlopen).

Product map: siGit Code (local agent) · siGit Code Cloud (hosted chat + Cloud Sessions) · siGit Code Cloud Agent (autonomous task → PR; planning). sigit.si is Git hosting; code.sigit.si is the home of siGit Code. Full taxonomy: product-overview.

Running the full local stack

Two processes make local sign-in work end to end (verified 2026-07-02):

  1. sigit-sibin/dev (Puma on :3000 + Tailwind watcher). Do NOT use a bare bin/rails server: it neither builds app/assets/builds/tailwind.css (→ Propshaft::MissingAssetError on every page) nor is there any other process to build it. One-off alternative: bin/rails tailwindcss:build.
  2. smbcloud-api — the local auth backend at ~/Repositories/smbcloud/services/smbcloud-api, bin/rails server (Puma on :8088, from API_SMBCLOUD_XYZ_PORT). Required whenever SIGITSI_SMBCLOUD_ENVIRONMENT=dev, because the smbcloud-auth gem's dev environment hard-points at http://localhost:8088. If it isn't running, sign-in fails with a network error.

Environment (.env)

  • .env at the repo root is gitignored and required: SIGITSI_SMBCLOUD_APP_ID, SIGITSI_SMBCLOUD_APP_SECRET, SIGITSI_SMBCLOUD_ENVIRONMENT (dev → localhost:8088, production → api.smbcloud.xyz). Missing vars surface as the flash "Authentication service is not configured. Please contact support." (controllers rescue the KeyError from ENV.fetch).
  • bin/dev (foreman) auto-loads .env; a bare rails server/rails runner does not (set -a && . ./.env && set +a first if needed).
  • Git worktrees don't inherit .env (gitignored). In a worktree, symlink it: ln -s ~/Repositories/sigit-si/.env .env. Same story for app/assets/builds/ artifacts — rebuild them in the worktree.

Test accounts (local dev)

The local smbcloud-api Postgres DB (smbpndk_api_development) has the sigit-si tenant registered as auth_app "siGit Code & Deploy" (880e7dea-aacb-4ca4-a059-3a649a98f86a = SIGITSI_SMBCLOUD_APP_ID; users were migrated here from the legacy "Rumi App Auth" app on 2026-07-02). Its auth_users (all confirmed) include test@test.com, setoelkahfi@gmail.com, seto@smbcloud.xyz — passwords are bcrypt-hashed, so use one you know, sign up a fresh local account, or reset via the smbcloud-api console. Inspect with:

psql -h localhost -d smbpndk_api_development \
  -c "select id, email, confirmed_at is not null from auth_users
      where auth_app_id = '880e7dea-aacb-4ca4-a059-3a649a98f86a';"

Note: the platform-level seed accounts in smbcloud-api (db/seeds/demo_accounts.rb, e.g. demo@smbcloud.xyz) are platform users, not sigit-si tenant users — they will not work on the sigit-si login form. The production demo account is demo@sigit.si (prod credential).

Known local-only failure modes

  • LoadError: ... auth.bundle ... load command #4 string extends beyond end of load command on macOS 26/27 — broken LC_ID_DYLIB in the smbcloud-auth native extension; fix and band-aid documented in smbcloud-auth under "macOS 26/27".
  • The asset 'tailwind.css' was not found in the load path — CSS never built in this checkout/worktree; run bin/dev or bin/rails tailwindcss:build.
  • "Authentication service is not configured.".env missing/not loaded (see above).
  • Network error on sign-in with SIGITSI_SMBCLOUD_ENVIRONMENT=dev — local smbcloud-api not running on :8088.