tinystruct-patterns

Installation
SKILL.md

tinystruct Development Patterns

Architecture and implementation patterns for building modules with the tinystruct Java framework – a lightweight system where CLI and HTTP are equal citizens.

When to Use

  • Creating new Application modules by extending AbstractApplication.
  • Defining routes and command-line actions using @Action.
  • Handling per-request state via Context.
  • Performing JSON serialization using the native Builder component.
  • Configuring database connections or system settings in application.properties.
  • Generating or re-generating the standard bin/dispatcher entry point via ApplicationManager.init().
  • Debugging routing conflicts (Actions) or CLI argument parsing.

How It Works

The tinystruct framework treats any method annotated with @Action as a routable endpoint for both terminal and web environments. Applications are created by extending AbstractApplication, which provides core lifecycle hooks like init() and access to the request Context.

Routing is handled by the ActionRegistry, which automatically maps path segments to method arguments and injects dependencies. For data-only services, the native Builder component should be used for JSON serialization to maintain a zero-dependency footprint. The framework also includes a utility in ApplicationManager to bootstrap the project's execution environment by generating the bin/dispatcher script.

Related skills
Installs
112
GitHub Stars
179.7K
First Seen
1 day ago