{"id":17366716,"url":"https://github.com/foss-labs/another-express-framework","last_synced_at":"2025-09-11T02:36:50.834Z","repository":{"id":257161170,"uuid":"857481675","full_name":"foss-labs/another-express-framework","owner":"foss-labs","description":"Another Express Framework is a lightweight, decorator-based Express.js framework inspired by NestJS","archived":false,"fork":false,"pushed_at":"2024-09-14T19:37:34.000Z","size":23,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-28T14:37:02.433Z","etag":null,"topics":["express","framework","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foss-labs.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-14T19:17:27.000Z","updated_at":"2024-09-29T21:38:28.000Z","dependencies_parsed_at":"2024-09-15T04:58:35.446Z","dependency_job_id":null,"html_url":"https://github.com/foss-labs/another-express-framework","commit_stats":null,"previous_names":["foss-labs/another-express-framework"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foss-labs%2Fanother-express-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foss-labs%2Fanother-express-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foss-labs%2Fanother-express-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foss-labs%2Fanother-express-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foss-labs","download_url":"https://codeload.github.com/foss-labs/another-express-framework/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997049,"owners_count":21195785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","framework","typescript"],"created_at":"2024-10-15T22:04:31.099Z","updated_at":"2025-04-15T02:42:25.405Z","avatar_url":"https://github.com/foss-labs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Another Express Framework\n\nAnother Express Framework is a lightweight, decorator-based Express.js framework inspired by NestJS. It provides a structured way to build scalable and maintainable server-side applications with TypeScript.\n\nThis framework is designed to be easily integrated into your project by copying the source code directly.\n\n## Features\n\n- Decorator-based routing and dependency injection\n- Module-based architecture\n- Built-in support for middleware, guards, pipes, and interceptors\n- Exception filters for centralized error handling\n- Configurable scopes for services (Singleton, Transient, Request)\n- Easy integration with Express.js ecosystem\n\n## Installation\n\n1. Copy the [framework source code](https://github.com/foss-labs/another-express-framework/blob/main/src/framework/index.ts) to your project repository.\n2. Place the copied file in your project, for example, as `./src/framework/index.ts`.\n3. Import the necessary decorators and classes from this file in your application code.\n\n## Quick Start\n\n1. Create a new TypeScript project and install the necessary dependencies:\n\n```bash\nnpm init -y\nnpm install express @types/express typescript inversify qs reflect-metadata zod\n```\n\n2. Copy the framework source code as described in the Installation section.\n\n3. Create a simple controller:\n\n```typescript\nimport { Controller, Get, Post, Body } from \"./src/framework\";\n\n@Controller(\"/users\")\nexport class UserController {\n  @Get()\n  getUsers() {\n    return [{ id: 1, name: \"John Doe\" }];\n  }\n\n  @Post()\n  createUser(@Body() user: any) {\n    // Create user logic\n    return user;\n  }\n}\n```\n\n4. Create a module to group related components:\n\n```typescript\nimport { Module } from \"./src/framework\";\nimport { UserController } from \"./user.controller\";\n\n@Module({\n  controllers: [UserController],\n})\nexport class AppModule {}\n```\n\n5. Set up the main application:\n\n```typescript\nimport { MiniFramework } from \"./src/framework\";\nimport { AppModule } from \"./app.module\";\n\nasync function bootstrap() {\n  const app = new MiniFramework();\n  await app.registerModule(AppModule);\n  app.listen(3000, () =\u003e console.log(\"Server running on port 3000\"));\n}\n\nbootstrap();\n```\n\n## Key Concepts\n\n### Modules\n\nModules are used to organize the application structure. They encapsulate controllers, providers, and can import other modules.\n\n### Controllers\n\nControllers are responsible for handling incoming requests and returning responses to the client.\n\n### Providers\n\nProviders are injectable classes (services, repositories, etc.) that can be injected into controllers or other providers.\n\n### Middleware\n\nMiddleware functions can be used to modify the request or response objects, end the request-response cycle, or call the next middleware function.\n\n### Guards\n\nGuards determine whether a request should be handled by the route handler or not, typically used for authentication and authorization.\n\n### Pipes\n\nPipes transform input data to the desired format or validate it before it reaches the route handler.\n\n### Interceptors\n\nInterceptors can modify the response from route handlers before it's sent to the client.\n\n### Exception Filters\n\nException filters handle exceptions thrown from your application code and send appropriate error responses to the client.\n\n## Advanced Usage\n\nFor more advanced usage and detailed API documentation, please refer to the [framework source code](https://github.com/foss-labs/another-express-framework/blob/main/src/framework/index.ts). The source code contains extensive comments and type definitions that can help you understand and use the framework's features.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request to the [original repository](https://github.com/foss-labs/another-express-framework).\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoss-labs%2Fanother-express-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoss-labs%2Fanother-express-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoss-labs%2Fanother-express-framework/lists"}