{"id":15048172,"url":"https://github.com/github/flit","last_synced_at":"2025-10-04T07:31:44.732Z","repository":{"id":63201558,"uuid":"164907985","full_name":"github/flit","owner":"github","description":"Twitch Twirp RPC implementation for Java","archived":false,"fork":true,"pushed_at":"2024-06-21T19:18:50.000Z","size":395,"stargazers_count":13,"open_issues_count":0,"forks_count":10,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-09-30T00:20:21.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"devork/flit","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.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}},"created_at":"2019-01-09T17:29:51.000Z","updated_at":"2024-09-27T03:36:00.000Z","dependencies_parsed_at":"2023-09-25T03:52:46.105Z","dependency_job_id":null,"html_url":"https://github.com/github/flit","commit_stats":{"total_commits":48,"total_committers":9,"mean_commits":5.333333333333333,"dds":0.6666666666666667,"last_synced_commit":"4c6a6886f4011e65484be7054994897ddfc6af0b"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fflit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fflit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fflit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fflit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/flit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235227462,"owners_count":18956137,"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-09-24T21:08:55.908Z","updated_at":"2025-10-04T07:31:39.379Z","avatar_url":"https://github.com/github.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flit - Twirp RPC Generator Framework\n\nThis project is a generator for the [Twitch TV Twirp](https://github.com/twitchtv/twirp \"Twitch TV Twirp\") RPC\nframework.\n\nIt supports the generation of Java based servers with the following flavours supported:\n\n+ [Spring Boot/Spring MVC](https://spring.io/projects/spring-boot \"Spring Boot\")\n+ [Undertow](http://undertow.io/ \"Undertow\")\n+ JAX-RS ([Jersey](https://eclipse-ee4j.github.io/jersey/), [Apache CFX](http://cxf.apache.org/))\n+ [Jakarta EE](https://jakarta.ee/ \"Jakarta\")\n\n# Contents\n\n\u003c!-- Generated with https://github.com/thlorenz/doctoc --\u003e\n\u003c!-- doctoc README.md \u003e\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Using](#using)\n  - [Runtime libraries](#runtime-libraries)\n  - [Protoc plugin](#protoc-plugin)\n    - [via gradle](#via-gradle)\n    - [via protoc](#via-protoc)\n- [Development](#development)\n  - [Requirements](#requirements)\n  - [Modules](#modules)\n  - [Gradle commands](#gradle-commands)\n  - [Remote Debug](#remote-debug)\n- [Guides](#guides)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Using\n\n### Runtime libraries\n\nFollow the [Working with the Gradle registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry) docs to set up authentication with GitHub packages.\n\n[Published](https://github.com/orgs/github/packages?repo_name=flit) runtime libraries example Gradle setup:\n```groovy\nrepositories {\n    maven {\n        name = 'GithubPackages'\n        url 'https://maven.pkg.github.com/github/flit'\n        credentials {\n            username = project.findProperty('gpr.user') ?: System.getenv('GITHUB_ACTOR')\n            password = project.findProperty('gpr.key') ?: System.getenv('GITHUB_TOKEN')\n        }\n        content {\n            includeGroup('com.flit')\n        }\n    }\n}\n\ndependencies {\n    implementation(\"com.flit:flit-core-runtime:\u003cversion\u003e\")\n    implementation(\"com.flit:flit-spring-runtime:\u003cversion\u003e\")\n    implementation(\"com.flit:flit-jaxrs-runtime:\u003cversion\u003e\")\n    implementation(\"com.flit:flit-jakarta-runtime:\u003cversion\u003e\")\n    implementation(\"com.flit:flit-undertow-runtime:\u003cversion\u003e\")\n}\n```\n\n### Protoc plugin\n\nPlugin `com.flit.flit-plugin` shadow jar can be downloaded from [here](https://github.com/github/flit/packages/1832284).\n\nThe flit plugin accepts the following plugin parameters:\n\n| Name      | Required  | Type                                       | Description                                            |\n|:----------|:---------:|:-------------------------------------------|:-------------------------------------------------------|\n| `target`  | Y         | `enum[server]`                             | The type of target to generate e.g. server, client etc |\n| `type`    | Y         | `enum[spring,undertow,boot,jakarta,jaxrs]` | Type of target to generate                             |\n| `context` | N         | `string`                                   | Base context for routing, default is `/twirp`          |\n| `request` | N         | `string`                                   | If the request parameter should pass to the service    |\n\n#### via gradle\n\nThe plugin can be called from the Gradle protobuf plugin via additional configuration. For example:\n\n```groovy\nprotobuf {\n    protoc {\n        artifact = \"com.google.protobuf:protoc:$protocVersion\"\n    }\n  \n    plugins {\n        flit {\n            path = \"${projectDir}/script/protoc-gen-flit\"\n        }\n    }\n\n    generateProtoTasks {\n        ofSourceSet('main')*.plugins {\n            flit {\n                option 'target=server'\n                option 'type=spring'\n                option 'request=Service'\n            }\n        }\n    }\n}\n```\n```shell\n#!/usr/bin/env bash\n\nDIR=$(dirname \"$0\")\n\nJAR=$(ls -c ${DIR}/flit-plugin-*.jar | head -1)\njava ${FLIT_JAVA_OPTS} -jar $JAR $@\n```\nWhere the plugin jar is located in the same directly as the script.\n\n#### via protoc\n\nThe plugin is executed as part of a protoc compilation step:\n\n    protoc \\\n        --proto_path=. \\\n        --java_out=../java \\\n        --flit_out=target=server,type=undertow:../java \\\n        ./haberdasher.proto\n\n## Development\n\n### Requirements\n\nThe build has been tested with [Zulu's OpenJDK](https://www.azul.com/downloads/#zulu \"JDK Downloads\") version 17.\n\nThe build uses gradle to generate the artifacts. No installation is required as the project uses the\n[gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html \"gradle wrapper\") setup.\n\nOptional: to test you will need an installation of the [protocol buffers compiler](https://github.com/protocolbuffers/protobuf/releases \"protobuf releases\").\n\n### Modules\n\nThe project is split into the following modules:\n\n| Module             | Description                                   |\n|:-------------------|:----------------------------------------------|\n| `plugin`           | The `protoc` plugin                           |\n| `runtime:core`     | Core functionality required by generated code |\n| `runtime:jakarta`  | Runtime library for Jakarta servers           |\n| `runtime:jaxrs`    | Runtime library for JAX-RS servers            |\n| `runtime:spring`   | Runtime library for Spring MVC/Boot servers   |\n| `runtime:undertow` | Runtime library for Undertow servers          |\n\n### Gradle commands\n\n* clean `./gradlew clean`\n* build `./gradlew build`\n* test `./gradlew test`\n* publish `./gradlew publish`\n\n### Remote Debug\n\nUse remote JVM debugging by setting:\n\n```shell\nexport FLIT_JAVA_OPTS=\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005,quiet=y\"\n```\n\n## Guides\n\n| Platform  | Document                              |\n|:----------|:--------------------------------------|\n| Undertow  | [undertow.md](docs/undertow.md)       |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fflit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fflit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fflit/lists"}