@aksparadise/aks-backend
v1.0.3
Published
Premium interactive scaffolding CLI to instantly spin up modern, secure, and production-ready Express.js backends with JWT/PASETO, MongoDB/PostgreSQL, and built-in OpenTelemetry observability.
Maintainers
Readme
💇♂️ @aksparadise/aks-backend
A state-of-the-art, premium, interactive CLI generator to instantly scaffold enterprise-grade, highly observable, and minimalist Express.js backends. Built on the Ponytail Minimalism (YAGNI) philosophy.
✨ Features
- 🎯 Interactive Scaffolding: Spin up new backend microservices interactively in seconds. Select database providers, authentication tokens, language types, and docker setups in real-time.
- 🔐 State-of-the-Art Auth Choice: Choose between standard JWT or next-generation PASETO (Platform-Agnostic Security Tokens) for iron-clad, secure-by-default tokenization.
- 🚀 Dynamic Modules & Route Autoloading: No manual route import lists or index routing clutter. Any
.route.jsor.route.tsfile insidesrc/modules/is automatically detected and registered dynamically at start! - ✈ Built-in Resource Generator (NeatNode Style!): Run
npm run generatewithin any scaffolded project to instantly spin up new routes, controllers, and schemas in seconds. - 📊 Auto-Instrumented Observability: Pre-integrated with @aksparadise/otel-observability out of the box. Delivers full automatic distributed tracing, log forwarding, and metric exports to your SigNoz or Grafana Collector.
- 🛡️ Premium Guardrails: Ready-configured security headers (
helmet), API rate-limiters, compression, and request loggers (pino,morgan). - 🤖 Environment Validation: Zod-validated environment configurations (
.env) checked dynamically on startup.
🏃♂️ Instantly Create a Backend
To scaffold a premium backend, simply run the following command in your terminal:
npm create @aksparadise/aks-backendOr run via npx directly:
npx @aksparadise/aks-backend📂 Scaffolded Project Architecture
The CLI generates a clean, modular structure following top-tier production architecture guidelines:
aks-backend-app/
├── bin/
│ └── aks-gen.js # Integrated component and CRUD generator
├── src/
│ ├── app.js # Express application layer & Dynamic Router
│ ├── server.js # Entrypoint with OpenTelemetry hook
│ ├── config/
│ │ ├── env.js # Zod validated Env setup
│ │ └── logger.js # Pino structured logger
│ ├── database/
│ │ └── db.js # DB client setup (Mongoose / Prisma)
│ ├── middlewares/
│ │ ├── auth.middleware.js
│ │ ├── errorHandler.middleware.js
│ │ └── security.middleware.js
│ ├── models/
│ │ └── user.model.js
│ ├── modules/
│ │ └── auth/ # Auth Controller, Route, and validations
│ └── utils/
│ ├── asyncHandler.js
│ └── token.js # JWT or PASETO implementation
├── Dockerfile
├── docker-compose.yml
└── QUICKSTART.md🏗️ Generating Custom Modules
Once your project is scaffolded, navigate into the project and run:
npm run generateThe CLI will prompt you for a resource name (e.g., product) and automatically scaffold:
src/modules/product/product.controller.jssrc/modules/product/product.route.js
On the next server start, the router autoloader will automatically register /api/product!
👤 Author
Created with care by AksParadise. Built for developers who value performance, simplicity, and premium architecture.
