Each tenant site has its own keyspace, domains and feature switches. Redfly signs people in, Solr powers search and the map, and chat fans out live over Pulsar.
Tenancy
The keyspace caulight_control holds the tenant registry: slug, display name, time zone, status, description, hero text, feature switches, default_theme and clock_24h, plus keyspace_name, solr_core and redfly_tenant, with the lookups tenant_by_slug, tenant_domain and tenant_domain_by_hostname.
Each tenant has its own keyspace, caulight_<tenant id as 32 hex>, built from the tenant template with NetworkTopologyStrategy {<dc>: 3}.
Resolving the tenant on each request
- Host →
tenant_domain_by_hostname→ tenant → keyspace. - The PASETO
tenclaim must include the tenant’sredfly_tenant.
Provisioning
From the platform site: create the keyspace, apply the migrations, run the data steps, create the Solr core and register the tenant in Redfly.
Sign-in and roles
- Redfly handles sign-in. The Shiro realm
RedflyTokenRealmverifies the PASETO and checks the revocation deny-list. - It maps
subtoapp_user.redfly_user_id. On first visit, an onboarding form creates the profile: name, city, interests, supporter flag, plain-language preference and intent. - The ICS feed
/calendar/<token>.icscarries a random token; Caulight stores only its SHA-256. It is read-only, limited to the user’s own bookings, and can be regenerated.
| Role | Permissions |
|---|---|
administrator | Every permission |
program_manager | reports:review, groups:moderate, invite, users:read, hosts:approve, experiences:read, bookings:read, plus everything an explorer has |
host | experiences:write (own), occurrences:write (own), bookings:read (own), conversations:write, plus everything an explorer has |
supporter | act-for (for linked explorers), plus everything an explorer has |
explorer | experiences:read, bookings:write (own), reviews:write (own), favorites:write (own), groups:read, groups:join, posts:write (own), discussions:read, discussions:write, conversations:write, reports:create, notifications:read (own), profile:write (own) |
“(own)” means the handler also checks that the record’s owner column matches the caller, or an explorer linked to a supporter caller.
Search and map
One Solr core per tenant, caulight_<tenant hex>, updated through persistent://odssbc/caulight/index, which every replica consumes through an Exclusive subscription.
| Document | Indexed fields |
|---|---|
| experience | Title, description, categories, accessibility features, host, price band, and location as location_rpt for geo search and the public map |
| person | Handle, display name, city and interests, for public profiles only |
| group | Name and description |
| discussion | Group name, message text and tags |
Chat and notifications
- Discussions and conversations are stored in Cassandra first, then published to
persistent://odssbc/caulight/chat, keyed by<tenant>:<group|conversation>. - Replicas fan messages out over WebSocket while
CAULIGHT_LIVE_PULSAR_ENABLEDis on. - Booking updates, messages and recommendations go by SMS through Redfly
POST /v1/notify/sms, following each user’ssms_*preferences.
Generated API
One controller per tenant table under /api/v1/<table>, generated from the CQL. Every handler resolves the tenant keyspace, checks @RequiresPermissions("<prefix>:read|write"), assigns a UUIDv7 id on POST, keeps *_by_* lookup tables up to date with LWT (409 on conflict) and writes an audit row. List requests take a limit of at most 500 and return a paging-state token.
| Prefix | Tables |
|---|---|
experiences | experience, experience_category, experience_accessibility_feature, occurrence, stored_image |
catalog | category, accessibility_feature |
bookings / reviews / favorites | booking / review / favorite |
hosts | host_application |
groups | social_group, social_group_member, social_group_join_request, social_group_invite, social_post, social_comment, social_reaction |
discussions | discussion_group, discussion_member, discussion_message, discussion_tag, discussion_mention, discussion_attachment |
conversations | conversation, conversation_participant, message |
notifications / reports / supporters / invite | notification / report / supporter_link / site_invitation |
users / roles | app_user / shiro_role, shiro_role_permission, shiro_user_role |
Files
Images and attachments are stored in S3-compatible object storage at s3://<bucket>/caulight/<tenant>/<storage_key>; Cassandra keeps metadata only.
Ports
| Port | Bind | Purpose |
|---|---|---|
| 8445 | pod IP | HTTPS: web UI, generated API, ICS feeds, health |
| 7000 | pod IP, TLS | Cassandra internode traffic |
| 9042 | 127.0.0.1 | CQL native (app → embedded Cassandra) |
| 2181 | 127.0.0.1 | SunLink ZooKeeper protocol (Curator) |
| 7480 | pod IP, mTLS | SunLink Raft ring between replicas |
| 6379 | 127.0.0.1 | SeaWave RESP (Spring Session, deny-list) |
| 7481 | pod IP, mTLS | SeaWave peer replication |
Key environment variables
| Variable | Purpose |
|---|---|
CAULIGHT_CASSANDRA_DATA_DIR, _DC, _SEEDS | Embedded Cassandra |
CAULIGHT_SOLR_DATA_DIR | Embedded Solr (one core per tenant) |
CAULIGHT_LIVE_PULSAR_ENABLED | Live chat fan-out, default true |
CAULIGHT_REDFLY_URL | Redfly base URL |
CAULIGHT_PLATFORM_HOST | Hostname of the platform site |
CAULIGHT_S3_ENDPOINT / _BUCKET / _CREDENTIALS_FILE | Image and attachment storage |