Skip to content

Commit 00bfe38

Browse files
committed
Update core features
1 parent 4b7bdd7 commit 00bfe38

File tree

4 files changed

+40
-1512
lines changed

4 files changed

+40
-1512
lines changed

README.md

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Okapi
22

3-
A modern, minimalist HTTP web framework for Go inspired by FastAPI's elegant design philosophy.
3+
A **modern, minimalist HTTP web framework for Go** inspired by the elegant developer experience of FastAPI.
4+
5+
Okapi focuses on **clarity, strong typing, automatic validation, and built-in OpenAPI documentation**, making it easy to build production-ready APIs without boilerplate.
46

57
[![Tests](https://github.com/jkaninda/okapi/actions/workflows/tests.yml/badge.svg)](https://github.com/jkaninda/okapi/actions/workflows/tests.yml)
68
[![Go Report Card](https://goreportcard.com/badge/github.com/jkaninda/okapi)](https://goreportcard.com/report/github.com/jkaninda/okapi)
@@ -12,19 +14,35 @@ A modern, minimalist HTTP web framework for Go inspired by FastAPI's elegant des
1214
<img src="https://raw.githubusercontent.com/jkaninda/okapi/main/logo.png" width="150" alt="Okapi logo">
1315
</p>
1416

15-
Named after the okapi, a rare and graceful mammal native to the rainforests of northeastern Democratic Republic of the Congo—Okapi blends simplicity and strength in a unique, powerful package.
17+
Named after the **okapi**, a rare and graceful mammal native to the rainforests of northeastern Democratic Republic of the Congo — Okapi blends **simplicity, elegance, and strength** into a powerful framework for building Go web services.
18+
19+
---
20+
21+
# Why Okapi?
22+
23+
Go developers often combine multiple libraries for routing, validation, documentation, authentication, and testing.
24+
25+
**Okapi brings all these capabilities together in one cohesive framework** while remaining fully compatible with Go’s standard `net/http`.
26+
27+
Key goals:
28+
29+
* **Developer experience similar to FastAPI**
30+
* **Minimal boilerplate**
31+
* **Strong typing**
32+
* **Built-in OpenAPI documentation**
33+
* **Production-ready features out of the box**
1634

1735
## Features
1836

19-
- **Intuitive API Design** – Clean, declarative syntax for routes and middleware
37+
- **Intuitive API Design** – Clean, declarative syntax for routes and middleware.
2038
- **Automatic Request Binding** – Parse JSON, XML, forms, query params, headers, and path variables into structs
21-
- **Built-in Validation** – Struct tag-based validation with comprehensive error messages
22-
- **Auto-Generated OpenAPI Docs** – Swagger UI and ReDoc automatically synced with your code
39+
- **Built-in Validation** – Struct tag-based validation with comprehensive error messages.
40+
- **Auto-Generated OpenAPI Docs** – Swagger UI and ReDoc automatically synced with your code.
2341
- **Runtime Documentation Control** – Enable/disable OpenAPI docs at runtime without redeployment
24-
- **Authentication Ready** – Native JWT, Basic Auth, and extensible middleware support
25-
- **Standard Library Compatible**Works seamlessly with Go's `net/http`
42+
- **Authentication Ready** – Native JWT, Basic Auth, and extensible middleware support.
43+
- **Standard Library Compatible**Fully compatible with Gos `net/http`.
2644
- **Dynamic Route Management** – Enable/disable routes at runtime without code changes
27-
- **Production Ready**CORS, TLS, graceful shutdown, and comprehensive middleware
45+
- **Production Ready** – TLS support, CORS, graceful shutdown, middleware system, and more.
2846

2947
## Installation
3048

@@ -57,15 +75,25 @@ func main() {
5775
}
5876
```
5977

60-
Run with `go run main.go` and visit:
61-
- **API**: http://localhost:8080
62-
- **Docs**: http://localhost:8080/docs
78+
Run the application:
79+
80+
```
81+
go run main.go
82+
```
83+
84+
Visit:
85+
86+
* API → [http://localhost:8080](http://localhost:8080)
87+
* Swagger Docs → [http://localhost:8080/docs](http://localhost:8080/docs)
88+
* ReDoc → [http://localhost:8080/redoc](http://localhost:8080/redoc)
89+
6390

6491
---
6592

6693
## Request Binding & Validation
6794

68-
Okapi provides multiple approaches to bind and validate incoming requests, from simple binding to fully typed handler signatures.
95+
Okapi supports **multiple binding styles**, from simple handlers to fully typed input/output patterns.
96+
6997

7098
### Validation Tags
7199

@@ -560,17 +588,6 @@ Both approaches generate OpenAPI documentation automatically.
560588
- **Strict typed request/response contracts** as your primary design model
561589
- A **minimal, API-only stack** without broader web framework concerns
562590

563-
---
564-
565-
### Community & Maturity
566-
567-
- **Huma**: More established with a larger community and extensive production usage
568-
- **Okapi**: Newer and rapidly evolving, with a smaller but growing community
569-
570-
Both are actively maintained. Choose based on your architectural preferences and project needs rather than stability concerns alone.
571-
572-
> **Note**: If you're already using Huma with Chi or another router and it's working well for you, there's no urgent reason to switch. Okapi is ideal for new projects or when you want a more integrated, batteries-included framework experience.
573-
574591

575592
---
576593

0 commit comments

Comments
 (0)