Installation
Install Backcraft CLI
Backcraft CLI helps you scaffold backend applications and components using a JSON registry system.
npm install -g backcraft-cli
List of Registry Package
The CLI uses a separate registry to fetch templates. Install the official registry or use your own.
backcraft list
Make sure it's properly linked or available in your CLI environment.
Initialize a Project
To scaffold a full backend app from the registry:
backcraft init --name=blog-mongoose
This will create a complete project based on the selected template.
Add a Component
Once your project is initialized, you can inject additional modules:
backcraft add stripe-payment
This adds modular code (e.g., payment gateway integration) into your existing app.
Generate JSON File For Your Project
Use the built-in integration with auto-api-doc to generate API docs:
backcraft g json
Bonus Tip
Generate Documentation using package:
npm i @sallbro/auto-api-doc
Contribute To Registry
You can also contribute your own registry to the backcraft-registry to expand your ecosystem.
npm i backcraft-registry