Gathering detailed insights and metrics for flenco-node-backend-cli
Gathering detailed insights and metrics for flenco-node-backend-cli
Gathering detailed insights and metrics for flenco-node-backend-cli
Gathering detailed insights and metrics for flenco-node-backend-cli
npm install flenco-node-backend-cli
Typescript
Module System
Node Version
NPM Version
TypeScript (70.56%)
JavaScript (29.44%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
2 Stars
28 Commits
2 Watchers
1 Branches
1 Contributors
Updated on Mar 23, 2025
Latest Version
0.1.11
Package Id
flenco-node-backend-cli@0.1.11
Unpacked Size
161.80 kB
Size
35.44 kB
File Count
70
NPM Version
10.8.3
Node Version
20.12.0
Published on
Mar 23, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A powerful CLI tool to generate a production-ready Node.js backend boilerplate with Express, TypeScript, and Prisma. It automatically creates CRUD operations with validation, authentication, and file upload capabilities based on your existing database schema.
1npm install -g flenco-node-backend-cli
1# Create a new directory for your project 2mkdir my-backend 3cd my-backend 4 5# Initialize the project 6flenco-init
During initialization, you'll be prompted for:
1flenco-generate
This will:
1flenco-refresh
If you've made changes to your database schema, use this command to update your existing API endpoints while preserving your customizations.
├── src/
│ ├── routes/ # API routes
│ ├── controllers/ # Request handlers
│ ├── services/ # Business logic
│ ├── middleware/ # Custom middleware
│ ├── validation/ # Request validation
│ ├── utils/ # Utility functions
│ └── templates/ # Email templates
├── prisma/ # Prisma schema and migrations
├── uploads/ # File uploads directory
└── .env # Environment variables
1npm run dev # Start development server 2npm run build # Build for production 3npm start # Start production server
For each table, the following endpoints are created:
GET /api/{table} # Get all records (with pagination)
GET /api/{table}/:id # Get single record
POST /api/{table} # Create new record
PATCH /api/{table}/:id # Update record
DELETE /api/{table}/:id # Delete record
The system also provides these utility endpoints:
GET /api/metadata # Get API documentation and schema information
Each time you initialize a project or generate/refresh APIs, a Postman collection is automatically generated with:
You can import this collection directly into Postman to quickly test your API.
page
: Page number (default: 1)limit
: Items per page (default: 10)sortBy
: Sort fieldsortOrder
: 'asc' or 'desc'search
: Search termstatus
: Filter by statusThe generated .env
file includes:
1# Database 2DATABASE_URL=your_database_url 3PORT=3000 4 5# JWT 6JWT_SECRET=your-secret-key 7JWT_EXPIRES_IN=1d 8 9# Email (if needed) 10SMTP_HOST=smtp.example.com 11SMTP_PORT=587 12SMTP_USER=your-email 13SMTP_PASS=your-password 14 15# File Upload 16MAX_FILE_SIZE=5242880 17ALLOWED_FILE_TYPES=image/jpeg,image/png,image/gif
When enabled, protect routes using the JWT middleware:
1router.use(auth());
Request validation is handled using Zod:
1router.post('/', validate(createSchema), controller.create);
The generated project includes global error handling for:
flenco-init
: Initialize a new projectflenco-generate
: Generate APIs for a tableflenco-refresh
: Refresh APIs for tables that have changed in the databaseflenco-help
: Show available commandsWhen your database schema changes, you can update your existing APIs with:
1flenco-refresh
This will:
This is particularly useful during development when your database schema evolves. The command ensures your APIs stay in sync with your database structure without having to manually recreate them.
Contributions are welcome! Please feel free to submit a Pull Request.
If you find a bug or want to request a new feature, please create an issue at GitHub Issues.
Atish Paul
MIT
For support, email support@flenco.in or raise an issue on GitHub.
No vulnerabilities found.
No security vulnerabilities found.