Ddonisgo
v0.1.0 · MIT License · Plugin-based

Build modular backend services in Go.

donisgo is a minimalist, plugin-based Go web framework. Everything is a plugin — wire your services, connect your plugins, and ship without rewriting the core.

module github.com/rolldone/donisgo

Why donisgo?

Built for AI. Great for humans.

🤖

Dibangun untuk AI

Framework ini sangat mudah dipahami oleh AI — pattern yang clear, interfaces explicit, tidak ada magic. AI bisa generate plugin, handler, dan service dengan benar karena strukturnya predictible.

  • Clear file structure & explicit interfaces
  • AI agents bisa extend project dengan minimal context
  • Cocok untuk AI-assisted development workflows
🎓

Cocok untuk Belajar Go

Belajar Go dengan pola yang benar dari awal — services, interfaces, dependency injection, dan clean architecture yang diterapkan lewat plugin system.

  • Services, interfaces, dependency injection
  • Explicit registration — tidak ada auto-discovery ajaib
  • Pisah handler → service → DB dari hari pertama
cmd/server/main.go
app.Run(app.Options{
    RegisterPlugins: func() {
        plugins.RegisterPlugins([]plugins.Plugin{
            auth.New(),     // your auth plugin
            chat.New(),     // your chat plugin
            billing.New(),  // your billing plugin
        })
    },
})
Features

Everything you need, nothing you don't

The core gives you infrastructure — routing, DB, plugins, events. Features live in plugins, so your framework core stays clean and upgrades are painless.

🧩

Plugin-first architecture

Every feature is a plugin. Register it in the server and console and it just works — routes, middleware, services, migrations and CLI commands in one package.

plugins.RegisterPlugins

🔌

Plugin Registry

Plugins talk to each other through typed contracts — no circular imports. One plugin provides a service, others consume it via safe delegation functions.

plugin_registry

CLI plugin generator

Scaffold a new plugin in seconds with built-in templates: minimal, CRUD and middleware. Laravel-style, zero config.

console plugin new

🗄️

Migrations, included

Versioned SQL migrations with up/down files, run from the console CLI. Works with PostgreSQL, MySQL and MariaDB.

console migrate up

📨

Event bus

Lightweight async pub/sub with a request–reply pattern for safe synchronous data sync between plugins.

events.Publish

🛡️

Auth & security kit

JWT utilities, opaque refresh tokens, secret encryption, CORS and Swagger docs out of the box — build auth as a plugin.

internal/auth

🌐

SPA serving (pages plugin)

A built-in "patent" plugin serves your single-page app and handles wildcard routes — registered automatically, always last.

plugins/page

📦

Storage & cache

Local/S3 storage abstraction plus a KeyDB/Redis client for flash messages and fast lookups.

internal/storage

✉️

Mailer & transactions

SMTP mailer with an async queue and transaction helpers for safe, deterministic DB writes.

internal/mail

Plugin system

Plugins that talk to each other

No circular imports. A plugin provides a contract through the registry; other plugins consume it through safe delegation functions — even when the provider isn't installed.

🛠️

Provide a service

Your plugin implements an interface and registers it in the registry.

plugins/chat/plugin.go
func (p *Plugin) RegisterServices(deps plugins.ServiceDeps) error {
    plugin_registry.RegisterChatProvider(p.svc)
    return nil
}
🤝

Consume a service

Other plugins call the registry — nil-safe even if the provider is absent.

plugins/widget/handlers.go
resp, err := plugin_registry.SendMessage(ctx, agentID, msg)
// nil-guard: provider tidak terpasang = aman, bukan panic

Start building with donisgo

Clone the framework, generate your first plugin, and register it — that's all it takes.