Getting Started
Overview
Silgi is a powerful and type-safe TypeScript framework developed for modern microservice architectures. It provides end-to-end type safety and prioritizes developer experience and sustainability. Building scalable, maintainable, and reliable backend services is much easier with Silgi.
Silgi's core components:
- silgi.config.ts: The main file where you manage your project's entire configuration and modules.
- Development Environment: Rapid development with automatic type generation, hot reloading, and a powerful CLI.
- Runtime: The system that runs your type-safe services, handling validation and error management.
- Module Ecosystem: Modules that allow you to easily extend and customize your project.
Silgi comes with smart defaults and is opinionated. You can explore all its capabilities in the Features Guide. For integration with different frameworks or tools, refer to the Modules section, and for project-specific settings, check out the Configuration section.
It also offers a fully type-supported, extensible infrastructure with its Plugin API and Module API.
You can find the philosophy and reasons behind Silgi in the Why Silgi? section.
TypeScript Support
Silgi is built from scratch with TypeScript and offers end-to-end type safety out of the box. It automatically generates TypeScript types based on your service schemas and ensures that input/output types are correctly propagated throughout your application.
TypeScript 5.8+ is recommended for the best experience. Silgi takes full advantage of advanced TypeScript features (template literal types, conditional types, module augmentation).
Try Silgi Online
Coming soon!
Create Your First Silgi Project
Compatibility Note
Silgi requires Node.js 22+ and only works with the ESM module system. CommonJS is not supported.
pnpm create silgi
bun create silgi
npm create silgi@latest
yarn create silgi
Follow the on-screen instructions after running the command!
For all templates and details, you can check the create-silgi page: nuxt
, nitro
, h3
, and more.
You can install in the current directory by providing .
as the project name.
Community Templates
create-silgi provides basic templates for popular use cases to get you started quickly. You can also explore community templates that include different frameworks and tools.
If you find a template at https://github.com/user/project
, you can try it online at https://github.stackblitz.com/user/project
(add .stackblitz
after github
in the URL).
Alternatively, you can quickly clone a template with degit:
npx degit user/project#main my-project
cd my-project
npm install
npm run dev
Manual Installation
To add Silgi to an existing project:
- Install the Silgi package:
pnpm add silgi
bun add silgi
npm install silgi
yarn add silgi
- Run the Silgi init command to initialize your project:
pnpm silgi init
bun silgi init
npm silgi init
yarn silgi init
A basic project structure will then be created, and you can start developing.