
Lineadecor API
Backend API Powering the Lineadecor Render Portal
Overview
Lineadecor API is the brand-facing backend of the Lunaar ecosystem, structured as a modular monolith so that reusable AI tool modules can be composed into per-brand API hosts. A shared core provides auth, a credit system, storage, email and outbox messaging, while each AI capability lives in its own module and each brand is its own deployable host - the LineaDecor kitchen-render API being the first host built on the pattern.
What It Does
It powers the Lineadecor dealer portal: a dealer uploads a kitchen sketch with structured design options (cabinet finishes, countertop, floor, handle finish, LED and ambient lighting, accessories), the API deducts a credit and returns 202 Accepted, and a background worker builds a config-driven prompt, calls the AI image model, stores the render and thumbnail to S3, and streams progress back to the client. It also handles free async upscaling, role-scoped galleries, defective-output flagging and per-branch credit reporting.
Tech Stack
Key Features
Modular-monolith architecture: reusable AI tool modules composed into per-brand API hosts, each with its own derived DbContext and deployable
Runtime module composition via ASP.NET ApplicationParts, so a module ships its own controllers and EF configurations and is registered without touching the host
Sketch-to-render tool with ~30 config-driven kitchen prompt templates spanning cabinet, countertop, floor, handle, lighting and accessory options
Live render and upscale progress over Server-Sent Events, backed by Redis pub/sub with keepalive pings and terminal-state short-circuiting
Per-branch credit system with atomic deduct/refund, credit history ledger, monthly limits and ClosedXML (Excel) usage reports - no external payment gateway
Automatic credit refund on any generation failure, plus a reconciliation worker that recovers missed refunds
Role-based access (Admin/Manager/User) scoping galleries to own/branch/all, with defective-output flag, unflag and soft-delete trash workflows
Free asynchronous 2x image upscaling on its own queue and worker
Hardened error handling that stores raw provider errors server-side and returns only mapped, safe error categories to clients
Technical Highlights
Key Achievements
Designed a modular-monolith platform where new AI tools and new brand APIs are added as plug-in modules rather than forked codebases
Delivered at-least-once, idempotent AI job processing through the outbox pattern, distributed locks and stuck-operation recovery
Built a self-healing credit ledger where failures auto-refund and a recovery worker reconciles anything missed
Shipped a full B2B operations layer - role-scoped access, content flagging/moderation and per-branch Excel credit reporting - on top of the shared core
Impact & Results
Backend architecture built at Group Taiga so the Lunaar AI engine can be resold to multiple brands with minimal per-brand work: a new brand is a thin host and a module reference, reusing shared auth, credits, storage and messaging. The Lineadecor kitchen-render API is the first product running on the pattern, with production-grade reliability and moderation built in.