implementation-lokstra-init-framework

Automates Lokstra app bootstrap by initializing the framework in main.go.

8|1|Updated Jun 21, 2025
One-click install
npx skills add https://github.com/primadi/lokstra --skill implementation-lokstra-init-framework
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementation-lokstra-init-framework
Source: https://github.com/primadi/lokstra/tree/main/.github/skills/implementation-lokstra-init-framework
Command: npx skills add https://github.com/primadi/lokstra --skill implementation-lokstra-init-framework

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides a reliable blueprint to bootstrap Lokstra applications by wiring framework initialization, service registration, and configuration loading in the project's entry point.

Core Features & Use Cases

  • Bootstrap & Run: Auto-discovers annotated handlers and services, generates route wiring, and boots the server with dependency injection.
  • Config & Migrations: Loads and merges YAML configs, and can run database migrations during startup.
  • Multi-module & Customization: Supports multi-module projects, server initialization hooks, and optional options for environment-specific behavior.

Quick Start

Use this skill to initialize a Lokstra application by implementing a clean main.go that registers middleware, registers infrastructure services, and calls lokstra_init.BootstrapAndRun().

Frequently Asked Questions about implementation-lokstra-init-framework

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I initialize a Lokstra application from main.go?

To initialize a Lokstra application from main.go, you register middleware and infrastructure services, then call lokstra_init.BootstrapAndRun() to auto-discover annotated handlers, generate route wiring, and boot the server with dependency injection.

How does annotation-driven code generation work for Go framework bootstrap?

Annotation-driven code generation for Go framework bootstrap works by auto-discovering annotated handlers and services to generate route wiring and dependency injection registration, eliminating manual boilerplate for server startup.

Can I load YAML configuration and run database migrations during Go application startup?

Yes, you can load YAML configuration and run database migrations during Go application startup; the bootstrap process loads and merges YAML configs and can execute migrations before the server starts with generated routes.

Does the Lokstra framework bootstrap support multi-module project setups?

Yes, the Lokstra framework bootstrap supports multi-module project setups, allowing annotation-driven route and service generation across modules with centralized configuration loaded at startup and environment-specific options.

What is the best way to wire dependency injection in a Go web framework?

The best way to wire dependency injection in a Go web framework is using annotation-driven bootstrap that auto-registers dependencies, generates route wiring, and starts the server without manual DI container configuration.

When should I add server initialization hooks for environment-specific behavior?

You should add server initialization hooks for environment-specific behavior when bootstrapping Lokstra applications that require custom startup logic, multi-module support, or optional environment-specific options before the server runs.