Reshma‑Core Documentation
The complete guide to developing, deploying, and integrating with the Reshma‑Core backend engine.
📖 Table of Contents
- Welcome
- Getting Started
- API Reference
- Deployment Guide
- Architecture Deep Dives
- Testing & Runbooks
- Contributing to Docs
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.
| Document | Description |
|---|---|
| Local Development Setup | Manual installation (Node, MongoDB, Redis, Typesense) |
| Docker Setup | Run the entire stack with Docker Compose |
| Environment Variables Guide | All required and optional .env variables |
| Database Seeding | Generate realistic product data |
API Reference
Complete REST API documentation for frontend developers.
| Section | Description |
|---|---|
| API Overview | Base URLs, response shapes, pagination, rate limits |
| Authentication | Two‑token JWT flow, refresh, logout |
| Error Handling | HTTP status codes, error payloads |
| Rate Limiting | Global and route‑specific limits |
Module Endpoints
| Module | Description |
|---|---|
| Auth | Register, login, OTP, refresh, logout |
| Users | Profile, addresses, avatar, password, deletion |
| Products | Polymorphic catalog (public + admin CRUD) |
| Cart | Cart operations, merge, coupons |
| Orders | Checkout, payment, invoices, dispatch |
| Returns | Return requests, admin arbitration, refunds |
| Interactions | Reviews, comments, voting |
| Coupons | Create, apply, remove promotions |
| Wishlist | Add, move to cart, self‑healing |
| Search | Typo‑tolerant, faceted search |
| Dashboard | Admin metrics (revenue, top products) |
| Support | Tickets, replies, state machine |
| Notifications | In‑app alerts |
| Health | Liveness probe |
Deployment Guide
Take the application to production.
| Document | Description |
|---|---|
| Production Checklist | Pre‑flight verification (secrets, SSL, monitoring) |
| Docker Compose (Production) | Running docker-compose.prod.yml |
| CI/CD Automation | GitHub Actions, SSH deployment |
Architecture Deep Dives
Understand the “why” behind the code.
| Document | Description |
|---|---|
| System Overview | High‑level architecture, module boundaries |
| Authentication Architecture | Two‑token JWT, OTP, Redis blacklist |
| Database Design & Polymorphism | Mongoose discriminators, indexes |
| Product Catalog Schema | Polymorphic product types |
| Security Hardening | CWE mitigations, Zod firewalls, rate limiting |
| Payment Integration (Razorpay) | HMAC webhooks, idempotency |
| Legal & Tax Compliance (GST) | CGST/SGST/IGST calculations |
| Edge Cache | |
| Background Jobs & Cron | BullMQ queues |
| DevOps & Infrastructure | Horizontal scaling, health checks |
Testing & Runbooks
Manual test sequences for each module (Thunder Client / Postman).
Located in ./api/thunder-tests/.
| Runbook | Module |
|---|---|
| Auth Runbook | Registration, OTP, login, refresh, logout |
| User Runbook | Profile, addresses, password change |
| Product Runbook | Admin CRUD, polymorphic validation |
| Cart Runbook | Add, merge, coupons |
| Order Runbook | Checkout, webhooks, dispatch |
| Return Runbook | Initiate, arbitrate, refund |
| Interaction Runbook | Reviews, comments, voting |
| Coupon Runbook | Create, apply |
| Wishlist Runbook | Add, move, clear |
| Search Runbook | Typo tolerance, faceting |
| Dashboard Runbook | Metrics, date ranges |
| Support Runbook | Tickets, 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