{"id":38954261,"url":"https://github.com/dirigiblelabs/tutorial-custom-stack","last_synced_at":"2026-01-17T16:13:25.083Z","repository":{"id":227068744,"uuid":"770322883","full_name":"dirigiblelabs/tutorial-custom-stack","owner":"dirigiblelabs","description":"Tutorial - Custom Stack","archived":false,"fork":false,"pushed_at":"2024-04-05T14:00:26.000Z","size":105,"stargazers_count":0,"open_issues_count":5,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-05T14:56:09.261Z","etag":null,"topics":["custom-stack","tutorial"],"latest_commit_sha":null,"homepage":"https://www.dirigible.io/help/tutorials/customizations/custom-stack/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dirigiblelabs.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}},"created_at":"2024-03-11T11:00:02.000Z","updated_at":"2024-04-05T14:56:13.035Z","dependencies_parsed_at":"2024-03-11T13:30:24.414Z","dependency_job_id":"ade84a1f-a0ea-4d6b-95e5-89395b9bf062","html_url":"https://github.com/dirigiblelabs/tutorial-custom-stack","commit_stats":null,"previous_names":["dirigiblelabs/sample-custom-stack","dirigiblelabs/tutorial-custom-stack"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dirigiblelabs/tutorial-custom-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirigiblelabs%2Ftutorial-custom-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirigiblelabs%2Ftutorial-custom-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirigiblelabs%2Ftutorial-custom-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirigiblelabs%2Ftutorial-custom-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirigiblelabs","download_url":"https://codeload.github.com/dirigiblelabs/tutorial-custom-stack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirigiblelabs%2Ftutorial-custom-stack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: 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":["custom-stack","tutorial"],"created_at":"2026-01-17T16:13:25.020Z","updated_at":"2026-01-17T16:13:25.074Z","avatar_url":"https://github.com/dirigiblelabs.png","language":"HTML","readme":"# Custom Stack - Sample\n\nThe custom stack sample contains all the available standard Eclipse Dirigible components.\n\nIt is good for exploration about the different features and their applicability in particular scenarios.\n\n\n#### Docker\n\n- Build image locally (if you have local changes)\n```\ndocker build application/. --tag ghcr.io/dirigiblelabs/custom-stack:latest\n```\n- Run directly the released image\n```\ndocker pull ghcr.io/dirigiblelabs/custom-stack:latest\ndocker run --name custom-stack --rm -p 8080:8080 ghcr.io/dirigiblelabs/custom-stack:latest\n```\n**Note:** for Apple's M1: provide `--platform=linux/arm64` for better performance\t\t\n\n#### Build\n\n```\nmvn clean install\n```\n##### Maven Profiles\n\n| Profile Name      | Description                                 |\n|-------------------|---------------------------------------------|\n| tests             | Run unit and integration tests              |\n| unit-tests        | Run unit tests                              |\n| integration-tests | Run integration tests                       |\n| quick-build       | Build project quickly by skipping all tests |\n\n\t\n#### Run\n\n```\njava -jar application/target/custom-stack-application-*.jar\n```\n\n#### Debug\n\n```\njava -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000 -jar application/target/custom-stack-application-*.jar\n```\n\t\n#### Web\n\n```\nhttp://localhost:8080\n```\n\n#### REST API\n\n```\nhttp://localhost:8080/swagger-ui/index.html\n```\n\n## Demo Application\n\nThe [demo-application](demo-application) folder contains a simple applications, that consumes the custom APIs _(`custom-api/MyApi` and `custom-api/ExampleClient`)_ . The `custom-api/MyApi` is a TypeScript API, that exposes the `io.dirigible.samples.MyFacade` Java class. The Java class has both `static` and `instance` methods. The `custom-api/ExampleClient` contains more sophisticated usage of multiple Java classes.\n\n### Basic Example\n\n**demo-application/demo.ts**\n```ts\nimport { response } from \"sdk/http\";\nimport { MyApi } from \"custom-api/MyApi\";\n\nconst myApiInstance = new MyApi();\n\nconst firstNumber = myApiInstance.add(5, 3);\nconst secondNumber = myApiInstance.multiply(5, 3);\nconst customMethod = myApiInstance.customMethod(\"tutorial-custom-stack\");\nconst greetingMessage = MyApi.greet();\n\nconst data = {\n    firstNumber: firstNumber,\n    secondNumber: secondNumber,\n    customMethod: customMethod,\n    greetingMessage: greetingMessage,\n};\n\nresponse.println(JSON.stringify(data, null, 2));\n```\n\n**custom-api/MyApi**\n```ts\nconst MyFacade = Java.type(\"io.dirigible.samples.MyFacade\");\n\nexport class MyApi {\n\n    private facadeInstance = new MyFacade();\n\n    public static greet(): string {\n        return MyFacade.greet();\n    }\n\n    public add(a: number, b: number): number {\n        return this.facadeInstance.add(a, b);\n    }\n\n    public multiply(a: number, b: number): number {\n        return this.facadeInstance.multiply(a, b);\n    }\n\n    public customMethod(input: string): string {\n        return this.facadeInstance.customMethod(input);\n    }\n}\n```\n\n### Advanced\n\n**demo-application/demo-client.ts**\n```ts\nimport { response } from \"sdk/http\";\nimport { ExampleClient } from \"custom-api/ExampleClient\";\nimport { ExampleRequest } from \"custom-api/ExampleRequest\";\n\nconst exampleRequest = new ExampleRequest();\nexampleRequest.setExampleId('example-id-1234');\nexampleRequest.setExampleName('Custom Stack Example');\n\nconst exampleClient = new ExampleClient();\nconst exampleResponse = exampleClient.doExample(exampleRequest);\n\nresponse.println(JSON.stringify(exampleResponse, null, 2));\n```\n\n**custom-api/ExampleClient**\n\n```ts\nimport { ExampleResponse } from \"./ExampleResponse\";\nimport { ExampleRequest } from \"./ExampleRequest\";\nimport { Example } from \"./Example\";\nimport { SubExample } from \"./SubExample\";\n\nconst ExampleClientClass = Java.type(\"io.dirigible.samples.api.client.ExampleClient\");\nconst ExampleRequestClass = Java.type(\"io.dirigible.samples.api.domain.input.ExampleRequest\");\n\nexport class ExampleClient {\n\n    public doExample(request: ExampleRequest): ExampleResponse {\n        const requestObj = new ExampleRequestClass();\n        requestObj.setExampleId(request.getExampleId());\n        requestObj.setExampleName(request.getExampleName());\n\n        const responseObj = new ExampleClientClass().doExample(requestObj);\n\n        const examples: Example[] = [];\n\n        for (const exampleObj of responseObj.getExamples()) {\n            const example = new Example();\n            const subExamples: SubExample[] = [];\n\n            example.setId(exampleObj.getId());\n            example.setName(exampleObj.getName());\n\n            for (const subexampleObj of exampleObj.getSubexamples()) {\n                const subexample = new SubExample();\n                subexample.setDate(subexampleObj.getDate());\n                subExamples.push(subexample);\n            }\n            example.setSubexamples(subExamples)\n\n            examples.push(example);\n        }\n\n        const response = new ExampleResponse();\n        response.setExamples(examples);\n        return response;\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirigiblelabs%2Ftutorial-custom-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirigiblelabs%2Ftutorial-custom-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirigiblelabs%2Ftutorial-custom-stack/lists"}