koan-quickstart

Scaffold Koan-based CRUD APIs with JSON file storage.

4|3|Updated Aug 18, 2025
One-click install
npx skills add https://github.com/sylin-org/koan-framework --skill koan-quickstart
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: koan-quickstart
Source: https://github.com/sylin-org/koan-framework/tree/main/.claude/skills/quickstart
Command: npx skills add https://github.com/sylin-org/koan-framework --skill koan-quickstart

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Koan.Core, Koan.Data.Core, Koan.Data.Connector.Json, Koan.Web.

What problem does it solve?

The initial setup and boilerplate for new projects can be a significant time sink. This Skill provides a streamlined, step-by-step guide to get a fully functional Koan Framework application with a REST API and data persistence running in under 10 minutes.

Core Features & Use Cases

  • Rapid Project Creation: Quickly scaffold a new .NET web project and add essential Koan packages.
  • Minimal Program.cs: Achieve a complete application bootstrap with just a few lines of code, leveraging Koan's auto-registration.
  • Instant CRUD API: Define an entity and get a full REST API (GET, POST, PUT, DELETE, PATCH) automatically generated with EntityController<T>.
  • Zero-Config Data Storage: Start with JSON file storage for immediate development, then seamlessly switch to a real database like PostgreSQL with minimal changes.
  • Use Case: Need to quickly prototype a new service with a backend API? This Skill lets you define your data model, expose it via REST, and persist data in minutes, ready for testing and iteration.

Quick Start

  1. Create project: dotnet new web -n MyKoanApp && cd MyKoanApp
  2. Add packages: dotnet add package Koan.Core Koan.Data.Core Koan.Data.Connector.Json Koan.Web
  3. Minimal Program.cs: using Koan.Core; var builder = WebApplication.CreateBuilder(args); builder.Services.AddKoan(); var app = builder.Build(); app.Run();
  4. Create Models/Todo.cs: using Koan.Data.Core; public class Todo : Entity<Todo> { public string Title { get; set; } = ""; public bool Completed { get; set; } }
  5. Create Controllers/TodosController.cs: using Koan.Web; using Microsoft.AspNetCore.Mvc; [Route("api/[controller]")] public class TodosController : EntityController<Todo> { }
  6. Run: dotnet run

Frequently Asked Questions about koan-quickstart

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

FAQPage Schema
How do I create a REST API with CRUD endpoints quickly?

Koan Framework auto-generates full REST API endpoints (GET, POST, PUT, DELETE, PATCH) from a single entity class definition using EntityController<T>, eliminating manual route setup and reducing boilerplate to minutes.

Can I build a .NET web API without extensive configuration?

Yes. Koan's auto-registration in Program.cs requires only AddKoan() and Run(), replacing hundreds of lines of typical ASP.NET Core setup with minimal code while maintaining full CRUD functionality.

What's the fastest way to prototype a new service with data persistence?

Define your data model as an Entity, inherit a controller from EntityController<T>, and Koan generates the API with JSON file storage ready to test—all within minutes of project creation.

Can I start with JSON storage and switch to PostgreSQL later?

Yes. Koan's connector architecture lets you begin with Koan.Data.Connector.Json for rapid development, then swap to a real database connector with minimal code changes as your prototype scales.

Do I need to write controller methods for basic CRUD operations?

No. EntityController<T> provides all standard CRUD methods automatically; you inherit it without overriding any methods, leaving you free to add only custom business logic when needed.

What packages do I need to add to a new .NET project for Koan?

Add Koan.Core, Koan.Data.Core, Koan.Data.Connector.Json, and Koan.Web via dotnet add package; these four packages provide entity mapping, data persistence, JSON storage, and web controller automation.