{"id":15056244,"url":"https://github.com/kaundev/upfx","last_synced_at":"2026-02-19T16:03:50.580Z","repository":{"id":57720722,"uuid":"144620008","full_name":"kaundev/upfx","owner":"kaundev","description":"UpFX","archived":false,"fork":false,"pushed_at":"2018-08-13T23:43:12.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-19T17:15:34.046Z","etag":null,"topics":["cdi","framework","injection","java","javafx"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaundev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-13T18:43:31.000Z","updated_at":"2018-08-13T23:43:13.000Z","dependencies_parsed_at":"2022-09-27T10:50:42.240Z","dependency_job_id":null,"html_url":"https://github.com/kaundev/upfx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kaundev/upfx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaundev%2Fupfx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaundev%2Fupfx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaundev%2Fupfx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaundev%2Fupfx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaundev","download_url":"https://codeload.github.com/kaundev/upfx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaundev%2Fupfx/sbom","scorecard":{"id":551801,"data":{"date":"2025-08-11","repo":{"name":"github.com/kaundev/upfx","commit":"be7a8cdd6f9731ab3cc4dde788e4dfe5928897bf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T11:05:34.781Z","repository_id":57720722,"created_at":"2025-08-20T11:05:34.781Z","updated_at":"2025-08-20T11:05:34.781Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29621902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["cdi","framework","injection","java","javafx"],"created_at":"2024-09-24T21:49:28.691Z","updated_at":"2026-02-19T16:03:50.552Z","avatar_url":"https://github.com/kaundev.png","language":"Java","readme":"\u003ch1\u003eUpFX\u003c/h1\u003e\n\nI created this tool to help in developement using JavaFX allowing CDI and other features.\n\nHow to use it:\n- Using Intellij, you can create a new JavaFX project;\n- Then you can add maven support;\n- In the resources folder, add the folder META-INF, and inside it, the beans.xml file. This will allow CDI.\n- Put the .fxml files inside resources folder. Personally I create views folder and put inside it.\n- In pom.xml you can import via dependency.\n\n\u003ch2\u003eFirst Steps:\u003ch2\u003e\n\n\u003ch3\u003eCreating the Main Class:\u003c/h3\u003e\n\n- First extends FxMain in your Main class;\n- Import Result from com.upfx.result.Result via injection;\n- Call initiate method passing the Main class\n- With result you can call render method with the fxml location and the title\n\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.kaundev.upfx\u003c/groupId\u003e\n    \u003cartifactId\u003eupfx-core\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n```java\npublic class Main extends FxMain {\n\n    @Inject\n    private Result result;\n\n    public static void main(String[] args) {\n        initiate(Main.class, args);\n    }\n\n    @Override\n    protected void firstScreen() {\n        result.render(\"/views/sample.fxml\", \"My first ice screen\");\n    }\n}\n```\n  \u003ch3\u003eControllers\u003c/h3\u003e\n\n- Just extends Controller from com.upfx.controller.Controller;\n- There is no need to implement the initialize JavaFX method, the Controller super class already does that.\nLocation and resouceBundle will be accessed via instance field;\n- Instead of \"initialize\" method, this tool offers another method: initiate (not very creative, sorry).\nThis method can receive parameters and will be called when you use result to navigate;\n\n\n```java\npublic class MainController extends Controller {\n\n    public void initiate(){\n        ResourceBundle resourceBundle = this.resourceBundle;\n        URL location = this.location;\n    }\n}\n```\n\u003ch3\u003eNavigation\u003c/h3\u003e\n\n\u003ch4\u003eRendering\u003c/h4\u003e\n- result method from the example above receives a string url of .fxml file, string title of the page\nand others parameters that you can pass through controllers. See the example:\n\n```java\nString path = \"/views/show_message.fxml\"\nString title = \"Show parameters\"\nString parameter1 = \"This is a parameter being passed\"\nString yetAnotherParameter = \"Yes, I can receive as much parameters your controller needs\"\n\nresult.render(path, title, parameter1, yetAnotherParameter);\n```\n\n- In the controller being called you can do\n\n```java\npublic void initiate(String parameter1, String yetAnotherParameter){\n    System.out.println(parameter1);\n    System.out.println(yetAnotherParameter);\n}\n```\n\n\u003ch4\u003egetPane\u003c/h4\u003e\nThe render method will render another screen in your project, but if you want to change a specific element of your screen you can call \"getPane\".\ngetPane doesn't receives the title, but you can pass as much parameters you need. getPane also returns the controller that you are calling. Use getRoot() method to render in the element.\n\n```java\nPaneController paneController = result.getPane(\"/views/lessons/studentCard.fxml\", \"A parameter\");\nthis.changeblePane.getChildren().add(paneController.getRoot());\n```\n\n\u003ch3\u003ePopup\u003c/h3\u003e\nAlso you can create popups, passing .fxml location, the title and other parameters you need.\n\n```java\npublic void popupNoPermission(){\n    result.openPopup(\"/views/users/noPermission.fxml\", \"No permission\");\n}\n```\n\nFor code organization, I recomend creating a Routes class and putting all the routes inside it.\n\n\u003ch2\u003eSecurity\u003c/h2\u003e\n\n- First create an anotation that represents the existing rules. In this example SecurityType is an Enum.\n\n```java\n@Target({ElementType.TYPE, ElementType.METHOD})\n@Retention(RetentionPolicy.RUNTIME)\npublic @interface SecurityTypeRule {\n    SecurityType type();\n}\n```\n\n- Then, create an Handler if the user doenst have permission:\n\n```java\npublic class AuthenticationSecurityHandler extends SecurityHandler{\n\n    private Routes routes;\n\n    @Inject\n    public AuthenticationSecurityHandler(Routes routes) {\n        this.routes = routes;\n    }\n\n    @Override\n    public void handle(InvocationContext invocationContext) {\n        routes.popupNoPermission();\n    }\n}\n```\n\n- Then, create the Rule class implemeting SecurityRule;\n- Annotate the class with @Handler passing the handler you created\n- To perform the security create \"isAllowed\" method return a boolean. This method receives an AnnotatedElement that can be a class or an method. From annotatedElement you can retreive the annotation created.\n\n```java\n@Handler(AuthenticationSecurityHandler.class)\npublic class DefaultRule implements SecurityRule {\n\n    private LoggedUser loggedUser;\n\n    @Inject\n    public DefaultRule(LoggedUser loggedUser) {\n        this.loggedUser = loggedUser;\n    }\n\n    public boolean isAllowed(AnnotatedElement annotatedElement) {\n        SecurityTypeRule securityTypeRule = annotatedElement.getAnnotation(SecurityTypeRule.class);\n        return loggedUserHasPermission(securityTypeRule.type)\n    }\n}\n```\n\n- For Controller classes, just call Class security Annotation passing the ClassRule\n```java\n@ClassSecurity(value = DefaultRule.class) @SecurityTypeRule(type =  SecurityType.list_student)\npublic class MySecurityController extends Controller{\n    ...\n}\n```\n\n- For methods, call MethodSecurity annotation passing the ClassRule\n```java\n@FXML @MethodSecurity(value = DefaultRule.class) @SecurityTypeRule(type = SecurityType.create_admin)\nprotected void addAdmin(){\n    routes.newAdministrator();\n}\n```\n\n\u003ch2\u003eMulti language from ResourceBundle\u003c/h2\u003e\n- The only thing to do is create a producer method passing the location of the properties file, like: \"Bundle_pt_BR.properties\" inside META-INF/locales/Bundle_pt_BR.properties\n\n```java\npublic class ResourceBundleProducer {\n\n    @Produces\n    public ResourceBundle produceResourceBundle() {\n        return ResourceBundle.getBundle(\"META-INF/Bundle\", new Locale(\"pt\", \"BR\"));\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaundev%2Fupfx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaundev%2Fupfx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaundev%2Fupfx/lists"}