{"id":18412730,"url":"https://github.com/hexaredecimal/blazingwebx","last_synced_at":"2025-07-18T02:34:22.301Z","repository":{"id":250937200,"uuid":"835903873","full_name":"hexaredecimal/BlazingWebX","owner":"hexaredecimal","description":"A java library for creating webservers and building web user interfaces 100% in java.","archived":false,"fork":false,"pushed_at":"2025-06-08T12:27:38.000Z","size":174,"stargazers_count":23,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-08T13:28:14.428Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://blazingwebx.onrender.com/","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/hexaredecimal.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":"2024-07-30T18:54:01.000Z","updated_at":"2025-06-08T12:27:42.000Z","dependencies_parsed_at":"2024-08-12T21:16:39.922Z","dependency_job_id":"ced140f1-064e-4bcc-86dc-6e5cf225d878","html_url":"https://github.com/hexaredecimal/BlazingWebX","commit_stats":null,"previous_names":["hexaredecimal/jedigenz","hexaredecimal/blazingwebx"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/hexaredecimal/BlazingWebX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexaredecimal%2FBlazingWebX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexaredecimal%2FBlazingWebX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexaredecimal%2FBlazingWebX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexaredecimal%2FBlazingWebX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexaredecimal","download_url":"https://codeload.github.com/hexaredecimal/BlazingWebX/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexaredecimal%2FBlazingWebX/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265692379,"owners_count":23812197,"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":[],"created_at":"2024-11-06T03:43:15.851Z","updated_at":"2025-07-18T02:34:22.292Z","avatar_url":"https://github.com/hexaredecimal.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n ██████╗██╗     █████╗████████████╗   ██╗██████╗██╗    ███████████████╗██╗  ██╗\n  ██╔══████║    ██╔══██╚══███╔██████╗  ████╔════╝██║    ████╔════██╔══██╚██╗██╔╝\n  ██████╔██║    ███████║ ███╔╝████╔██╗ ████║  █████║ █╗ ███████╗ ██████╔╝╚███╔╝\n  ██╔══████║    ██╔══██║███╔╝ ████║╚██╗████║   ████║███╗████╔══╝ ██╔══██╗██╔██╗\n  ██████╔█████████║  █████████████║ ╚████╚██████╔╚███╔███╔█████████████╔██╔╝ ██╗\n  ╚═════╝╚══════╚═╝  ╚═╚══════╚═╚═╝  ╚═══╝╚═════╝ ╚══╝╚══╝╚══════╚═════╝╚═╝  ╚═╝\n                                        \n                https://github.com/hexaredecimal/BlazingWebX\n                        https://blazingwebx.onrender.com\n```\n\n## About\n\u003e - BlazingWebx is a Java library that aims to allows you to build single page web applications (SPAs) 100% in Java, without writing html and JavaScript directly. This goal is achieved through the use of Java classes which are combined together to create an elegant user experience leveraging HTMX for client and server communication while keeping your projects minimal.\n\u003e \n\u003e - BlazingWebx also aims to simplify server side programming and how the client and server pass data to each other. \n\n## Features\n- [X] Web Server API\n- [X] Web UI API (Implements All HTML5 elements)\n- [X] Builtin HTMX API\n- [X] Static content Server\n- [X] Support for most used HTTP methods\n- [X] Simple Map to Json implementation\n- [X] Simple Wrapper for Java hashing API\n- [X] Https request API\n\n## Example\n\u003e\u003e You basically create 2 classes. Your program class containing your java entry point. This class registers your Server class.\n\n`Program.java`\n```java\npackage example;\n\nimport blazing.Blazing;\n\npublic class Program {\n    public static void main() {\n        Blazing.run(HelloWorldServer.class);\n    }\n}\n```\nThen follows your server class. The library uses java annotations to find methods used for route paths and for setting up the server.\n\n`HelloWorldServer.java`\n```java\npackage example;\n\nimport blazing.Route;\nimport blazing.WebServer;\nimport blazing.BlazingResponse;\nimport webx.*; \n\n@WebServer(\"6900\")\n@Static(\"/images\")\npublic class HelloWorldServer {\n    \n    @Initializer\n    public static void init() {\n      // NOTE: Space for loading/connecting server resources such as a database. \n    }\n\n    @Destructor\n    public static void deinit() {\n      // NOTE: Close the db connections\n    }\n    \n    @Get(\"/\")\n    public static void home(BlazingResponse reponse) {\n        var page = new Html()\n            .add(\n                new Button(\"Click Me\")\n                    .hxPost(\"/hello\")\n                    .hxSwap(\"outerHTML\")\n            );\n\n        response.sendUiResponse(page);\n    }\n\n    @Post(\"/hello\")\n    public static void hello(BlazingResponse response) {\n        response.sendUiResponse(new P(\"Hello, world)); // Send a \u003cp\u003e Hello, world \u003c/p\u003e\n    } \n}\n```\nRun your program and visit https://localhost:6900 or whatever port you chose. \nYou should have an button with the text `Click me` and if you trigger the click event the text `Hello, World` should replace \nthe button. \n\n## Components\nYou can extend the builtin library elements to create advanced components. Here is an example of a simple digital clock component. \n\n`ClockComponent.java`\n```java\npackage clockserver;\n\nimport webx.Br;\nimport webx.Div;\nimport webx.GenZElement;\nimport webx.H1;\nimport webx.Html;\nimport webx.P;\nimport java.util.Calendar;\n\npublic class ClockComponent extends WebXElement {\n\tprivate int hour;\n\tprivate int minute;\n\tprivate int second;\n\tprivate String amPm;\n\n\t@Override\n\tpublic String render() {\n\t\thour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\n\t\tminute = Calendar.getInstance().get(Calendar.MINUTE);\n\t\tsecond = Calendar.getInstance().get(Calendar.SECOND);\n\n\t\tvar _hour = hour \u003c 10 ? \"0\" + hour : String.valueOf(hour);\n\t\tvar _minute = minute \u003c 10 ? \"0\" + minute : String.valueOf(minute);\n\t\tvar _second = second \u003c 10 ? \"0\" + second : String.valueOf(second);\n\n\t\tif (hour \u003e= 0 \u0026\u0026 hour \u003c 12) {\n\t\t\tamPm = \"AM\";\n\t\t} else {\n\t\t\tamPm = \"PM\";\n\t\t}\n\n\t\treturn new Div()\n\t\t\t.add(\n\t\t\t\tnew P(_hour)\n\t\t\t\t\t.hxTrigger(\"every 1s\")\n\t\t\t\t\t.hxGet(\"/hour\"),\n\t\t\t\tnew P(\":\"),\n\t\t\t\tnew P(_minute)\n\t\t\t\t\t.hxTrigger(\"every 1s\")\n\t\t\t\t\t.hxGet(\"/minute\"),\n\t\t\t\tnew P(\":\"),\n\t\t\t\tnew P(_second)\n\t\t\t\t\t.hxTrigger(\"every 1s\")\n\t\t\t\t\t.hxGet(\"/second\"),\n\t\t\t\tnew P(amPm)\n\t\t\t\t\t.hxTrigger(\"every 1s\")\n\t\t\t\t\t.hxGet(\"/ampm\")\n\t\t\t)\n\t\t\t.className(\"flex flex-row text-lx\")\n\t\t\t.render();\n\t}\n}\n```\nYou can then use this component normally like any other element. \n\n```java\n...\nnew Div()\n    .addChild(\n        new ClockComponent()\n    ); \n...\n\n@Route(\"/hour\")\npublic static void hour(BlazingRespose reponse) {\n    int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\n    response.sendResponse(String.format(\"%d\", hour)); // \n}\n\n```\nThis allows you to create complex components that abstract away their implementation, your server only has to respond to the requests send by the components. \nThis results in a simple project structure, one with zero configuration outside of adding BlazingWebx to your build system as a dependency.  \n\n## Why\n- Remove the complexity associated with creating web applications.\n- Remove templates by having the UI written as classes that represent components. Through inheritance new components can be created.\n- Minimize the bridge between the backend and the frontend.\n\n## Requirements\n- Java 21 or greater\n- Your favourite IDE/TextEditor\n\n\n## Download\n- [latest](https://github.com/hexaredecimal/BlazingWebX/releases)\n- [documentation](https://blazingwebx.onrender.com/javadoc/index.html)\n\n### Maven \n\u003e\u003e Please add the following to your maven pom file. \n\n```xml\n\t\u003crepositories\u003e\n\t\t\u003crepository\u003e\n\t\t    \u003cid\u003ejitpack.io\u003c/id\u003e\n\t\t    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\t\t\u003c/repository\u003e\n\t\u003c/repositories\u003e\n\t\u003cdependency\u003e\n\t    \u003cgroupId\u003ecom.github.hexaredecimal\u003c/groupId\u003e\n\t    \u003cartifactId\u003eBlazingWebX\u003c/artifactId\u003e\n\t    \u003cversion\u003emain-SNAPSHOT\u003c/version\u003e\n\t\u003c/dependency\u003e\n```\n\n\n## Star history\n[![Star History Chart](https://api.star-history.com/svg?repos=hexaredecimal/BlazingWebX\u0026type=Date)](https://star-history.com/#hexaredecimal/BlazingWebX\u0026Date)\n\n## Reference\n- [htmx](https://htmx.org/)\n- [awesomecss](https://github.com/troxler/awesome-css-frameworks?tab=readme-ov-file)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexaredecimal%2Fblazingwebx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexaredecimal%2Fblazingwebx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexaredecimal%2Fblazingwebx/lists"}