MMetiss AI|Docs

Orion Portal

Orion is Metiss AI's field service portal. It gives installation teams, dispatchers, and administrators a single place to manage jobs from creation through completion, with AI-generated insights surfaced alongside each job.

What Orion does

When a lead qualifies and a solar installation is confirmed, the work moves into Orion. Field teams use Orion to track every job through its lifecycle โ€” from initial scheduling to on-site execution and invoicing. Administrators manage the user directory, subcontractors, and reports from the same interface.

๐Ÿ“‹

Job Management

Create, view, edit, and track jobs across active, on-hold, and cancelled states. Filterable tables with search, sorting, and pagination.
๐Ÿค–

AI Job Insights

Each job surfaces AI-generated insights via the integrated FastAPI service โ€” helping field leads prioritise work and identify patterns.
๐Ÿ‘ฅ

User & Subcontractor Management

Admin users can manage the team directory, create new users, and manage subcontractor relationships from a dedicated admin section.
๐Ÿงพ

Invoices

View and manage invoices associated with completed jobs. Invoice detail pages show full job and billing context.
๐Ÿ“Š

Reports

Aggregated reporting across job activity. Active jobs can be exported as CSV for offline analysis.
๐Ÿ”’

Role-based Access

Admin and standard user roles control access to sensitive sections. All routes are protected behind session-based authentication.

Navigation

RoutePurpose
/jobs/activeAll currently active jobs โ€” the primary working view for field teams.
/jobs/my-jobsJobs assigned to the logged-in user.
/jobs/holdJobs paused pending further action.
/jobs/cancelledCancelled jobs retained for audit history.
/jobs/createCreate a new job record.
/jobs/[id]Job detail page including AI insights.
/invoicesInvoice list and detail views.
/reportsAggregated job reports and CSV export.
/users AdminUser directory โ€” create, view, and edit team members.
/subcontractor-management AdminManage subcontractor organisations and their access.
/accountPersonal profile and password management.

Architecture

Orion is a Turborepo monorepo with three runtimes and four shared packages:

LayerTechnologyRole
FrontendNext.js 16 App RouterAuthenticated web shell. All backend calls are proxied through Next.js route handlers โ€” the browser never calls the backend directly.
BFFEncoreTSBackend-for-frontend handling auth, jobs, users, invoices, CSV export. Follows strict api โ†’ service โ†’ repository layering.
AI ServiceFastAPI (Python)Serves the /jobs/insights endpoint. Called from the BFF, never directly from the browser.
DatabasePostgreSQL (Cloud SQL)Primary data store for users, jobs, sessions, and event logs. Managed with Prisma for schema; runtime queries use the pg client directly.
EventsGCP Pub/SubDomain mutations publish audit events. Local dev uses an in-process event log; production uses Pub/Sub.

Authentication

Orion uses HTTP-only cookie sessions. On login, the BFF issues a session token stored in a secure cookie. All authenticated routes check the session before rendering. There is no third-party identity provider โ€” credentials are managed within the platform.

Password reset is supported via /forgot-password and /reset-password flows. Tokens are delivered by email and expire after a fixed window.

Deployment

Orion is deployed to GCP Cloud Run with Cloud SQL for PostgreSQL. The CI/CD pipeline uses GitHub Actions with Workload Identity Federation โ€” no long-lived service account keys are stored in GitHub secrets.

ServiceGCP resource
Frontend + BFFCloud Run (Node.js container, EncoreTS compiled)
AI ServiceCloud Run (Python container)
DatabaseCloud SQL for PostgreSQL 16
Audit eventsGCP Pub/Sub topic, consumed by audit-event-consumer-job
Local development: Run npm run local:start from the repo root to start all three services plus a local PostgreSQL container in one command.