{"_id":"@bourrague_maxence/clearboot","name":"@bourrague_maxence/clearboot","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@bourrague_maxence/clearboot","version":"2.0.0","description":"Atomic, TypeScript-first, Dependency Injection based Web Framework for Node.js","main":"dist/lib/index.js","types":"dist/lib/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run test && npm run build","dev":"ts-node src/app/main.ts","start":"node dist/app/main.js","test":"jest","test:cov":"jest --coverage","test:watch":"jest --watch"},"repository":{"type":"git","url":"git+https://github.com/Maxenceboo/clearboot.git"},"bugs":{"url":"https://github.com/Maxenceboo/clearboot/issues"},"homepage":"https://github.com/Maxenceboo/clearboot#readme","keywords":["framework","typescript","dependency-injection","decorators","http","nestjs-alternative","web-framework","nodejs"],"author":{"name":"Max"},"license":"MIT","dependencies":{"class-transformer":"^0.5.1","dotenv":"^16.3.1","reflect-metadata":"^0.1.13","zod":"^3.22.4"},"devDependencies":{"@types/jest":"^29.5.11","@types/node":"^20.10.0","@types/supertest":"^6.0.2","jest":"^29.7.0","supertest":"^6.3.3","ts-jest":"^29.1.1","ts-node":"^10.9.2","typescript":"^5.3.3"},"gitHead":"cfbd74bc93a258f490d3943cb14c4eac14112dd5","_id":"@bourrague_maxence/clearboot@2.0.0","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-FimEmdzx293zUGAJHYZOh1nYpq07dCICNMkK3TR+xnrrcqWnWNB+v28M0X2bJHDZ2AGVtm9fCmGF/bhgEcrzqg==","shasum":"aec722d831c4d5c5dfad9411a3879be88db1728b","tarball":"https://registry.npmjs.org/@bourrague_maxence/clearboot/-/clearboot-2.0.0.tgz","fileCount":46,"unpackedSize":87875,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCnmonAjVkSVFdAvjKaCvZOtY7Iv729CyWSVt91KxADrAIhAIm0dTAIclb2MkyR+gPgZnapvr2ejSgup4qAqHdiuY7W"}]},"_npmUser":{"name":"bourrague_maxence","email":"maxenceboo@gmail.com"},"directories":{},"maintainers":[{"name":"bourrague_maxence","email":"maxenceboo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clearboot_2.0.0_1768395300435_0.5883582424569973"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-14T12:55:00.338Z","2.0.0":"2026-01-14T12:55:00.578Z","modified":"2026-01-14T12:55:00.804Z"},"maintainers":[{"name":"bourrague_maxence","email":"maxenceboo@gmail.com"}],"description":"Atomic, TypeScript-first, Dependency Injection based Web Framework for Node.js","homepage":"https://github.com/Maxenceboo/clearboot#readme","keywords":["framework","typescript","dependency-injection","decorators","http","nestjs-alternative","web-framework","nodejs"],"repository":{"type":"git","url":"git+https://github.com/Maxenceboo/clearboot.git"},"author":{"name":"Max"},"bugs":{"url":"https://github.com/Maxenceboo/clearboot/issues"},"license":"MIT","readme":"# 🚀 ClearBoot\r\n\r\n[![npm version](https://img.shields.io/npm/v/clearboot.svg)](https://www.npmjs.com/package/clearboot)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\r\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)\r\n[![Test Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/Maxenceboo/clearboot)\r\n[![Build](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/Maxenceboo/clearboot)\r\n\r\n**A TypeScript-first, Dependency Injection based Web Framework for Node.js**\r\n\r\n*Think NestJS, but lighter and built on native HTTP—no Express overhead.*\r\n\r\nClearBoot brings structure and robustness to your Node.js applications without the complexity of heavier frameworks. It enforces best practices (DI, Decorators, Atomic Architecture) while staying lightweight and performant.\r\n\r\n## ✨ Why ClearBoot?\r\n\r\n- 🏗️ **Atomic Architecture** - Modular, scalable structure that grows with your project\r\n- 💉 **Built-in Dependency Injection** - Strict IoC container for clean, testable code\r\n- 🎨 **Decorator-First API** - Familiar syntax: `@Controller`, `@Get`, `@Validate`, `@Middleware`\r\n- 🛡️ **Production-Ready Middleware** - Complete pipeline system (global, controller, route-level)\r\n- 🔒 **Security by Default** - Helmet headers, rate limiting, CORS, secure body parsing (1MB limit)\r\n- ✅ **Type-Safe Validation** - Native Zod integration via decorators\r\n- ⚡ **Zero HTTP Dependencies** - Built on Node.js native `http` module for maximum performance\r\n- 🧪 **Test-Driven Design** - 120 tests, 100% coverage, ready for TDD/BDD\r\n- 📝 **Full TypeScript Support** - Complete type safety from request to response\r\n\r\n---\r\n\r\n## 📦 Installation\r\n\r\n```bash\r\nnpm install clearboot reflect-metadata zod\r\n```\r\n\r\n---\r\n\r\n## 🚀 Quick Start\r\n\r\n### Create Your First API\r\n\r\n**1. Define a Service** (`user.service.ts`)\r\n\r\n```typescript\r\nimport { Injectable } from 'clearboot';\r\n\r\n@Injectable()\r\nexport class UserService {\r\n  private users = [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }];\r\n  \r\n  findAll() {\r\n    return this.users;\r\n  }\r\n  \r\n  findById(id: number) {\r\n    return this.users.find(u => u.id === id);\r\n  }\r\n}\r\n```\r\n\r\n**2. Create a Controller** (`user.controller.ts`)\r\n\r\n```typescript\r\nimport { Controller, Get, Post, Body, Param, inject } from 'clearboot';\r\nimport { UserService } from './user.service';\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n  private readonly userService = inject(UserService);\r\n\r\n  @Get('/')\r\n  getAllUsers() {\r\n    return this.userService.findAll();\r\n  }\r\n\r\n  @Get('/:id')\r\n  getUserById(@Param('id') id: string) {\r\n    return this.userService.findById(Number(id));\r\n  }\r\n\r\n  @Post('/')\r\n  createUser(@Body() body: { name: string }) {\r\n    return { created: true, user: body };\r\n  }\r\n}\r\n```\r\n\r\n**3. Bootstrap Your Application** (`main.ts`)\r\n\r\n```typescript\r\nimport 'reflect-metadata';\r\nimport { ClearBoot } from 'clearboot';\r\n\r\nawait ClearBoot.create({ \r\n  port: 3000,\r\n  logger: { level: 'info' }  // silent | minimal | info | debug\r\n});\r\n\r\nconsole.log('🚀 Server running on http://localhost:3000');\r\n```\r\n\r\n**That's it!** Your API is now running with:\r\n- ✅ Dependency injection\r\n- ✅ Request logging\r\n- ✅ Type-safe routing\r\n- ✅ Graceful shutdown\r\n\r\nTest it:\r\n```bash\r\ncurl http://localhost:3000/users\r\ncurl http://localhost:3000/users/1\r\n```\r\n\r\n---\r\n\r\n## 📚 Documentation\r\n\r\n### Core Guides\r\n- 🚀 [**Getting Started**](docs/getting-started.md) - Setup and first steps\r\n- 🛣️ [**Controllers**](docs/controllers-guide.md) - Routing, HTTP verbs, parameters\r\n- 📝 [**HTTP Features**](docs/http-features.md) - Cookies, file uploads, form-data\r\n- ✅ [**Validation**](docs/feature-decorators.md) - Type-safe validation with Zod\r\n- 💉 [**Dependency Injection**](docs/dependency-injection-advanced.md) - Service patterns\r\n- 🔧 [**Middleware**](docs/middlewares.md) - Request/response processing\r\n\r\n### Advanced Topics\r\n- 📊 [**Logging**](docs/logging.md) - Structured logging system\r\n- 🏗️ [**Architecture Patterns**](docs/patterns.md) - MVC, Repository, Service Layer\r\n- 🔄 [**Lifecycle Hooks**](docs/lifecycle.md) - Startup, shutdown, database integration\r\n- 🧪 [**Testing**](docs/testing.md) - Unit and integration testing\r\n- 📖 [**API Reference**](docs/api-reference.md) - Complete decorator reference\r\n- ⚙️ [**Configuration**](docs/configuration.md) - Environment and app config\r\n\r\n**👉 [Full Documentation Index](docs/README.md)**\r\n\r\n---\r\n\r\n## 🏆 Features\r\n\r\n### HTTP & Routing\r\n- ✅ Decorator-based routing (`@Get`, `@Post`, `@Put`, `@Delete`, `@Patch`)\r\n- ✅ Parameter extraction (`@Body`, `@Param`, `@Query`, `@Cookie`, `@Headers`)\r\n- ✅ File uploads (multipart/form-data, 10MB per file)\r\n- ✅ Form-data parsing (application/x-www-form-urlencoded)\r\n- ✅ Cookie management (`@Cookie`, `res.cookie()`, `res.clearCookie()`)\r\n- ✅ Custom HTTP codes and headers\r\n\r\n### Middleware & Security\r\n- ✅ Three-level middleware pipeline (global, controller, route)\r\n- ✅ Security headers (Helmet integration)\r\n- ✅ Rate limiting\r\n- ✅ CORS support\r\n- ✅ Body size limits (1MB default)\r\n- ✅ Request logging with configurable levels\r\n\r\n### Validation & Serialization\r\n- ✅ Type-safe validation with Zod (`@Validate` decorator)\r\n- ✅ Automatic response serialization (`@Serialize`)\r\n- ✅ Class-transformer integration\r\n\r\n### Architecture\r\n- ✅ Dependency injection container\r\n- ✅ Lifecycle hooks (`onModuleInit`)\r\n- ✅ Graceful shutdown (SIGTERM, SIGINT)\r\n- ✅ ORM integration support (TypeORM, Prisma, MongoDB)\r\n- ✅ 100% TypeScript with full type inference\r\n\r\n### Quality\r\n- ✅ **120 tests** with 100% coverage\r\n- ✅ Complete JSDoc documentation\r\n- ✅ Production-ready error handling\r\n- ✅ Zero Express dependencies\r\n\r\n---\r\n\r\n## 🤝 Contributing\r\n\r\nContributions are welcome! Please feel free to submit a Pull Request.\r\n\r\n## 📄 License\r\n\r\nMIT License - see [LICENSE](LICENSE) file for details.\r\n\r\n---\r\n\r\n**Built with ❤️ for the TypeScript community**\r\n","readmeFilename":"README.md","_rev":"1-4885e5e298e1f317b190ec438425aa41"}