Skip to main content

Reshma‑Core Documentation

The complete guide to developing, deploying, and integrating with the Reshma‑Core backend engine.

Docs API Deployment Architecture


📖 Table of Contents


Welcome

This documentation covers everything you need to know about the Reshma‑Core backend – from setting up a local development environment to deploying in production, integrating with frontend applications, and understanding the architectural decisions that make the platform scalable, secure, and maintainable.

Quick links:


Getting Started

New to the project? Start here.

DocumentDescription
Local Development SetupManual installation (Node, MongoDB, Redis, Typesense)
Docker SetupRun the entire stack with Docker Compose
Environment Variables GuideAll required and optional .env variables
Database SeedingGenerate realistic product data

API Reference

Complete REST API documentation for frontend developers.

SectionDescription
API OverviewBase URLs, response shapes, pagination, rate limits
AuthenticationTwo‑token JWT flow, refresh, logout
Error HandlingHTTP status codes, error payloads
Rate LimitingGlobal and route‑specific limits

Module Endpoints

ModuleDescription
AuthRegister, login, OTP, refresh, logout
UsersProfile, addresses, avatar, password, deletion
ProductsPolymorphic catalog (public + admin CRUD)
CartCart operations, merge, coupons
OrdersCheckout, payment, invoices, dispatch
ReturnsReturn requests, admin arbitration, refunds
InteractionsReviews, comments, voting
CouponsCreate, apply, remove promotions
WishlistAdd, move to cart, self‑healing
SearchTypo‑tolerant, faceted search
DashboardAdmin metrics (revenue, top products)
SupportTickets, replies, state machine
NotificationsIn‑app alerts
HealthLiveness probe

Deployment Guide

Take the application to production.

DocumentDescription
Production ChecklistPre‑flight verification (secrets, SSL, monitoring)
Docker Compose (Production)Running docker-compose.prod.yml
CI/CD AutomationGitHub Actions, SSH deployment

Architecture Deep Dives

Understand the “why” behind the code.

DocumentDescription
System OverviewHigh‑level architecture, module boundaries
Authentication ArchitectureTwo‑token JWT, OTP, Redis blacklist
Database Design & PolymorphismMongoose discriminators, indexes
Product Catalog SchemaPolymorphic product types
Security HardeningCWE mitigations, Zod firewalls, rate limiting
Payment Integration (Razorpay)HMAC webhooks, idempotency
Legal & Tax Compliance (GST)CGST/SGST/IGST calculations
Edge Cache
Background Jobs & CronBullMQ queues
DevOps & InfrastructureHorizontal scaling, health checks

Testing & Runbooks

Manual test sequences for each module (Thunder Client / Postman).
Located in ./api/thunder-tests/.

RunbookModule
Auth RunbookRegistration, OTP, login, refresh, logout
User RunbookProfile, addresses, password change
Product RunbookAdmin CRUD, polymorphic validation
Cart RunbookAdd, merge, coupons
Order RunbookCheckout, webhooks, dispatch
Return RunbookInitiate, arbitrate, refund
Interaction RunbookReviews, comments, voting
Coupon RunbookCreate, apply
Wishlist RunbookAdd, move, clear
Search RunbookTypo tolerance, faceting
Dashboard RunbookMetrics, date ranges
Support RunbookTickets, replies, state changes

Contributing to Docs

Found a mistake or missing section? Please open an issue or pull request.
Documentation is written in Markdown with Mermaid diagrams. The source is in /docs/ at the repository root.

Style guide: Use descriptive headers, tables for endpoint details, and code blocks for JSON examples. Badges are optional but encouraged for visual grouping.


Built with ❤️ and strict TypeScript – Reshma‑Core Team