- Notifications
You must be signed in to change notification settings - Fork2
Yupiik Fusion is a modern, high-performance web framework built on top of GraalVM. It’s designed to provide a streamlined and efficient way to develop web applications.
License
yupiik/fusion
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Yupiik Fusion is a modern, lightweight Java framework designed to quickly build efficient, modular, and maintainable applications with ease built on top of GraalVM. Leveraging powerful features like dependency injection, easy RESTful API creation, and seamless JSON-RPC support, Fusion streamlines development and boosts developer productivity.
✅Simplicity: Minimum magic needed to make your development workflow smooth and nice.
✅Modularity: Lightweight and modular architecture that lets you choose exactly what your application needs.
✅Dependency Injection: Intuitive and reflectionless DI model that simplifies component management and improves maintainability.
✅JSON-RPC & REST API: Effortlessly build JSON-RPC or REST APIs for modern web applications.
✅CLI Application Support: Quickly create robust and maintainable Command-Line Interface (CLI) applications.
✅Cloud-Native Ready: Ideal for containerized applications running in Kubernetes or cloud environments.
✅Native: Built on top of GraalVM for easy native build.
✅Efficient Resource Handling: Supports streaming and low memory usage for high-performance scenarios.
To quickly get started with Yupiik Fusion, add the core dependencies to your Maven project:
<dependencies> <dependency> <groupId>io.yupiik.fusion</groupId> <artifactId>fusion-build-api</artifactId> <version>${fusion.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>io.yupiik.fusion</groupId> <artifactId>fusion-processor</artifactId> <version>${fusion.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>io.yupiik.fusion</groupId> <artifactId>fusion-api</artifactId> <version>${fusion.version}</version> </dependency></dependencies>
Add Json and HttpServer dependencies:
<dependency> <groupId>io.yupiik.fusion</groupId> <artifactId>fusion-json</artifactId> <version>${fusion.version}</version></dependency><dependency> <groupId>io.yupiik.fusion</groupId> <artifactId>fusion-http-server</artifactId> <version>${fusion.version}</version></dependency>
Create REST Endpoint:
importio.yupiik.fusion.framework.api.scope.ApplicationScoped;importio.yupiik.fusion.framework.build.api.http.HttpMatcher;importio.yupiik.fusion.http.server.api.HttpException;importio.yupiik.fusion.http.server.api.Request;importio.yupiik.fusion.http.server.api.Response;importio.yupiik.fusion.json.JsonMapper;@ApplicationScopedpublicclassProductEndpoint {privatefinalProductServiceproductService;privatefinalJsonMapperjsonMapper;publicProductEndpoint(finalJsonMapperjsonMapper,finalProductServiceproductService) {this.jsonMapper =jsonMapper;this.productService =productService; }@HttpMatcher(methods ="GET",path ="/product",pathMatching =HttpMatcher.PathMatching.EXACT)publicList<Product>findAllProduct(finalRequestrequest) {returnproductService.findProducts(); }@HttpMatcher(methods ="GET",path ="/product/",pathMatching =HttpMatcher.PathMatching.STARTS_WITH)publicProductfindProduct(finalRequestrequest) {finalvarid =request.path().split("/")[2];returnproductService.findProduct(id); }@HttpMatcher(methods ="POST",path ="/order",pathMatching =HttpMatcher.PathMatching.EXACT)publicResponsecreateOrder(finalRequestrequest,finalOrderorder) {// custom response craftingreturnResponse.of() .status(201) .header("content-type","application/json") .body(jsonMapper.toString(orderService.createOrder(order))) .build(); }}
Easily create JSON-RPC APIs.
Add dependencies:
<dependency> <groupId>io.yupiik.fusion</groupId> <artifactId>fusion-json</artifactId> <version>${fusion.version}</version></dependency><dependency> <groupId>io.yupiik.fusion</groupId> <artifactId>fusion-jsonrpc</artifactId> <version>${fusion.version}</version></dependency>
importio.yupiik.fusion.framework.api.scope.ApplicationScoped;importio.yupiik.fusion.framework.build.api.jsonrpc.JsonRpc;importio.yupiik.fusion.http.server.api.Request;importio.yupiik.fusion.json.JsonMapper;importjava.util.Map;@ApplicationScopedpublicclassJsonRpcEndpoint {privatefinalProductServiceproductService;publicJsonRpcEndpoint(finalProductServiceproductService) {this.productService =productService; }@JsonRpc(value ="fusion.examples.product.findAll",documentation ="Fetch all product available")publicList<Product>findAllProduct(finalRequestrequest) {returnproductService.findProducts(); }@JsonRpc(value ="fusion.examples.product.findById",documentation ="Find a product by id")publicProductfindProduct(finalRequestrequest,finalStringid) {returnproductService.findProduct(id); }}
The full examples can be found on the GitHub project:
Fusion provide useful extensions:
Comprehensive documentation is available at:
We warmly welcome contributions!
Fork the repository
Submit your enhancements via pull requests
Createissues
Opendiscussions
Yupiik Fusion is released under the Apache License, Version 2.0. See the LICENSE file for more details.
About
Yupiik Fusion is a modern, high-performance web framework built on top of GraalVM. It’s designed to provide a streamlined and efficient way to develop web applications.