A3 Platform Architecture Reference
Overview
A3 is a full-featured SaaS platform for insurance agent management built by Trusted American Insurance Agency. It provides CRM, enrollment management, commission tracking, compliance tools, and agent support.
Tech Stack
| Layer |
Technology |
| Frontend |
Ember.js 6.9 (Octane) with TypeScript, Glimmer GTS components |
| Build |
Vite + Embroider |
| Styling |
Tailwind CSS 4 + Bootstrap 5 |
| State |
WarpDrive (next-gen Ember Data) |
| Database |
Cloud Firestore (NoSQL) |
| Realtime DB |
Firebase Realtime Database (status tracking) |
| File Storage |
Google Cloud Storage |
| Auth |
Firebase Authentication + ember-simple-auth |
| Backend |
Google Cloud Functions (Node.js 22, TypeScript) |
| Search |
Algolia |
| Payments |
Stripe |
| Email |
Mailgun |
| Documents |
PandaDoc |
| CRM Sync |
HubSpot, Salesforce |
| Error Tracking |
Sentry |
| Customer Support |
Intercom |
| State Machines |
XState 5 |
| Charts |
Highcharts 12 |
| Maps |
Google Maps |
| Deployment |
Netlify (frontend), GCP (backend) |
| IaC |
Terraform |
Directory Structure
A3/
├── app/ # Ember.js frontend application
│ ├── abilities/ (101) # ember-can permission definitions
│ ├── adapters/ (11) # Data source adapters
│ ├── builders/ (2) # API call builders
│ ├── components/ (436) # Glimmer GTS components
│ ├── config/ (5) # App configuration
│ ├── controllers/ (varies) # Controllers (only for query params)
│ ├── handlers/ (2) # Request handlers
│ ├── helpers/ (2) # Template helpers
│ ├── models/ (136) # Ember Data models
│ ├── modifiers/ (1) # DOM modifiers
│ ├── routes/ (333) # Route definitions
│ ├── serializers/ (16) # Data serializers
│ ├── services/ (12) # Application services
│ ├── session-stores/(1) # Auth session storage
│ ├── styles/ (1) # Tailwind CSS entry point
│ ├── templates/ (158) # GTS route templates
│ ├── transforms/ (5) # Attribute transforms
│ └── utils/ (19) # Utility functions
├── functions/ # Google Cloud Functions backend
│ ├── src/
│ │ ├── auth/ # Auth triggers
│ │ ├── database/ # Realtime DB triggers
│ │ ├── firestore/ # Firestore document triggers
│ │ ├── https/ # HTTPS endpoints
│ │ ├── pubsub/ # Pub/Sub triggers
│ │ ├── storage/ # Cloud Storage triggers
│ │ ├── models/ # TypeScript interfaces
│ │ ├── types/ # Type definitions
│ │ └── utils/ # Shared utilities
│ └── lib/ # Compiled output
├── tests/ # Test suites (807 files)
│ ├── acceptance/ # User flow tests
│ ├── integration/ # Component tests
│ └── unit/ # Logic tests
├── translations/ # i18n files
├── types/ # Global TypeScript types
├── algolia/ # Algolia search config
├── terraform/ # Infrastructure as Code
├── emulator-data/ # Firebase emulator snapshots
├── config/ # Ember.js config
├── docs/ # Documentation
└── public/ # Static assets
Data Flow Architecture
Read Flow (Frontend → Firestore)
User visits route
→ Route.model() calls store.query() or store.findRecord()
→ WarpDrive Store dispatches to adapter
→ CloudFirestoreAdapter reads from Firestore
→ CloudFirestoreSerializer normalizes response
→ Store caches record
→ GTS template renders via @model
→ Glimmer component displays data
Write Flow (Frontend → Firestore → Triggers)
User submits form
→ Component @action or ember-concurrency task
→ model.save() via WarpDrive Store
→ CloudFirestoreAdapter writes to Firestore
→ Firestore document created/updated
→ Cloud Function trigger fires
→ Side effects: email, Algolia sync, audit trail, webhooks
→ Real-time listener updates frontend Store
→ Component re-renders with updated data
Third-Party Integration Flow
Frontend component → REST adapter (adapter/firebase.ts)
→ Cloud Function HTTPS endpoint
→ Third-party API (Stripe, Mailgun, PandaDoc, etc.)
→ Response → Firestore document update
→ Real-time listener → Frontend update
Domain Model Map
Core Entities
- Agency — Insurance agency (primary organizational unit)
- User — Platform user (agent, admin, super admin)
- Client — Contact/person being insured
- Carrier — Insurance carrier company
Business Entities
- Enrollment — Insurance enrollment record
- Contract — Agent-carrier contract
- Group — Group insurance plan
- Quote — Insurance quote
- Membership — Client membership
Financial
- Statement — Commission statement
- Transaction — Financial transaction
Communication
- Activity — Audit trail / activity log
- Message — Internal messaging
- Ticket — Support ticket
- Inquiry — Lead inquiry
Associations
- Affiliation — Agent-agency relationship
- License — Agent license record
- Event — Calendar/marketing event
Attachment Patterns
Most entities have associated:
*-file — File attachments (stored in Cloud Storage)
*-note — Text notes
activity — Audit trail entries
Route Map
Public Routes
| Route |
Purpose |
/login |
User authentication |
/register |
New user registration |
/reset |
Password reset |
/onboarding |
Post-registration setup |
/client/:id |
Public client profile |
/client-form/:id |
Public client form |
/order/:id |
Order page |
/session |
Session management |
Authenticated Routes (/a3/...)
| Route |
Purpose |
/a3 |
Dashboard |
/a3/clients |
Client (contact) management |
/a3/enrollments |
Enrollment management |
/a3/groups |
Group management |
/a3/agencies |
Agency management |
/a3/carriers |
Carrier information |
/a3/contracting |
Contract management |
/a3/statements |
Commission statements |
/a3/settings |
User settings |
/a3/tools |
Quote tools |
/a3/calendar |
Calendar |
/a3/leads |
Lead management |
/a3/notifications |
Notifications |
/a3/search |
Global search |
/a3/support |
Support tickets |
/a3/resources |
Resources |
/a3/knowledge-hub |
Knowledge base |
/a3/marketing-events |
Marketing events |
/a3/readiness-report |
Readiness report |
/a3/services |
Services (websites) |
Admin Routes (/admin/...)
| Route |
Purpose |
/admin/accounting |
Financial management |
/admin/agencies |
Agency administration |
/admin/carriers |
Carrier management |
/admin/clients |
Client administration |
/admin/contracting |
Contract admin |
/admin/enrollments |
Enrollment admin |
/admin/enrollment-issues |
Issue tracking |
/admin/events |
Event management |
/admin/groups |
Group admin |
/admin/inquiries |
Lead/inquiry management |
/admin/marketing |
Marketing tools |
/admin/messages |
Messaging |
/admin/notifications |
Notification management |
/admin/products |
Product management |
/admin/reporting |
Reports |
/admin/search |
Admin search |
/admin/settings |
System settings |
/admin/tickets |
Support ticket admin |
/admin/users |
User management |
Service Map
| Service |
File |
Purpose |
store |
app/services/store.ts |
WarpDrive data store with custom aggregation methods |
session |
app/services/session.ts |
Firebase Auth + MFA + ember-simple-auth |
current-user |
app/services/current-user.ts |
Loaded user data and permissions |
search |
app/services/search.ts |
Algolia search integration |
pdf |
app/services/pdf.ts |
PDF generation/manipulation |
csv |
app/services/csv.ts |
CSV export |
xlsx |
app/services/xlsx.ts |
Excel export |
analytics |
app/services/analytics.ts |
Event tracking |
tour |
app/services/tour.ts |
Shepherd.js onboarding tour |
recent-records |
app/services/recent-records.ts |
Recently viewed record tracking |
Key Configuration Files
| File |
Purpose |
app/config/environment.js |
Firebase config, API endpoints, feature flags |
firebase.json |
Firebase project config, emulator settings |
firestore.rules |
Firestore security rules (~101KB) |
firestore.indexes.json |
Composite indexes (~235KB) |
storage.rules |
Cloud Storage security rules |
database.rules.json |
Realtime Database rules |
ember-cli-build.js |
Build config (Embroider, split routes) |
vite.config.mjs |
Vite build config (Tailwind, PWA) |
app/router.ts |
Route definitions |
tsconfig.json |
TypeScript configuration |
netlify.toml |
Netlify deployment config |
Development Environment
- Frontend dev:
ember serve or vite dev
- Backend dev: Firebase Emulator Suite (auth, firestore, functions, storage, pubsub)
- Emulator data:
emulator-data/ contains snapshots for seeding
- Tests:
ember test (runs in browser via testem)
- Linting: ESLint, Prettier, Stylelint, ember-template-lint
Further Investigation Links
When you need deeper knowledge about specific areas:
1---2name: a3-architecture3description: Complete architecture reference for the A3 insurance platform — file locations, data flow, conventions, microservice map, and fullstack patterns4---56# A3 Platform Architecture Reference78## Overview910A3 is a full-featured SaaS platform for insurance agent management built by Trusted American Insurance Agency. It provides CRM, enrollment management, commission tracking, compliance tools, and agent support.1112## Tech Stack1314| Layer | Technology |15|-------|-----------|16| Frontend | Ember.js 6.9 (Octane) with TypeScript, Glimmer GTS components |17| Build | Vite + Embroider |18| Styling | Tailwind CSS 4 + Bootstrap 5 |19| State | WarpDrive (next-gen Ember Data) |20| Database | Cloud Firestore (NoSQL) |21| Realtime DB | Firebase Realtime Database (status tracking) |22| File Storage | Google Cloud Storage |23| Auth | Firebase Authentication + ember-simple-auth |24| Backend | Google Cloud Functions (Node.js 22, TypeScript) |25| Search | Algolia |26| Payments | Stripe |27| Email | Mailgun |28| Documents | PandaDoc |29| CRM Sync | HubSpot, Salesforce |30| Error Tracking | Sentry |31| Customer Support | Intercom |32| State Machines | XState 5 |33| Charts | Highcharts 12 |34| Maps | Google Maps |35| Deployment | Netlify (frontend), GCP (backend) |36| IaC | Terraform |3738## Directory Structure3940```41A3/42├── app/ # Ember.js frontend application43│ ├── abilities/ (101) # ember-can permission definitions44│ ├── adapters/ (11) # Data source adapters45│ ├── builders/ (2) # API call builders46│ ├── components/ (436) # Glimmer GTS components47│ ├── config/ (5) # App configuration48│ ├── controllers/ (varies) # Controllers (only for query params)49│ ├── handlers/ (2) # Request handlers50│ ├── helpers/ (2) # Template helpers51│ ├── models/ (136) # Ember Data models52│ ├── modifiers/ (1) # DOM modifiers53│ ├── routes/ (333) # Route definitions54│ ├── serializers/ (16) # Data serializers55│ ├── services/ (12) # Application services56│ ├── session-stores/(1) # Auth session storage57│ ├── styles/ (1) # Tailwind CSS entry point58│ ├── templates/ (158) # GTS route templates59│ ├── transforms/ (5) # Attribute transforms60│ └── utils/ (19) # Utility functions61├── functions/ # Google Cloud Functions backend62│ ├── src/63│ │ ├── auth/ # Auth triggers64│ │ ├── database/ # Realtime DB triggers65│ │ ├── firestore/ # Firestore document triggers66│ │ ├── https/ # HTTPS endpoints67│ │ ├── pubsub/ # Pub/Sub triggers68│ │ ├── storage/ # Cloud Storage triggers69│ │ ├── models/ # TypeScript interfaces70│ │ ├── types/ # Type definitions71│ │ └── utils/ # Shared utilities72│ └── lib/ # Compiled output73├── tests/ # Test suites (807 files)74│ ├── acceptance/ # User flow tests75│ ├── integration/ # Component tests76│ └── unit/ # Logic tests77├── translations/ # i18n files78├── types/ # Global TypeScript types79├── algolia/ # Algolia search config80├── terraform/ # Infrastructure as Code81├── emulator-data/ # Firebase emulator snapshots82├── config/ # Ember.js config83├── docs/ # Documentation84└── public/ # Static assets85```8687## Data Flow Architecture8889### Read Flow (Frontend → Firestore)90```91User visits route92 → Route.model() calls store.query() or store.findRecord()93 → WarpDrive Store dispatches to adapter94 → CloudFirestoreAdapter reads from Firestore95 → CloudFirestoreSerializer normalizes response96 → Store caches record97 → GTS template renders via @model98 → Glimmer component displays data99```100101### Write Flow (Frontend → Firestore → Triggers)102```103User submits form104 → Component @action or ember-concurrency task105 → model.save() via WarpDrive Store106 → CloudFirestoreAdapter writes to Firestore107 → Firestore document created/updated108 → Cloud Function trigger fires109 → Side effects: email, Algolia sync, audit trail, webhooks110 → Real-time listener updates frontend Store111 → Component re-renders with updated data112```113114### Third-Party Integration Flow115```116Frontend component → REST adapter (adapter/firebase.ts)117 → Cloud Function HTTPS endpoint118 → Third-party API (Stripe, Mailgun, PandaDoc, etc.)119 → Response → Firestore document update120 → Real-time listener → Frontend update121```122123## Domain Model Map124125### Core Entities126- **Agency** — Insurance agency (primary organizational unit)127- **User** — Platform user (agent, admin, super admin)128- **Client** — Contact/person being insured129- **Carrier** — Insurance carrier company130131### Business Entities132- **Enrollment** — Insurance enrollment record133- **Contract** — Agent-carrier contract134- **Group** — Group insurance plan135- **Quote** — Insurance quote136- **Membership** — Client membership137138### Financial139- **Statement** — Commission statement140- **Transaction** — Financial transaction141142### Communication143- **Activity** — Audit trail / activity log144- **Message** — Internal messaging145- **Ticket** — Support ticket146- **Inquiry** — Lead inquiry147148### Associations149- **Affiliation** — Agent-agency relationship150- **License** — Agent license record151- **Event** — Calendar/marketing event152153### Attachment Patterns154Most entities have associated:155- `*-file` — File attachments (stored in Cloud Storage)156- `*-note` — Text notes157- `activity` — Audit trail entries158159## Route Map160161### Public Routes162| Route | Purpose |163|-------|---------|164| `/login` | User authentication |165| `/register` | New user registration |166| `/reset` | Password reset |167| `/onboarding` | Post-registration setup |168| `/client/:id` | Public client profile |169| `/client-form/:id` | Public client form |170| `/order/:id` | Order page |171| `/session` | Session management |172173### Authenticated Routes (`/a3/...`)174| Route | Purpose |175|-------|---------|176| `/a3` | Dashboard |177| `/a3/clients` | Client (contact) management |178| `/a3/enrollments` | Enrollment management |179| `/a3/groups` | Group management |180| `/a3/agencies` | Agency management |181| `/a3/carriers` | Carrier information |182| `/a3/contracting` | Contract management |183| `/a3/statements` | Commission statements |184| `/a3/settings` | User settings |185| `/a3/tools` | Quote tools |186| `/a3/calendar` | Calendar |187| `/a3/leads` | Lead management |188| `/a3/notifications` | Notifications |189| `/a3/search` | Global search |190| `/a3/support` | Support tickets |191| `/a3/resources` | Resources |192| `/a3/knowledge-hub` | Knowledge base |193| `/a3/marketing-events` | Marketing events |194| `/a3/readiness-report` | Readiness report |195| `/a3/services` | Services (websites) |196197### Admin Routes (`/admin/...`)198| Route | Purpose |199|-------|---------|200| `/admin/accounting` | Financial management |201| `/admin/agencies` | Agency administration |202| `/admin/carriers` | Carrier management |203| `/admin/clients` | Client administration |204| `/admin/contracting` | Contract admin |205| `/admin/enrollments` | Enrollment admin |206| `/admin/enrollment-issues` | Issue tracking |207| `/admin/events` | Event management |208| `/admin/groups` | Group admin |209| `/admin/inquiries` | Lead/inquiry management |210| `/admin/marketing` | Marketing tools |211| `/admin/messages` | Messaging |212| `/admin/notifications` | Notification management |213| `/admin/products` | Product management |214| `/admin/reporting` | Reports |215| `/admin/search` | Admin search |216| `/admin/settings` | System settings |217| `/admin/tickets` | Support ticket admin |218| `/admin/users` | User management |219220## Service Map221222| Service | File | Purpose |223|---------|------|---------|224| `store` | `app/services/store.ts` | WarpDrive data store with custom aggregation methods |225| `session` | `app/services/session.ts` | Firebase Auth + MFA + ember-simple-auth |226| `current-user` | `app/services/current-user.ts` | Loaded user data and permissions |227| `search` | `app/services/search.ts` | Algolia search integration |228| `pdf` | `app/services/pdf.ts` | PDF generation/manipulation |229| `csv` | `app/services/csv.ts` | CSV export |230| `xlsx` | `app/services/xlsx.ts` | Excel export |231| `analytics` | `app/services/analytics.ts` | Event tracking |232| `tour` | `app/services/tour.ts` | Shepherd.js onboarding tour |233| `recent-records` | `app/services/recent-records.ts` | Recently viewed record tracking |234235## Key Configuration Files236237| File | Purpose |238|------|---------|239| `app/config/environment.js` | Firebase config, API endpoints, feature flags |240| `firebase.json` | Firebase project config, emulator settings |241| `firestore.rules` | Firestore security rules (~101KB) |242| `firestore.indexes.json` | Composite indexes (~235KB) |243| `storage.rules` | Cloud Storage security rules |244| `database.rules.json` | Realtime Database rules |245| `ember-cli-build.js` | Build config (Embroider, split routes) |246| `vite.config.mjs` | Vite build config (Tailwind, PWA) |247| `app/router.ts` | Route definitions |248| `tsconfig.json` | TypeScript configuration |249| `netlify.toml` | Netlify deployment config |250251## Development Environment252253- **Frontend dev**: `ember serve` or `vite dev`254- **Backend dev**: Firebase Emulator Suite (auth, firestore, functions, storage, pubsub)255- **Emulator data**: `emulator-data/` contains snapshots for seeding256- **Tests**: `ember test` (runs in browser via testem)257- **Linting**: ESLint, Prettier, Stylelint, ember-template-lint258259## Further Investigation Links260261When you need deeper knowledge about specific areas:262263- **Ember.js**: https://guides.emberjs.com/release/264- **Glimmer Components**: https://guides.emberjs.com/release/components/265- **WarpDrive/Ember Data**: https://api.emberjs.com/ember-data/release266- **Firestore**: https://firebase.google.com/docs/firestore267- **Cloud Functions**: https://firebase.google.com/docs/functions268- **Tailwind CSS**: https://tailwindcss.com/docs269- **ember-cloud-firestore-adapter**: https://github.com/nickersk/ember-cloud-firestore-adapter270- **ember-simple-auth**: https://ember-simple-auth.com/271- **ember-can**: https://github.com/minutebase/ember-can272- **ember-concurrency**: https://ember-concurrency.com/273- **XState**: https://stately.ai/docs