Skip to content
AdiosDocumentation
Browse documentation

Run locally

Run a local preview when you want to review changes before deploying. For a first look, start the full CRM with a temporary database. For copy and layout changes, a static preview starts without PostgreSQL.

Start a disposable CRM preview

On macOS or Linux, install Python 3.11+, Node.js 24+ with npm, and PostgreSQL 17+ server tools. Run from the kit folder:

sh
python3 scripts/preview.py

Open http://127.0.0.1:8080/ when you see SaaS kit CRM server ready. Choose Create an account and use a test email such as founder@example.invalid. Open the matching message under .local/mail and follow its link value. Sign in and create a sample deal.

The script installs locked app dependencies, sets up the three application roles, and listens only on your computer. It uses its own temporary database and does not need the Adios CLI, a cloud account, or provider keys. Press Ctrl+C to stop it and discard the preview data. Outbox files remain in .local/mail; use the newest matching message on the next run.

If port 8080 is busy, run python3 scripts/preview.py --port 8081 and use the printed URL. If PostgreSQL is installed but the script cannot find its server tools, put its bin directory on your PATH or set PG_BINDIR to that directory. Use manual local development for a database that persists across restarts.

Preview the landing pages and docs

Use Node 24+ and Python 3. Run from the kit folder:

sh
node scripts/build_site.mjs
python3 -m http.server 4173 --bind 127.0.0.1 --directory dist

Open http://127.0.0.1:4173. Rebuild after editing site/ or docs/, then refresh the browser. Use the disposable CRM preview to follow the sign-up link or test the app.

Run the real JavaScript app

Use Node 24+, PostgreSQL 17+, psql, and an Adios CLI build with the kit commands. Follow manual database setup to create a development database, enable CRM, and grant the three application roles.

Copy the settings template:

sh
cp .env.example .env

Edit your private .env with the three development service connections. Set NODE_ENV=development, APP_ORIGIN=http://localhost:8080, PORT=8080, and MAIL_MODE=outbox. Leave Stripe settings empty until you want to test billing. Keep .env out of Git.

Install the app dependencies, build the public pages, and start the server:

sh
npm ci --ignore-scripts --prefix runtime/javascript
node scripts/build_site.mjs
node --env-file=.env runtime/javascript/server.mjs

Open http://localhost:8080/app/. The app uses the origin you configured for account links and request checks, so use that same address in your browser.

Check account emails locally

In outbox mode, verification, reset, and invitation messages are saved privately under .local/mail. Open the message for your test account and follow its link. Email verification still applies, including for .invalid addresses.

Outbox mode is only available on local development origins. Deployed apps use your configured email provider.

Test a feature change

Run the relevant tests after changing application behavior:

sh
node --test tests/workspace.test.mjs tests/runtime.test.mjs tests/team.test.mjs

For database and full HTTP checks, install Python 3.11+ and PostgreSQL server/client binaries, then run:

sh
python3 tests/run_database.py --runtime

This creates its own temporary database and removes it afterward. It uses controlled email and Stripe responses. Set PG_BINDIR if pg_config does not select your PostgreSQL installation. Then try the changed workflow in your local app using Verify your SaaS.

Use Adios Sandbox

The CLI supports adios up --local, but the kit does not yet include a complete Sandbox profile that provisions its database and configures service credentials. Use the local setup above until that profile is available.

Next: Build with AI or deploy your reviewed changes.