Horse Framework

Create a complete REST API with a configurable server, including authentication and health check endpoints.

17|7|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/delphicleancode/lazarus-spec-kit --skill horse-framework
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Horse Framework
Source: https://github.com/delphicleancode/lazarus-spec-kit/tree/main/.gemini/skills/horse-framework
Command: npx skills add https://github.com/delphicleancode/lazarus-spec-kit --skill horse-framework

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Develop robust REST APIs in FreePascal/Lazarus using a minimal, high-performance framework. It guides structuring projects with clear separation of concerns (Controllers, Middleware, Domain, Application, Infrastructure) and promotes safe, scalable patterns for middleware and routing.

Core Features & Use Cases

  • Middleware chain for authentication, logging, CORS, and error handling to streamline API behavior.
  • Structured project layout and RESTful routing conventions tailored for Horse in Lazarus.
  • Real-world scenarios include building authenticated services, health checks, and route-driven controllers with dependency services.

Quick Start

Start a new Lazarus project, configure THorse, register routes, and run a simple health endpoint to verify the server is up.

Frequently Asked Questions about Horse Framework

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

FAQPage Schema
How do I structure a REST API in FreePascal using the Horse framework?

Structure a REST API in FreePascal by separating concerns into Controllers, Middleware, Domain, Application, and Infrastructure layers. This enforces safe, scalable patterns and clear routing conventions tailored for Horse in Lazarus.

How does middleware integration work for Horse REST APIs in Lazarus?

Middleware integration for Horse REST APIs uses a sequential chain to process authentication, logging, CORS, and error handling. This streamlines API behavior by intercepting requests before they reach route-driven controllers.

Can I build authenticated services with FreePascal and the Horse framework?

Yes, you can build authenticated services using Horse in FreePascal. The framework supports middleware chains specifically designed for authentication, enabling secure, real-world REST API scenarios with static typing.

What's the best way to start a REST API project with Horse in Lazarus?

The best way to start a REST API project is to create a new Lazarus project, configure THorse, register routes, and run a simple health endpoint. This verifies the server is up and validates your static typing setup.

When do I need static typing and structured Pascal code organization for a REST API?

You need static typing and structured Pascal code organization when architecting robust, high-performance REST APIs. This approach ensures safe, scalable patterns for middleware integration and clear separation of concerns.