Engineering

Local setup

How to run the Rails platform and the Expo app. Secrets stay in credentials, not in this wiki.

Source: README.md, platform/README.md, mobile/README.md

Open this wiki

open wiki/index.html

Or double-click wiki/index.html. No server needed. The running platform also serves it at /wiki.

Platform

Rails 8.1.3.1 fullstack app in platform/: public web, workspace (/app), Admin console (/admin), and the staff JSON API (/api/v1).

Prerequisites

Foreman is installed by bin/dev if missing. Node is not required; Tailwind uses the tailwindcss-rails binary.

Credentials

All environments read PostgreSQL host, port, username, and password from credentials.dig(:database, :production).

cd platform
bin/rails credentials:edit

Expected keys (values stay in credentials, not in git): database.production, amazon.s3, amazon.ses, amazon.sms, super_user, google, facebook, apple, stripe.production / stripe.development, deploy. Stripe reads production in production and development otherwise.

Do not commit secrets config/master.key is gitignored. Without it the app will not boot. Never paste passwords or keys into the wiki.

Databases

EnvironmentName
developmenttaskpaws_development
testtaskpaws_test
production primarytaskpaws
production cache / queue / cabletaskpaws_cache, taskpaws_queue, taskpaws_cable

Run

cd platform
bin/setup --skip-server
bin/dev

App at http://localhost:3000. Health: GET /up. Jobs: bin/jobs. Tests: bin/rails test and bin/ci. bin/setup installs gems and prepares the database (migrations plus SuperUser seed); pass --reset to rebuild from scratch.

Production recurring jobs (config/recurring.yml): finished-job cleanup, stale QR upload session purge, Billing::RenewDueSubscriptionsJob daily at 6am, and AppointmentReminderJob every 5 minutes.

Storage and locales

Active Storage uses S3 (amazon service, us-west-2, bucket taskpaws-<env>) in every environment. English default; Spanish from the marketing nav, /app profile menu, or Admin language menu (cookie) or when Accept-Language prefers es. YAML UI copy lives in en.yml / es.yml; landing plan/feature marketing is edited at Admin /admin/translations. Guide: docs/architecture/translations.md.

Routes

PathWhat
/, /login, /registerLanding, staff login (email + Google / Apple / Facebook), create account / start trial
/appWorkspace home: clinic radar at a Location, SaaS billing widgets
/app/settingsHierarchy, legal entities, locations, location groups (Elite), SaaS billing; /app/billing redirects there
/app/staffsUsers & roles: invite, resend, disable/enable, role assignment
/app/patients, /app/clientsPatient charts and pet parents
/app/scheduleLocation appointment calendar (/app/appointments writes)
/app/whiteboard, /app/visits/:idVisit board (Floor / Pipeline / List) and Visit 360 workspace
/app/catalog, /app/pricing_groups, /app/patient_groupsCatalog and pricing
/app/appointment_typesAppointment types (duration, color, catalog item, deposit)
/app/tax_groups, /app/taxesTaxes with Location overrides
/app/inventoryPer-Location stock
/app/checkout, /app/invoices, /app/credit_notes, /app/depositsClinic sales, invoices, credit notes, payments, deposits
/app/tips, /app/commissions, /app/commission_groupsStaff tips and commissions
/app/notification_settingsClient email/SMS notifications and templates
/api/v1Staff JSON API (Bearer token) used by mobile/
/admin/login, /adminSuperUser login and dashboard
/admin/users, /admin/super_users, /admin/organizationsStaff accounts (impersonate, invites), super admins, organizations (trial days, credits, plan)
/admin/plans, /admin/translations, /admin/billing_transactionsSaaS plans, marketing translations, SaaS charges
/admin/breeds, /admin/catalog_item_categories, /admin/observation_kindsPlatform catalogs
/admin/roles, /admin/actions, /admin/audits, /admin/settingsRBAC catalog, audit log, platform settings
/intake/:token, /plans/:token, /photo_uploads/:tokenPublic token pages: patient intake, treatment plan approval, QR photo upload
/webhooks/stripeStripe SaaS billing webhooks
/privacy, /terms, /facebook/deletion, /locale/:locale, /upLegal, Facebook deletion, language cookie, health check

Mobile

Expo SDK 58, React 19.3.0, React Native 0.88.0, TypeScript strict. State and API: Redux Toolkit slices (src/store) calling src/api through an axios httpClient. Entry: index.ts → src/App/App.tsx. Docs: Expo v58.

Prerequisites

cd mobile
npm install
npm start

Then npm run ios, npm run android, or npm run web. The API origin comes from EXPO_PUBLIC_API_BASE_URL (default http://localhost:3000). Native ios/ and android/ are gitignored; generate with Expo prebuild when needed. App chrome strings: src/i18n/locales/en.json / es.json.

Status

Screens (phone and tablet layouts) run against /api/v1:

ScreenBehavior
Login / RegisterEmail and password, Google / Apple / Facebook, trial register
HomeWorkspace switcher, trial banner, new appointment. Stats and agenda cards are sample data
ScheduleAppointments with types, walk-ins, check-in, undo check-in. Pull to refresh
Patients / ClientsDirectory, detail, create and edit
StaffDirectory, invite, resend, edit, role assignments
OrganizationSettings: organization, legal entities, locations
Not built yet Whiteboard, checkout, Action Cable (the Schedule reloads over HTTP), and API search. Live board contract: Architecture → Live boards.