{"id":48779224,"url":"https://github.com/renatompf/ember-project","last_synced_at":"2026-04-13T13:33:55.712Z","repository":{"id":288983794,"uuid":"969582399","full_name":"renatompf/ember-project","owner":"renatompf","description":"The Ember project is a lightweight Java-based web framework designed for building HTTP-based applications with features like routing, middleware chaining, and request/response abstraction.","archived":false,"fork":false,"pushed_at":"2025-05-08T20:32:10.000Z","size":192,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T21:27:25.482Z","etag":null,"topics":["framework","java","rest","web"],"latest_commit_sha":null,"homepage":"","language":"Java","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/renatompf.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,"zenodo":null}},"created_at":"2025-04-20T13:35:38.000Z","updated_at":"2025-05-08T20:32:11.000Z","dependencies_parsed_at":"2025-05-08T21:25:11.440Z","dependency_job_id":"dc26eea8-1873-4349-942a-d0005131eac9","html_url":"https://github.com/renatompf/ember-project","commit_stats":null,"previous_names":["renatompf/ember-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/renatompf/ember-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatompf%2Fember-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatompf%2Fember-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatompf%2Fember-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatompf%2Fember-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renatompf","download_url":"https://codeload.github.com/renatompf/ember-project/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatompf%2Fember-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31755132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T13:27:56.013Z","status":"ssl_error","status_checked_at":"2026-04-13T13:21:23.512Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["framework","java","rest","web"],"created_at":"2026-04-13T13:33:52.712Z","updated_at":"2026-04-13T13:33:55.692Z","avatar_url":"https://github.com/renatompf.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ember Framework\n\n## Overview\nEmber Framework is a lightweight Java web framework designed for building RESTful APIs with simplicity and flexibility. It provides features like dependency injection, middleware support, request validation, and annotation-based development to streamline the creation of modern web applications.\n\n## Features\n- **Routing**: Flexible routing with support for path and query parameters.\n- **Dependency Injection**: Built-in DI container for managing services and controllers.\n- **Middleware**: Global and route-specific middleware for request handling.\n- **Annotations**: Simplified development with custom annotations (`@Controller`, `@Service`, `@PathParameter`, etc.).\n\n## Architecture\n\n```mermaid\nflowchart TB\n    G[Server] --\u003e H[Incoming Request]\n    H --\u003e I[Context]\n    I --\u003e D[MiddlewareChain]\n\n    A[EmberApplication] --\u003e |configures| G\n    A --\u003e B[DIContainer]\n\n    B --\u003e |registers| C[Router]\n    B --\u003e |manages| Services[Services]\n    B --\u003e |manages| Controllers[Controllers]\n    B --\u003e |manages| Handlers[GlobalHandlers]\n\n    E[Middleware] --\u003e D\n    C --\u003e |provides| D\n    D --\u003e P[ParameterResolver]\n    P --\u003e F[Route Handler]\n    F --\u003e V[ValidationManager]\n    V --\u003e R[Response]\n    F --\u003e R\n    R --\u003e RH[ResponseHandler]\n    RH --\u003e |serializes based on\u003cbr/\u003econtent type| J[Final Response]\n    Handlers --\u003e K[Exception Handling]\n    K --\u003e J\n\n%% Add notes/descriptions\n    A --- Note1[Entry point]\n    B --- Note2[Registers services/controllers\u003cbr/\u003eHandles constructor injection]\n    C --- Note3[Path + method to handler]\n    G --- Note4[Starts and handles HttpServer]\n    I --- Note5[Holds request state, response, etc.]\n    K --- Note6[Handles exceptions using Handles methods]\n    RH --- Note7[Handles content negotiation\u003cbr/\u003eand serialization]\n    P --- Note8[Resolves method parameters\u003cbr/\u003e body, query, path, etc. ]\n    V --- Note9[Validates request data\u003cbr/\u003eusing Jakarta Validation]\n\n%% Styling\nclassDef note fill:#533,stroke:#533,stroke-width:2px\nclass Note1,Note2,Note3,Note4,Note5,Note6,Note7,Note8,Note9 note\n```\n\n\n## Example\n\n```java\nimport io.github.renatompf.ember.annotations.middleware.WithMiddleware;\nimport io.github.renatompf.ember.core.server.Context;\nimport io.github.renatompf.ember.core.server.Middleware;\n\n// Declare middleware for authentication\npublic class AuthMiddleware implements Middleware {\n    @Override\n    public void handle(Context context) throws Exception {\n        String token = context.headers().header(\"Authorization\");\n        if (token == null || !token.equals(\"valid-token\")) {\n            throw new HttpException(HttpStatusCode.UNAUTHORIZED, \"Invalid or missing token\");\n        }\n    }\n}\n\n// Declare middleware for logging\npublic class LoggingMiddleware implements Middleware {\n    @Override\n    public void handle(Context context) {\n        System.out.println(\"Request received: \" + context.getPath());\n    }\n}\n\n// Controller using middleware\n@Controller(\"/secure\")\n@WithMiddleware({AuthMiddleware.class}) // Applied to all methods in this controller\npublic class SecureController {\n\n    @Get(\"/data\")\n    public Response getData() {\n        return Response.ok().body(\"Secure data accessed successfully!\").build();\n    }\n\n    @Get(\"/validate\")\n    @WithMiddleware(LoggingMiddleware.class)\n    public Response validateAndGetData() {\n        return Response.ok().body(\"Validation passed, secure data accessed!\").build();\n    }\n}\n```\n\nAccess the secure endpoint at `http://localhost:8080/secure/data` and `http://localhost:8080/secure/validate`  with a valid token in the header.\n\n## Documentation\n\n### Annotations\n- `@Controller`: Marks a class as a controller.\n- `@Service`: Marks a class as a service.\n- `@Get`, `@Post`, `@Put`, ...: Maps HTTP methods to controller methods.\n- `@PathParameter`: Binds a path parameter to a method argument.\n- `@QueryParameter`: Binds a query parameter to a method argument.\n- `@RequestBody`: Binds the request body to a method argument.\n- `@WithMiddleware`: Applies middleware to a controller or method.\n- `@GlobalHandler`: Marks class as a global exception handler.\n- `@Handles`: Marks a method to handle a specific exception.\n- `@Consumes`: Specifies the content type that a method can consume.\n- `@Produces`: Specifies the content type that a method can produce.\n- `@Validated`: Marks an object for validation using [Jakarta Validation](https://beanvalidation.org/).\n\n### Middleware\nUse `@WithMiddleware` to apply middleware globally or to specific routes.\n\n## Contributing\nContributions are welcome! Please follow these steps:\n1. Fork the repository.\n2. Create a new branch for your feature or bug fix.\n3. Submit a pull request with a detailed description of your changes.\n\n## License\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenatompf%2Fember-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenatompf%2Fember-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenatompf%2Fember-project/lists"}