{"id":28421,"library":"typed-framework","title":"typed-framework","description":"TypeScript-first, Express-based MVC framework with dependency injection, decorators, and Spring-like patterns. Current version: 1.1.7. Release cadence: irregular, pre-1.0.0 status indicated. Differentiator: full decorator support for controllers, services, filters, middleware, and parameter injection without runtime config files – all via TypeScript decorators (experimentalDecorators required).","status":"active","version":"0.8.12","language":"javascript","source_language":"en","source_url":"https://github.com/typed-project/typed-framework","tags":["javascript","express","expressjs","typescript","mvc","mvc-framework","enterprise","typed","typed-project"],"install":[{"cmd":"npm install typed-framework","lang":"bash","label":"npm"},{"cmd":"yarn add typed-framework","lang":"bash","label":"yarn"},{"cmd":"pnpm add typed-framework","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core HTTP server framework","package":"express","optional":false},{"reason":"Required by decorators and dependency injection","package":"reflect-metadata","optional":false},{"reason":"Optional database connection via ConnectionFactory","package":"knex","optional":true},{"reason":"Optional logger via LogFactory","package":"winston","optional":true}],"imports":[{"note":"Requires TypeScript and 'experimentalDecorators': true. Default export also available: import TypedFramework from 'typed-framework'.","wrong":"const { ApplicationLoader } = require('typed-framework')","symbol":"ApplicationLoader","correct":"import { ApplicationLoader } from 'typed-framework'"},{"note":"All decorators are in the main package barrel. Do not import from subpaths.","wrong":"import { RestController } from 'typed-framework/dist'","symbol":"RestController","correct":"import { RestController } from 'typed-framework'"},{"note":"Use top-level import. No separate module paths.","wrong":"import { Service } from 'typed-framework/lib'","symbol":"Service","correct":"import { Service } from 'typed-framework'"}],"quickstart":{"code":"import 'reflect-metadata';\nimport { ApplicationLoader, ApplicationSettings, RestController, Get, Data, Res, Service } from 'typed-framework';\nimport express from 'express';\n\n@Service()\nclass UserService {\n  public getUser() {\n    return { id: 1, name: 'John' };\n  }\n}\n\n@RestController('/api')\nclass UserController {\n  constructor(private userService: UserService) {}\n\n  @Get('/user')\n  public indexAction(@Data() data: any, @Res() res: express.Response) {\n    res.json(this.userService.getUser());\n  }\n}\n\n@ApplicationSettings({ rootDir: __dirname })\nclass App extends ApplicationLoader {}\n\nApp.initialize().catch(console.error);","lang":"typescript","description":"Shows minimal setup with ApplicationLoader, Service, RestController, and Get endpoint. Requires reflect-metadata import first."},"warnings":[{"fix":"Set 'experimentalDecorators': true and 'emitDecoratorMetadata': true in tsconfig.json.","message":"TypeScript version compatibility: requiring experimentalDecorators and emitDecoratorMetadata in tsconfig.json. Fails silently without them.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Use path.resolve() or __dirname to pass absolute path to rootDir.","message":"ApplicationSettings must specify rootDir as absolute path; relative paths cause runtime errors looking for srcDir, publicDir etc.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Pin exact version in package.json and test upgrades carefully.","message":"The package README states 'pre-1.0.0', but versions 1.1.x exist. API stability not guaranteed; breaking changes possible in minor versions.","severity":"deprecated","affected_versions":"<=1.1.7"},{"fix":"Initialize database and logger in ApplicationLoader subclass before any service uses them.","message":"ConnectionFactory.getConnection() and LogFactory.getLogger() are singleton factories that require prior configuration. If called before setup, they return undefined causing crashes.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Ensure UserService has @Service() decorator and @RestController() is applied. Also check tsconfig.json for experimentalDecorators and emitDecoratorMetadata.","cause":"Constructor injection not working because UserService not registered properly or decorators missing.","error":"Cannot read property 'getUser' of undefined"},{"fix":"Add 'emitDecoratorMetadata': true under compilerOptions in tsconfig.json.","cause":"emitDecoratorMetadata not enabled in tsconfig.json.","error":"Error: No metadata for 'type' found on property 'indexAction'"},{"fix":"Ensure reflect-metadata is imported at the top of the entry file: import 'reflect-metadata';","cause":"ApplicationLoader is not imported correctly or reflect-metadata not imported first.","error":"Class extends value undefined is not a constructor or null"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}