{"id":17014324,"url":"https://github.com/wyatt-herkamp/javalinvc","last_synced_at":"2026-05-04T19:38:28.482Z","repository":{"id":52413933,"uuid":"212484268","full_name":"wyatt-herkamp/javalinvc","owner":"wyatt-herkamp","description":"A View Controller system for Javalin","archived":false,"fork":false,"pushed_at":"2021-04-29T21:24:11.000Z","size":142,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-27T13:50:33.420Z","etag":null,"topics":["framework","java","javalin","web"],"latest_commit_sha":null,"homepage":"https://kingtux.dev/javalinvc/","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/wyatt-herkamp.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":"2019-10-03T02:42:34.000Z","updated_at":"2021-01-22T15:27:13.000Z","dependencies_parsed_at":"2022-09-06T05:42:16.747Z","dependency_job_id":null,"html_url":"https://github.com/wyatt-herkamp/javalinvc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyatt-herkamp%2Fjavalinvc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyatt-herkamp%2Fjavalinvc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyatt-herkamp%2Fjavalinvc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyatt-herkamp%2Fjavalinvc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wyatt-herkamp","download_url":"https://codeload.github.com/wyatt-herkamp/javalinvc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244973701,"owners_count":20541021,"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":["framework","java","javalin","web"],"created_at":"2024-10-14T06:24:41.250Z","updated_at":"2026-05-04T19:38:23.450Z","avatar_url":"https://github.com/wyatt-herkamp.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavalinVC [![Maven Version](https://mvnhelper.potatocorp.dev/kingtux-repo/me.kingtux/javalinvc/badge.png)](https://mvnhelper.potatocorp.dev/kingtux-repo/me.kingtux/javalinvc)\n\n### What is it?\nJavalinVC is a View Controller Framework built upon Tipsy's [Javalin](https://github.com/tipsy/javalin/)\n\n\n## Starting Off\n\n#### Accessing \n[How to access my Maven Repo](https://kingtux.dev/my-maven/)\n\nMaven Artifact\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eme.kingtux\u003c/groupId\u003e\n    \u003cartifactId\u003ejavalinvc\u003c/artifactId\u003e\n    \u003cversion\u003e1.0-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n#### Creating The JavalinVC\n \nYou will need to create a Javalin Object. You can read how to do that\n[here](https://javalin.io/documentation#getting-started).\n\nThen you will need to create a ResourceGrabber Again learn [here](https://kingtux.dev/JavalinVC/resourcegrabbers.html). \n\nThe website rules is simple. `WebsiteRulesBuilder.create().setName(\"Test - JavalinVC\").setUrl(\"http://127.0.0.1:1234\").build();`\n\nAnd then last but not least. The View Manager read how to create that here [here](https://kingtux.dev/JavalinVC/viewmanagers.html)\n\nAnd once you have all of those you can create your JavalinVC.\n\n```\nJavalinVCBuilder.create().\n//Set Javalin\nsetJavalin(javalin).\n//Resource Grabber\nsetResourceGrabber(grabber).\n// Set the rules\nsetRules(rules).\nThe View Manager and create\nsetViewManager(builder).createJavalinVC()\n```\n\nEXAMPLE TIME\n```java\nimport io.javalin.Javalin;\nimport me.kingtux.javalinvc.JavalinVC;\nimport me.kingtux.javalinvc.JavalinVCBuilder;\nimport me.kingtux.javalinvc.WebsiteRules;\nimport me.kingtux.javalinvc.WebsiteRulesBuilder;\nimport me.kingtux.javalinvc.rg.ResourceGrabber;\nimport me.kingtux.javalinvc.rg.templategrabbers.InternalResourceGrabber;\nimport me.kingtux.javalinvc.view.ViewManager;\nimport me.kingtux.javalinvc.view.ViewManagerBuilder;\nimport org.eclipse.jetty.server.Server;\n\nclass Main {\n\n    public static void main(String[] args) {\n        ResourceGrabber grabber = new InternalResourceGrabber(\"templates\");\n        WebsiteRules rules = WebsiteRulesBuilder.create().setName(\"Test - JavalinVC\").setUrl(\"http://127.0.0.1:1234\").build();\n        ViewManagerBuilder builder = ViewManagerBuilder.create().setExtension(\".html\").setViewManager(\"me.kingtux.javalinvc.jtwig.JtwigViewManager\");\n        Javalin javalin = Javalin.create(javalinConfig -\u003e {\n            javalinConfig.server(() -\u003e new Server(1234));\n        });\n        \n        JavalinVC javalinVC = JavalinVCBuilder.create().setJavalin(javalin).\n                setResourceGrabber(grabber).setRules(rules)\n                .setViewManager(builder).createJavalinVC();\n\n\n    }\n}\n``` \n\n## Creating a Controller\nFirst off you will need to create a new class. \nand you will need to create and object and register it. \n\nExample: `javalinVC#registerController(new ControllerClass());`\n\nInside your controller class you will need to put methods with the @Controller annotation\nIf you want the Javalin Context you can put that as an argument. \nYou can also retrieve http params by taking a argument and adding @RequestParam. \nAnd if you need the View you can add that as argument.\n\nExample\n```java\nimport io.javalin.http.Context;\nimport me.kingtux.javalinvc.annotations.Controller;\nimport me.kingtux.javalinvc.annotations.RequestParam;\nimport me.kingtux.javalinvc.core.RequestType;\nimport me.kingtux.javalinvc.view.View;\n\nclass ControllerClass{\n    @Controller(path=\"/mystuff\", requestType = RequestType.GET)\n    public void myStuff(Context context,@RequestParam(key = \"argument\",defaultValue = \"hey\") String argument, View view){\n        //Controller stuff\n    }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyatt-herkamp%2Fjavalinvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwyatt-herkamp%2Fjavalinvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyatt-herkamp%2Fjavalinvc/lists"}