Kashvi
Framework documentation
Kashvi is a Laravel-inspired Go web framework for APIs and web apps: ORM, migrations, JWT auth, caching, queues, WebSockets, gRPC, and a CLI for scaffolding. Use the map below to jump to guides and reference pages.
Made with care by an Indian developer.
Documentation map
| Goal | Where to read |
|---|---|
| Install CLI, new project, first run | Installation & Quick Start |
| Full CRUD (model → DTO → migration → repo → tests) | Complete CRUD walkthrough |
App logs and SQL (LOG_LEVEL, DB_LOG_MODE) | Logging on Installation |
CLI (migrate, make:resource, …) | CLI reference |
| Routes, context, validation, auth | Routing, Context, Validation, Authentication |
Key features
- MVC + DTOs: Controllers, services, repositories, models, and request/response DTOs
- Database ORM: GORM-backed queries (MySQL, PostgreSQL, SQLite, SQL Server)
- Migrations & seeders: Versioned schema and data
- Authentication: JWT middleware and optional RBAC
- Caching & queues: Redis-oriented integrations
- WebSockets & gRPC: Real-time and RPC alongside HTTP
- Testing: TestKit with JSON scenario files
- CLI:
kashvi new,kashvi make:*, project-awareserve/migrate
Architecture
Kashvi follows MVC with a repository layer and DTOs for API contracts. Controllers bind JSON to DTOs, validate, call repositories or services, and respond.
┌─────────────────┐ │ Controllers │ ← HTTP; bind DTOs, call services/repositories ├─────────────────┤ │ DTOs │ ← Request/response structs (CreateXRequest, …) ├─────────────────┤ │ Services │ ← Business logic (optional) ├─────────────────┤ │ Repositories │ ← Data access; encapsulate ORM/DB calls ├─────────────────┤ │ Models │ ← GORM models ├─────────────────┤ │ Database │ ← Migrations & GORM └─────────────────┘
Start here
Installation & Quick Start
Install the CLI, create a project, configure env, and run the server.
Complete CRUD walkthrough (Product API)
Model → DTO → migration → repository → service → controller → auth → seed → test.
All sections
Getting Started
Reference
CLI Reference
Commands for server, DB, scaffolding, workers.
Configuration
Environment variables and app.json settings.
Routing
Define routes, groups, middleware, URL params.
Context API
Request/response helpers, binding, validation.
Validation
Struct tags, rules, errors, nullable fields.
Authentication
JWT auth, hashing, middleware, RBAC.
ORM & Database
GORM wrapper, query builder, pagination, cache.
Migrations & Seeders
Create migrations, run/rollback, seed data.
Queue & Jobs
Background jobs, retry/backoff, drivers.
Worker Pool
Bounded goroutine pool for controlled concurrency.
Storage
Local and S3-compatible storage API.
WebSocket & SSE
WebSockets hub/client and Server-Sent Events.
gRPC Server
Run alongside HTTP, interceptors, reflection.
MongoDB Log Storage
Async log mirroring to MongoDB with batching.
TestKit (JSON Scenarios)
Scenario-driven API integration tests in JSON.