Larascript Framework
Larascript Framework is a personal open-source TypeScript/Node.js web framework inspired by Laravel’s architecture and developer experience, rebuilt for the Node ecosystem. The project started as a way to deepen my TypeScript skills while applying Laravel’s design patterns to a modern JavaScript stack — roughly seven months of independent work across a modular monorepo.
The framework provides a full application platform — routing, ORM, authentication, validation, events, and background workers — with the developer experience Laravel users expect, but with full TypeScript type inference throughout. A documentation site is published at larascriptnode.com, and the source is available on GitHub.
Technologies used
- TypeScript
- Node.js
- Express.js
- PostgreSQL
- MongoDB
- Docker
- pnpm & Turbo (monorepo)
- Jest
- ESLint & Prettier
- Git hooks
Features
Platform
- Kernel and provider bootstrapping
- Dependency injection
- Environment-based configuration
- Modular monorepo architecture
HTTP & routing
- Express.js foundation with an enhanced HTTP layer
- Route groups, prefixes, and named routes
- Controller-based routing with typed HttpContext
- Resourceful routing
- Built-in pagination, filtering, sorting, and fuzzy search on resources
- Resource security
Middleware
- Express middleware support
- Framework middleware with full request/response lifecycle
- Validator middleware attached to routes
Database & ORM
- PostgreSQL and MongoDB support
- Unified query builder across both databases
- Type-safe models with guarded fields, JSON columns, date casting, and timestamps
- Relationships
- Migrations and seeders
- Model observers
- Field encryption on models
- Raw query access when needed
Authentication & authorization
- JWT authentication
- Role- and scope-based access control
- API tokens
- ACL integration
- One-time auth tokens
- Async session context for per-request auth state
Validation
- 20+ built-in rules (Required, Email, Unique, Min, Exists, etc.)
- Custom validators
- Nested field validation via dot notation
- Route-level and inline validation
- Custom error messages
Events & background work
- Event dispatching with listeners and subscribers
- Multiple drivers
- Background workers for queued events
Supporting services
- Storage
- Views
- Console / CLI
- Logging
- Collections
Developer experience
- Full TypeScript with type inference on models and queries
- Jest testing, ESLint, Prettier, and git hooks
- Docker setup for local dev and production API
- Code scaffolding via make package
- Documentation site at larascriptnode.com