CraftsBlock/CraftsNet ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Java library called CraftsNet that makes it really easy to create HTTP routes and WebSocket endpoints for a server app.

I want to be able to write simple handler classes with annotations for a route or socket path, register them from one main addon class, and have the library take care of the server side details. It should support normal request handling, dynamic route parameters, and WebSocket messages in a clean way. Please also include SSL support using Let’s Encrypt certificates from a certificates folder, with a simple flag to turn it on when starting the app.

Make it feel easy to use, with a straightforward setup and a good example showing how someone would define a route, define a WebSocket endpoint, and register both in an addon. If you need to check current Java or Gradle docs online while building it, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab