The MVC framework that combines Laravel's elegance with HonoJS speed. Native to Deno.
Lockness provides a complete toolkit with batteries included for rapid development
Clear separation of concerns with Models, Views, and Controllers. Inspired by Laravel and AdonisJS.
Built-in IoC container for clean, testable code. Just use the @Inject decorator.
Built on Hono, one of the fastest web frameworks. Sub-millisecond response times.
Leverage Deno's security model with explicit permissions. Session, Auth, and CSRF protection built-in.
Type-safe database operations with migrations, seeders, and Drizzle Studio integration.
Scaffold controllers, models, middleware, jobs and more with the Cli CLI engine.
Complete auth system with sessions, password hashing, and social OAuth providers.
Expressive fluent API for sending emails. Supports SMTP, Resend, and more drivers.
Queue and process long-running tasks in the background with memory or Deno KV drivers.
Initialize your project and start building immediately
$ deno run -Ar jsr:@lockness/init
✨ Creating new Lockness project...
$ deno task cli make:controller User
✅ Controller created at ./app/controller/user_controller.ts
$ deno task cli make:model Post -a
✅ Model created at ./app/model/post.ts
✅ Repository created at ./app/repository/post_repository.ts
✅ Seeder created at ./app/seeder/post_seeder.ts
✅ Controller created at ./app/controller/post_controller.ts
$ deno task dev
🚀 Server is flying at http://localhost:8888deno task devdeno task build && deno task startdeno task cli db:migratedeno task testWrite elegant code with decorators, dependency injection, and type-safe validation
import { Controller, Get, Post, Validate } from '@lockness/core'
import { UserService } from '@service/user_service.ts'
import { insertUserSchema } from '@model/user.ts'
@Controller('/api/users')
export class UserController {
constructor(private userService: UserService) {}
@Get('/')
async index(c: Context) {
const users = await this.userService.findAll()
return c.json({ users })
}
@Post('/')
@Validate('json', insertUserSchema)
async store(c: Context) {
const data = c.req.valid('json')
const user = await this.userService.create(data)
return c.json({ user }, 201)
}
}import { Controller, Get, Post, Auth, Guest } from '@lockness/core'
import { auth, session } from '@lockness/core'
@Controller('/auth')
export class AuthController {
@Guest('/dashboard')
@Get('/login')
showLogin(c: Context) {
return c.render(<LoginPage />)
}
@Post('/login')
async login(c: Context) {
const { email, password } = await c.req.parseBody()
if (await auth(c).attempt(email, password)) {
return c.redirect('/dashboard')
}
session(c).flash('error', 'Invalid credentials')
return c.redirect('/auth/login')
}
@Auth()
@Post('/logout')
async logout(c: Context) {
await auth(c).logout()
return c.redirect('/auth/login')
}
}Start building your next project with Lockness JS today