@tselven/api-craft
v1.3.0
Published
A Framework for build APIs using Express + Mongoose
Maintainers
Readme
⚒️ API CRAFT
API CRAFT is a minimal, modular, and scalable backend boilerplate/framework built using Express.js and Mongoose. It empowers developers to rapidly scaffold and scale RESTful APIs using a clean architecture, CLI initializer, and YAML-powered Swagger docs.
🧰 Quick Start
Initialize your project with the API CRAFT CLI:
npx create-api-craft [your_project_name]Or manually clone and start:
git clone https://github.com/api-craft/create-api-craft
cd [your_project_name]
npm install
npm run dev🚀 Features
- ⚡ Express.js based HTTP server
- 🌿 Mongoose for MongoDB ODM
- 📁 MVC architecture for clean code organization
- ⚙️ Environment-based
.envconfig support - 🔒 Built-in CORS configuration
- 📄 Swagger UI documentation using YAML (
swagger.yaml) - 🧪 Jest for unit and feature testing
- 🔌 Modular folder structure for controllers, routes, models, and services
- 🧰 CLI to scaffold new API projects
🧪 Run the Project
npm install
npm run devServer starts at http://localhost:3000
📘 API Documentation
Swagger UI is available at:
http://localhost:3000/api-docsIt loads the documentation from your swagger.yaml file.
✅ Running Tests
API CRAFT uses Jest for testing.
npm run testAdd your test files inside the tests/ directory.
🙌 Contributing
Contributions are welcome! Feel free to open issues or submit pull requests to improve the framework.
📄 License
MIT © P.Thamilselven
🧰 CLI Tool Repo
GitHub Repository:
https://github.com/api-craft/create-api-craft
