Ra

Rapier – Generate Dagger Modules from Annotations for Config Data

Hacker News

Rapier – Generate Dagger Modules from Annotations for Config Data

Hey HN! I built Rapier, a code-generation companion library to Dagger that Dagger modules automatically from annotations to eliminate boilerplate code when pulling configuration data from sources like environment variables, system properties, AWS SSM Parameter Store, and CLI arguments. Why Rapier? Dagger is a powerful dependency injection framework, but setting it up to handle configuration data can get tedious and repetitive. Rapier solves this by generating Dagger modules directly from annotations, saving time and reducing errors. For example, with this Dagger interface: @Component(modules = {RapierExampleComponentEnvironmentVariableModule.class}) public interface ExampleComponent { @EnvironmentVariable(value = "TIMEOUT", defaultValue = "30000") long timeout(); } Rapier generates the RapierExampleComponentEnvironmentVariableModule module automatically to retrieve the TIMEOUT environment variable (or use the default 30000 if it’s not set) and convert it to long. Key Features Out-of-the-box integrations for: Environment variables (@EnvironmentVariable), System properties (@SystemProperty), AWS SSM Parameters (@AwsSsmStringParameter), CLI arguments (@CliPositionalParameter, etc.) Supports type conversion (e.g., String -> int, boolean, or custom types) Easily testable with generated test constructors to inject test data. Works seamlessly with core Dagger features (components, modules, lazy providers, etc.) Why Beta? I’m already using it in production on some of my other projects, so I’m pretty confident it works well, at least for simple use-cases. But Rapier is still in Beta releases, primarily I’m not absolutely sure all the major design decisions are worked out yet, and there may be some non-backwards compatible changes to the user-facing annotations. Try it out! Rapier is open source ( https://github.com/aleph0io/rapier ), and in Maven Central. I Want Your Input! I would love your feedback, questions, or suggestions—especially around other configuration sources you’d like to see supported! Even just comment here or a vote on the Rapier roadmap ( https://github.com/orgs/aleph0io/projects/11/views/1 ) would be very helpful to help me prioritize new features! And let me know if you want any tweaks, too! Other Interesting Things Some of you Java geeks may also find some of the code and technologies used in Rapier interesting as well. Detailed Dagger assumptions testing https://github.com/aleph0io/rapier/tree/main/rapier-assumpti... Annotation processor (e.g., https://github.com/aleph0io/rapier/blob/main/rapier-environm... ) Using Google compile-testing to test the build and run of Java applications during unit testing (e.g., https://github.com/aleph0io/rapier/blob/main/rapier-environm... )

Share card

Actual performance

3points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: google, user, new · Missing: mac, agents, macos
93%93% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: supports, para, compatible · Missing: reddit linkedin, podcasting, created
92%92% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: interface · Missing: plus, platform, intuitive
46%46% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: open source, ide, 000 · Missing: https docs, excited, just released
38%38% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: google, para · Missing: mobile apps, ios, personal
33%33% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
12%12% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Co
Config.ly – Never hardcode your data again42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Config.ly – Never hardcode your data again

Hacker News106
es
esbuild-config35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

esbuild-config

Hacker News1
es
esbuild-config35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

esbuild-config

Hacker News2
es
esbuild-config35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

esbuild-config

Hacker News2
to
tomlparse: TOML config with argparse35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

tomlparse: TOML config with argparse

Hacker News4
Un
Unitree Go2 ROS2 – Champ Config42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Unitree Go2 ROS2 – Champ Config

Hacker News2
es
esbuild-config − Config files for esbuild34%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

esbuild-config − Config files for esbuild

Hacker News3
Wi
WireGuard Config Generator55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

WireGuard Config Generator

Hacker News4
Gh
Ghostty Config Generator34%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Ghostty Config Generator

Hacker News2
Co
Copypasta-data – Generate copypasta with LSTM44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Copypasta-data – Generate copypasta with LSTM

Hacker News5