# ROSIA V3

> Enterprise sales and distribution backend with Apollo GraphQL, streamed reporting, and asynchronous integrations.

Author: Nirdesh Pokharel

Canonical URL: https://nirdeshpokhrel.com.np/work/rosia-v3

## Architecture

GraphQL / JWT → Permission-scoped resolvers → Sales and inventory data; streamed exports + Kafka / Firebase / scheduled jobs

## Product scope

ROSIA V3 brings inventory, distributors, route planning, targets, and approvals into modular Apollo GraphQL services. The backend work covers operational queries and reporting over sales, stock, and financial datasets.

## Reporting implementation

CSV/XLS exports stream report data instead of loading the entire dataset into application memory. This is a concrete memory-management choice for large reports. The resume does not supply a measured row limit, peak-memory figure, or export duration, so none is claimed here.

## Authorization and time

Resolvers are permission-scoped and timezone-aware, with JWT authentication and WebSocket subscriptions. Scoping matters because an authenticated identity still needs access rules for the requested resource; timezone handling matters when operational reports cross date boundaries.

## Background processing

Kafka, Firebase, and scheduled jobs are integrated in a clustered multi-worker production deployment. The available implementation summary establishes those components, but does not specify worker election, job deduplication, retry settings, or event ordering guarantees.

## Tradeoffs and validation priorities

Streaming makes report generation less dependent on the size of an in-memory result set, while introducing stream cancellation and error-handling concerns. Review priorities include interrupted downloads, permission filters on exports, date-boundary behavior, and overlapping scheduled work across workers.

## Ownership and evidence

The recorded ownership is the modular GraphQL services, streamed exports, scoped resolvers, subscriptions, and integrations. These are implementation notes from professional experience; private deployment diagrams and operational metrics are not published.
