
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Devlien is a lightweight, zero-dependency Node.js framework with clean MVC structure, built-in ORM, and intuitive routing for rapid backend development.
Devlien is a minimal and flexible Node.js backend framework designed to work seamlessly with:
It gives you a Laravel-like development experience while staying simple and unopinionated.
npm create devlien@latest devlienApp
This guide will walk you through installing and using Devlien in a Nuxt.js, Nextjs project.
In your Nuxtjs or Nextjs project root, install Devlien:
npm install devlien
Initialize the server environment using:
npx devlien setup
This will automatically create the following structure inside your project:
server
├── app
│ ├── Http
| | ├──Controllers
| | ├──Middleware
| | └──Resources
│ ├── Models
│ └── Providers
├── config
│ ├── app
│ └── database
├── database
│ ├── migrations
│ └── seeds
├── routes
│ ├── web
│ └── api
├── resources
│ └── views
├── .env
.env
FileEdit the generated .env
file and set your database configuration:
APP_NAME="DevLien"
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=root
DB_PASSWORD=secret
✅ You must have a running MySQL/MariaDB database before proceeding.
Devlien includes several command-line tools to help you build faster:
npx devlien make:controller HomeController
This will generate:
server/app/Controllers/HomeController.js
npx devlien make:model User
This will generate:
server/app/Models/User.js
npx devlien make:migration users
This will generate:
server/database/migrations/2025_06_23_XXXXXX_users.js
Edit the file to define your table structure.
npx devlien migrate
npx devlien migrate:rollback --all
This will execute all pending migrations and create tables in your database.
npx devlien make:resource
You’ll be prompted to enter the resource name (e.g., Product
) and Devlien will generate resource for you.
In your migraion: /database/migrations/...users.js
import Migration from "devlien/migration";
export default class extends Migration {
up(schema){
schema.create('users', (table)=>{
table.increments('id');
table.string('name');
table.string('email').unique();
table.string('password');
table.set('status', ['active', 'inactive']).default('active');
});
}
down(schema){
schema.drop('users');
}
}
In your routes/api.js:
import route from "devlien/route";
import Auth from "../app/Http/Middleware/Auth.js";
export default route.serve(route => {
route.group({'prefix':'api', 'middleware':[Auth]}, (route)=>{
route.get('index', 'UserController@index');
route.put('create', 'UserController@create');
route.put('update/:id', 'UserController@update');
})
});
In you controller
import view from "devlien/view";
export default class DevlienController extends Controller {
constructor() {
super();
// Any setup or initialization can go here.
}
async wellcome(request) {
return await view('wellcome', {title:'Wellcome to Devlien'});
}
}
In you template (root/resources/views/wellcome.dl)
<template>
<h1>{{ title }}</h1>
<p>{{ version }}</p>
</template>
@script
const version = "1.0.3";
@endscript
In your controller:
import User from "../../Models/User.js";
// Fetch users
let users = await User.get();
// or
let user = new User();
let users = await user.get();
await User.limit(10).get();
await User.skip(5).limit(10).get();
await User.where({id:1}).where([{id:1}, {id:1}]).where(['id', '=', 1]).get();
await User.where({id:1}).first();
await User.create({
"name" : "Shamim Haque",
"username" : "shmimhaque",
"email" : "shamim.haque.dev@gmail.com"
});
await User.where({id:1}).update({
"name" : "Shamim Haque",
"email" : "shamim.haque.dev@gmail.com"
});
More query methods coming soon...
Shamim Haque
GitHub: @shamimhaque-mpi
📧 Email: shamim.haque.dev@gmail.com
This project is open-source and available under the MIT License.
FAQs
Devlien is a lightweight, zero-dependency Node.js framework with clean MVC structure, built-in ORM, and intuitive routing for rapid backend development.
We found that devlien demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.