> For the complete documentation index, see [llms.txt](https://cuesoft.gitbook.io/apparule/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cuesoft.gitbook.io/apparule/overview.md).

# Overview

Apparule is a fashion body-measurement platform. Users capture their body measurements from their phone, and the platform turns those into sizing data for a better-fitting shopping experience.

## Architecture

```mermaid
flowchart LR
    subgraph clients
        WEB[web + dashboard<br/>Next.js — App Hosting]
        MOB[Flutter mobile]
    end
    FB[Firebase / Google auth]
    subgraph server["GCP Cloud Run"]
        AC[api/common — Go]
        AM[api/measure — Python, pose]
    end
    subgraph data
        FS[(Firestore)]
        CS[(Cloud Storage)]
        RD[(Aiven Redis)]
    end
    WEB --> FB
    MOB --> FB
    WEB --> AC
    MOB --> AC
    AC --> AM
    AC --> FS
    AC --> CS
    AC --> RD
```

* **`web`** — Next.js marketing site + user dashboard (Firebase App Hosting).
* **`mobile`** — Flutter app (iOS/Android) for capturing measurements.
* **`api/common`** — Go service: authentication and core API (Cloud Run).
* **`api/measure`** — Python service: MediaPipe pose-based body measurement.
* **Auth** — Firebase Authentication / Google sign-in.
* **Data** — Firestore (system of record, X-5) & Cloud Storage; shared Aiven Redis (REDIS\_DB tenancy).

See [setup.md](/apparule/setup.md) to run the stack locally, and the [repository structure](https://github.com/cuesoftinc/apparule#repository-structure) in the README.

## Product & design documentation

> Published site: **<https://cuesoft.gitbook.io/apparule>** (Git-synced from this folder on every merge to main).

* [prd.md](/apparule/product/prd.md) — product requirements breakdown (personas, requirements, compliance, open questions)
* [architecture.md](/apparule/system/architecture.md) — current vs target system design, sequences, SMPL pipeline
* [data-model.md](/apparule/system/data-model.md) — entities, storage mapping, data classification
* [api.md](/apparule/system/api.md) — current + target API surface and gap analysis
* [roadmap.md](/apparule/product/roadmap.md) — phased plan with cross-repo dependencies
* [design.md](/apparule/design/design.md) + [pages.md](/apparule/design/pages.md) — design language, screens, microinteractions
* [order-lifecycle.md](/apparule/system/order-lifecycle.md) — commission order state machine, permissions, notifications
* [decisions.md](/apparule/product/decisions.md) — the open-decision register: ratify to unblock phases
* [deployment.md](/apparule/system/deployment.md) — Cloud Run + App Hosting contract (cuesoft-iac provisioning, CI/CD pattern)
* flows/ — feature flow specs with edge cases: [auth](/apparule/flows/auth.md), [vault](/apparule/flows/vault.md), [request](/apparule/flows/request.md)
* [capture-qc.md](/apparule/system/capture-qc.md) — QC thresholds + measurement-confidence formulas
* [engineering.md](/apparule/system/engineering.md) — error catalog, authz matrix, rate limits, testing strategy, logging rules
* [features.md](/apparule/product/features.md) — granular build backlog (stable unit IDs per phase)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cuesoft.gitbook.io/apparule/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
