Now available on JSRv0.1.30

Build fullstack apps at monster speed.

The MVC framework that combines Laravel's elegance with HonoJS speed. Native to Deno.

Get Started
MVC
Architecture
TypeScript
First Class
Deno 2.0
Native Support
Hono
Powered

The Complete Arsenal

Lockness provides a complete toolkit with batteries included for rapid development

MVC Architecture

Clear separation of concerns with Models, Views, and Controllers. Inspired by Laravel and AdonisJS.

Dependency Injection

Built-in IoC container for clean, testable code. Just use the @Inject decorator.

Blazing Fast

Built on Hono, one of the fastest web frameworks. Sub-millisecond response times.

Secure by Default

Leverage Deno's security model with explicit permissions. Session, Auth, and CSRF protection built-in.

Drizzle ORM

Type-safe database operations with migrations, seeders, and Drizzle Studio integration.

Powerful CLI

Scaffold controllers, models, middleware, jobs and more with the Cli CLI engine.

Authentication

Complete auth system with sessions, password hashing, and social OAuth providers.

Mail System

Expressive fluent API for sending emails. Supports SMTP, Resend, and more drivers.

Background Jobs

Queue and process long-running tasks in the background with memory or Deno KV drivers.

CLI Productivity

Initialize your project and start building immediately

bash
$ 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:8888
Development
deno task dev
Production Build
deno task build && deno task start
Database Migrations
deno task cli db:migrate
Testing
deno task test

Code Examples

Write elegant code with decorators, dependency injection, and type-safe validation

typescript
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)
    }
}
typescript
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')
    }
}

Ready to Build Something Amazing?

Start building your next project with Lockness JS today