Booki Documentation

Local Development

Local dev URL patterns for each Booki app, *.localhost subdomain setup, and branch slug routing.

Each Booki app runs on a separate port. One app requires a subdomain in the local URL to simulate the multi-tenant pattern used in production.

Quick Reference

AppLocal URL PatternExample
cms-booki-web-apphttp://localhost:3000/http://localhost:3000/
owner-booki-web-apphttp://localhost:3001/http://localhost:3001/
customer-booki-web-apphttp://{slug}.localhost:3002/{branchSlug}http://snapshotsstudio.localhost:3002/pampanga
admin-booki-web-apphttp://localhost:3003/http://localhost:3003/

Account Credentials

Use the following test accounts when running Booki locally.

Admin

FieldValue
Emailcodisolutions.business@gmail.com
PasswordAdmin123!

The backend env (.env file) for the default seed user should be configured as follows:

# Default User
DEFAULT_USER_FIRST_NAME=Admin
DEFAULT_USER_LAST_NAME=Codi
DEFAULT_USER_EMAIL=codisolutions.business@gmail.com
DEFAULT_USER_PHONE=
DEFAULT_USER_PASSWORD=Admin123!

Business Owner

FieldValue
Emailbooki.codi@gmail.com
PasswordAdmin123!

Branch Manager

FieldValue
Emailcodisolutions.dev@gmail.com
PasswordAdmin123!

Customer

FieldValue
Emailcodisolutions.business@gmail.com
PasswordPassword123!

Branches

BranchURL
Branch 1 (Main)http://snapshotsstudio.localhost:3002/pampanga
Branch 2http://snapshotsstudio.localhost:3002/bulacan

CMS, Owner & Admin Apps

These apps have no tenant context in the URL — access them directly on their port with no subdomain required. The Owner app derives organization context from the authenticated user's JWT (req.user.organizationId) after login.

http://localhost:3000/   # cms-booki-web-app
http://localhost:3001/   # owner-booki-web-app
http://localhost:3003/   # admin-booki-web-app

Customer App — Subdomain + Branch Slug

The customer app requires both a subdomain (organization slug) and a URL path segment (branch slug).

http://{slug}.localhost:3002/{branchSlug}

# Example
http://snapshotsstudio.localhost:3002/pampanga

What each part does:

PartExampleInjected as
Subdomainsnapshotsstudiox-tenant-slug header
Path segment/pampangax-branch-slug header

The branch slug comes from the [branchSlug] dynamic route parameter. A client plugin syncs it to state on every navigation and injects it into all API requests via a $fetch interceptor.

Default branch redirect

Visiting http://{slug}.localhost:3002/ (no branch slug) triggers an automatic redirect. The app calls GET /api/v1/tenant/{slug}/default-branch and navigates to /{defaultBranchSlug}.


*.localhost Subdomain Support

Chrome and Edge resolve *.localhost natively — no /etc/hosts changes are needed. Just start the app and open the subdomain URL directly.

Firefox does not resolve *.localhost by default. Enable it in about:config:

  1. Open about:config and accept the warning.
  2. Search for network.dns.localDomains.
  3. Set its value to localhost.
  4. Restart Firefox.

BASE_DOMAIN for Local Development

When running locally, set BASE_DOMAIN=.localhost in each app's .env so that auth cookies are scoped correctly across *.localhost subdomains. Using .booki.app locally will prevent cookies set on snapshotsstudio.localhost from being sent to other subdomains.

# Local development
BASE_DOMAIN=.localhost

# Production
BASE_DOMAIN=.booki.app