laju Svelte Themes

Laju

Laju (Indonesian for 'fast/swift') is a high-performance TypeScript web framework combining HyperExpress, Svelte 5, and Inertia.js for building modern full-stack applications. Features server-side rendering, real-time capabilities, and seamless client-server state management.

Laju

⚔ High-performance TypeScript web framework - 11x faster than Express.js

Build modern full-stack applications with HyperExpress, Svelte 5, and Inertia.js.

šŸš€ Quick Start

# Create new project
npx create-laju-app my-project
cd my-project

# Setup database
npm run migrate

# Start development
npm run dev

Visit http://localhost:5555

Want AI to build everything? Use multi-agent workflow with mandatory review points:

@workflow/agents/product.md  Saya mau bikin aplikasi [deskripsikan]

Agents: product.md → tech-lead.md → developer.md → qa.md → devops.md

✨ Features

Performance First

  • 258,611 req/sec - HyperExpress server (11x faster than Express)
  • 19.9x faster writes - SQLite with WAL mode
  • Zero-config caching - Database cache included (optional Redis)

Modern Stack

  • Svelte 5 - Reactive UI with runes
  • Inertia.js - SPA without client-side routing
  • TailwindCSS 4 - Utility-first CSS with Vite
  • TypeScript 6.0 - Full type safety

Built-in Services

  • Authentication - Sessions, OAuth (Google), password reset
  • Storage - S3/Wasabi with presigned URLs
  • Email - Nodemailer (SMTP) or Resend (API)
  • Caching - Database cache or Redis
  • Templates - Eta for SSR

AI Development

  • Product Agent - Define requirements, PRD, user stories
  • Tech Lead Agent - Design system architecture, database schema
  • Developer Agent - Implement features with mandatory review
  • QA Agent - Test and review before deploy
  • DevOps Agent - Deploy to production

šŸ“Š Performance

Framework Requests/sec Comparison
Laju 258,611 Baseline
Pure Node.js 124,024 2x slower
Express.js 22,590 11x slower
Laravel 80 3,232x slower

Benchmark: Simple JSON response on same hardware

šŸ“š Documentation

Complete Documentation →

Documentation is organized for progressive learning from beginner to advanced.

Quick Start

Core Features

Advanced Features

Production Ready

Advanced Topics

Project Structure

app/
ā”œā”€ā”€ handlers/        # Request handlers (domain-based)
ā”œā”€ā”€ middlewares/     # Auth, rate limiting, CSRF
ā”œā”€ā”€ services/        # DB, Mailer, Storage, Cache
ā”œā”€ā”€ repositories/    # Database query layer
└── validators/      # Input validation

frontend/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ Pages/       # Svelte/Inertia pages
│   ā”œā”€ā”€ Components/  # Reusable components
│   ā”œā”€ā”€ app.js       # Main entry point
│   ā”œā”€ā”€ index.js     # Secondary entry point
│   └── index.css    # TailwindCSS

templates/           # Eta templates (SSR)
ā”œā”€ā”€ index.html       # Landing page template
ā”œā”€ā”€ inertia.html     # Inertia.js base template
└── partials/        # Template partials

routes/              # Route definitions
migrations/          # Database migrations
commands/            # CLI commands
tests/               # Unit & integration tests
docs/                # Documentation
benchmark/           # Performance benchmarks
public/              # Static assets
storage/             # Local storage
data/                # SQLite databases
type/                # TypeScript definitions

Commands

# Development
npm run dev                              # Start dev server (Vite + Nodemon)

# Production
npm run build                            # Build for production
node build/server.js                     # Run production server

# Database
npm run migrate                          # Run all migrations
npm run migrate:down                     # Rollback last migration
npm run migrate:down 3                   # Rollback 3 migrations
npm run migrate:down 20230514062913      # Rollback to specific migration
npm run migrate:rollback                 # Rollback to last batch
npm run refresh                          # Drop and re-migrate database

# Testing
npm run test:run                         # Run unit/integration tests (Vitest)
npm run test:ui                          # Run tests with UI
npm run test:coverage                    # Run tests with coverage
npm run test:e2e                         # Run E2E tests (Playwright)
npm run test:e2e:ui                      # Run E2E tests with UI
npm run test:e2e:debug                   # Run E2E tests in debug mode

# Code Generation
npx tsx commands/native/MakeController.ts UserController    # Generate controller
npx tsx commands/native/MakeCommand.ts CustomCommand        # Generate command
npx tsx commands/native/MakeHandler.ts UserHandler          # Generate handler
npx tsx commands/native/MakeMiddleware.ts AuthMiddleware    # Generate middleware
npx tsx commands/native/MakeRepository.ts UserRepository    # Generate repository
npx tsx commands/native/MakeValidator.ts AuthValidator      # Generate validator

Tech Stack

Layer Technology
Server HyperExpress v6.17
Database BetterSQLite3 + Kysely
Frontend Svelte 5 + Inertia.js
Styling TailwindCSS 4
Build Vite
Templates Eta
Language TypeScript 6.0

Author

Maulana Shalihin - [email protected]

Support

License

MIT License

Top categories

Loading Svelte Themes