lightts
v1.1.6
Published
A lightweight, native Node.js framework with typescript, designed to keep things simple, transparent, and customizable
Downloads
4
Maintainers
Readme
LightTs
LightTs is a lightweight, native Node.js framework inspired by NestJS, designed for simplicity, transparency, and customization. Using Express and standard Node.js libraries, it provides a CLI tool (lightts or lts) to streamline project setup and feature integration, generating clean, editable code without complex abstractions.
Why LightTs?
LightTs offers the structure of a modern framework with the feel of raw Node.js. It generates straightforward, customizable code (e.g., auth.ts for JWT using jsonwebtoken) that you can easily modify, avoiding heavy reliance on decorators or rigid patterns.
Features
- CLI Tool: Initialize projects and generate components (controllers, services, validators, resources).
- Native Node.js: Built on Express with standard libraries for transparency.
- File Naming: Choose Angular-style (
auth.service.ts) or regular (auth.ts). - Response & Error Classes: Simplify API responses and error handling.
- Feature Integration: Add JWT, CORS, validation, or TypeORM with one command.
- Code Quality: Optional ESLint, Prettier, and Husky setup.
- Database Support: TypeORM with PostgreSQL, MySQL, MariaDB, or MongoDB, including migrations and seeders.
Installation
Install globally:
npm install -g lighttsOr use with npx:
npx lighttsRun with lightts or lts:
lts initUsage
Initialize a Project
lts initPrompts for project name, file naming style, features (JWT, CORS, etc.), database options, code quality tools, and package manager.
Generate Components
lts generate controller user
lts g service auth
lts g validate user
lts g resource productAdd Features
lts add jwt
lts a databaseDocumentation
For detailed guides, examples, and API references, visit lightts.dev.
Contributing
Contributions are welcome! Fork the repo, create a branch, and submit a pull request. Follow coding conventions and add tests where applicable.
License
MIT License. See LICENSE for details.
