Skip to main content
Solya is a Next.js application backed by two data stores with distinct roles.

The pieces

Next.js app

App Router + React Server Components. Server actions and /api/ routes hold the business logic.

Operational DB

PostgreSQL (Drizzle ORM) stores app-managed entities: plans, rules, alerts, tags, settings, audit.

Analytics (Databricks)

Gold/silver layers hold cleaned and business-ready retail data for analytics, forecasts, and decisions.

Two data stores, two jobs

  • PostgreSQL (operational) — everything users create in Solya: inventory plans and items, business rules and rulesets, alerts, tags and tagging rules, workflows, settings, navigation templates, and the audit trail. Org-scoped via organizationId.
  • Databricks (analytics) — everything ingested and computed: sales, orders, movements, stock, dimensions, summaries, forecasts, and decision vectors. Populated by the data platform (ETL from POS systems) and read by the app for dashboards, KPIs, search, alerts, and recommendations. See Data model.

Request flow

  1. A user (browser) or an integration (API token) calls a server action or an /api/ route.
  2. The call is authenticated and resolved to an organization (see Authentication & multi-tenancy).
  3. Services run the business logic — reading/writing PostgreSQL and/or querying Databricks — and business rules gate mutations where applicable (see Business rules engine).
  4. Responses use a consistent envelope with stable error codes (see Error codes).

The data platform

Heavy data work — ingestion, tag/alert evaluation, and recommendation/decision computation — runs on the data platform (Databricks). The app triggers these as runs and tracks their status and logs (ingestion runs, alert/tag evaluation runs, workflow runs), so long-running jobs stay observable from the UI and API.