Lineadecor API
.NET 10

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

.NET 10C#Entity Framework CoreSQL ServerRedisRabbitMQAWS S3AI Image GenerationDocker

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

.NET 10 / ASP.NET Core with EF Core on SQL Server (retry-on-failure), global soft-delete filters and automatic audit stamping
Transactional outbox with a fast-path direct publish and DB fallback, drained by a background processor under a Redis distributed lock with exponential backoff
RabbitMQ (async v7 client, self-healing connections) with concurrent, distributed-lock-guarded workers and graceful drain on shutdown
Redis used for distributed locking, SSE pub/sub and DataProtection key persistence
AI image generation over a streamed (SSE) image-edit API and a separate URL-based upscaler consumed via its own task stream
AWS S3 storage behind an IStorageService abstraction with logical folders and optional presigned URLs; ImageSharp for thumbnails
Stuck-operation recovery workers, JWT auth with refresh tokens and branches, FluentValidation, and Scalar/Swagger API docs
Dockerized brand host with docker-compose (Redis, RabbitMQ) and GitLab CI

Key Achievements

01

Designed a modular-monolith platform where new AI tools and new brand APIs are added as plug-in modules rather than forked codebases

02

Delivered at-least-once, idempotent AI job processing through the outbox pattern, distributed locks and stuck-operation recovery

03

Built a self-healing credit ledger where failures auto-refund and a recovery worker reconciles anything missed

04

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.