CalmAPI Documentation
Production-Ready Modular REST API Framework using NodeJS & MongoDB
š Table of Contents#
- Getting Started - Installation and project setup
- Understanding the Architecture - Core concepts and structure
- Creating Your First Module - Quick start guide to building APIs
- Working with Models - Database schema and validation
- Controllers Made Easy - Request handling and super methods
- Services Layer - Business logic and database operations
- Data Transfer Objects (DTOs) - Input validation and response formatting
- Routing & Configuration - Custom paths and nested routes
- Built-in Modules - Auth, User, Media & Post
- Advanced Techniques - Tips, tricks, and best practices
- Built in Security & Best Practices - Securing your API
- Deployment Guide - From local to production
šÆ What is CalmAPI?#
CalmAPI is a zero-hidden-magic REST API framework that generates production-ready, modular APIs in seconds. Unlike other frameworks that hide complexity in node_modules, CalmAPI puts everything in your project where you can see it, customize it, and own it.
Key Features#
ā
Production Ready - Controller, Model & Service oriented architecture
ā
Lightning Fast - Generate complete CRUD modules with one command
ā
Built-in Auth - JWT authentication with database token store
ā
No Hidden Magic - All code is visible and customizable
ā
Smart Routing - Automatic route generation with nesting support
ā
DTO Support - Clean data validation and transformation
ā
File Uploads - AWS S3 integration out of the box
ā
ESLint Ready - Code quality baked in
ā” Quick Example#
Create a complete CRUD API in seconds:
# Generate a module
calmapi generate module product
# That's it! Your API is ready at:
# GET /api/products
# GET /api/products/:id
# POST /api/products
# PUT /api/products/:id
# DELETE /api/products/:idšļø What Gets Generated?#
Every module includes:
src/modules/product/
āāā product.controller.js # Request handling
āāā product.service.js # Business logic
āāā product.model.js # Database schema
āāā product.route.js # Route definitions
āāā product.dto.js # Data validation
āāā product.settings.js # Module configurationš Who Is This For?#
- Beginners who want to learn backend development with a clear structure
- Teams who need a consistent, maintainable codebase
- Developers who value transparency over "magic"
- Startups who need to move fast without sacrificing quality
š Ready to Build?#
Start with Getting Started to install CalmAPI and create your first project!
š Documentation Philosophy#
This documentation is written for complete beginners. We explain:
- WHY - Why things work the way they do
- HOW - Step-by-step instructions
- WHEN - When to use different features
- EXAMPLES - Real-world code you can copy and modify
Every concept builds on the previous one. Start from page 1 and go in order for the best learning experience.
š¤ Need Help?#
- š Website: https://calmapi.dev
- š¦ GitHub: https://github.com/sunilksamanta/calmapi
- š API Docs: https://docs.calmapi.dev
Let's build something amazing together! š