Production-grade TypeScript backend framework with a “minimal core” (no Express/Fastify) and a batteries-included CLI + developer experience. Visit zintrust.com for more information.
Click the "Open in GitHub Codespaces" button above to launch a pre-configured sandbox.
- Repository: ZinTrust/zintrust
- Automatic Setup: Uses
docker.io/zintrust/zintrust:latest - Active Port:
7772(The API will open automatically in your browser) - Start Command:
node --experimental-specifier-resolution=node dist/src/boot/bootstrap.js
| Check | Status |
|---|---|
| Build | |
| Quality | |
| Security | |
| Docker | |
| Tests |
- Quality Gate + key measures: https://sonarcloud.io/summary/new_code?id=ZinTrust_ZinTrust
If you want PR-specific “New Code” numbers in GitHub, rely on the SonarCloud PR Check (that’s where pullRequest=... links come from); the README badges above intentionally track the project overview so they stay stable.
✅ Type-Safe ORM & Query Builder – No raw SQL, chainable queries ✅ Multi-Database Support – SQLite, PostgreSQL, MySQL, SQL Server via adapters ✅ Declarative Routing – Groups, resources, nested routes ✅ Service Container – Dependency injection out of the box ✅ Migrations & Seeding – Schema versioning, factory-based test data ✅ N+1 Detection – Built-in query optimization monitoring ✅ Memory Profiling – Heap/GC tracking per request ✅ SQL Injection Prevention – Parameterized queries by default ✅ Multi-Cloud Ready – Docker, AWS, Cloudflare Wrangler, Deno ✅ Edge Compatible – Run API on Cloudflare Workers, process jobs on Node.js ✅ Production Quality – SonarQube integration, 90%+ test coverage
# Install @zintrust/core (ZinTrust CLI) globally
npm install -g @zintrust/core
# Create a new project
zin new my-app
cd my-app
# Install adapters as needed (example: SQLite)
zin add db:sqlite
# Start development server
zin startNew projects include an .env with safe defaults (and the generator will backfill them if missing):
HOST=localhostPORT=7777LOG_LEVEL=debug
If you need a project-local Node/Docker bootstrap file, reuse the stock core bootstrap instead of copying the full framework bootstrap into your app:
// src/boot/bootstrap.ts
import '@zintrust/core/boot';
export {};ZinTrust ships a minimal core. Database/cache/etc. integrations are installed explicitly via adapter packages.
# Database adapters
zin add db:sqlite # installs @zintrust/db-sqlite
zin add db:postgres # installs @zintrust/db-postgres
zin add db:mysql # installs @zintrust/db-mysql
zin add db:mssql # installs @zintrust/db-sqlserverThe canonical CLI is zin. z is a documented shorthand alias.
The npm package @zintrust/core includes a small set of runtime dependencies primarily to power the CLI and developer experience.
commander- command parsing and--helpUX for thezinCLIinquirer- interactive prompts (project scaffolding, generators)chalk- terminal colors for readable CLI outputtsx- runs TypeScript-based CLI entrypoints without requiring a separate build step during development
Some dependencies are used by built-in features/adapters:
bcrypt- password hashing helpersjsonwebtoken- JWT token signing/verification utilities
Database drivers are provided by adapter packages (for example, @zintrust/db-sqlite depends on better-sqlite3).
Note: native modules like better-sqlite3 may require build tools on certain platforms.
If you want to contribute to the framework:
# Clone the repository
git clone https://github.com/ZinTrust/ZinTrust.git
cd ZinTrust
# Install dependencies
npm install
# Start development server
zin start
# Run tests
npm test
# Build for production
npm run buildZinTrust now publishes two framework runtime targets from the main Dockerfile:
zintrust/zintrust: base runtime image with official built-in plugin registrations preloaded by defaultzintrust/zintrust-worker: dedicated worker runtime image that starts the worker CLI entrypoint by default
Built-in base plugin packages:
@zintrust/db-postgres@zintrust/db-mysql@zintrust/db-sqlserver@zintrust/db-sqlite@zintrust/queue-redis@zintrust/queue-rabbitmq@zintrust/queue-sqs@zintrust/cache-redis@zintrust/cache-mongodb@zintrust/mail-nodemailer@zintrust/mail-smtp@zintrust/mail-sendgrid@zintrust/mail-mailgun@zintrust/storage-s3@zintrust/storage-r2@zintrust/storage-gcs
Worker image additions:
@zintrust/workers@zintrust/queue-monitor
Local smoke commands:
npm run docker:build
npm run docker:build:worker
npm run docker:smokezintrust/
├── app/ # Application code (Controllers, Models, Middleware)
├── bin/ # CLI tools and commands
├── packages/ # Optional adapter packages (cache/db/mail/queue/storage)
├── routes/ # Route definitions
├── services/ # Example microservices (ecommerce)
├── src/ # Framework & services
│ ├── config/ # Centralized configuration (env, app, database, security, etc.)
│ ├── database/ # Migrations, seeders, factories
│ ├── functions/ # Serverless handlers (Lambda, Deno, Cloudflare)
│ ├── orm/ # Object-Relational Mapping
│ ├── routing/ # Routing engine
│ ├── middleware/ # Middleware system
│ ├── container/ # Service container (DI)
│ ├── http/ # Request/Response handlers
│ ├── microservices/ # Microservices framework
│ ├── security/ # Security utilities
│ ├── validation/ # Input validation
│ ├── profiling/ # Performance profiling
│ └── deployment/ # Cloud adapters (AWS, Cloudflare, Deno)
├── tests/ # Test files
│ ├── unit/ # Unit tests
│ └── integration/ # Integration tests
├── docs/ # Public documentation
├── docs-website/ # Docs site build output/tools
└── md/ # Internal documentation
See docs/ for comprehensive guides on:
- Getting Started
- Models & ORM
- Advanced ORM Relationships
- Query Builder
- Routing
- Middleware
- Testing
- Deployment
Practical walkthroughs:
Use path aliases for clean, maintainable imports:
// Configuration
import { appConfig } from '@config/app';
import { databaseConfig } from '@config/database';
import { securityConfig } from '@config/security';
// ORM & Database
import { Model } from '@orm/Model';
import { Database } from '@orm/Database';
// Routing
import { Router } from '@routing/Router';
// HTTP
import { Request } from '@http/Request';
import { Response } from '@http/Response';
// Services & Microservices
import { MicroserviceBootstrap } from '@microservices/MicroserviceBootstrap';
// Application code (app folder)
import { User } from '@app/Models/User';
import { UserController } from '@app/Controllers/UserController';
// Serverless
import { handler } from '@functions/lambda';
// Microservices
import { usersService } from '@services/ecommerce/users';ZinTrust is built on proven architectural patterns for modern backend development:
- Models first: Define your data schema with explicit models
- Type safety: Full TypeScript with strict mode enabled
- Testing focus: Vitest integration with fast, isolated tests
- Performance by default: N+1 detection, memory profiling built-in
- Minimal core: Core HTTP/routing logic avoids external web frameworks; the published package still includes CLI/DX dependencies listed above
We welcome contributions! Please see our Contributor & QA Guide for details on our code of conduct, and the process for submitting pull requests.
ZinTrust enforces strict quality standards. Before submitting a PR, ensure you run:
zin qaThis will run linting, type-checking, and tests to ensure your changes meet our standards.
If you discover a security vulnerability within ZinTrust, please see our Security Policy.
Join our community and stay updated:
- Website: zintrust.com
- X (Twitter): @zintrust
- Discord: Join our server
- Slack: Join our workspace
- Reddit: r/zintrust
- Dev.to: zintrust
- Medium: @zintrust
- Stack Overflow: zintrust
- LinkedIn: ZinTrust
- YouTube: @zintrust
MIT
Copyright © 2025 ZinTrust Framework. All rights reserved.