asaka

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Asaka

A server-driven admin panel framework for Laravel Go + PostgreSQL + Inertia v3 + React.

Declare a resource once in Go — get a complete, blazing-fast admin panel with live Dashboard charts, Cmd+K global search, BelongsTo relations, inline cell editing, sectioned modals, relation manager tabs, authorization policies, multi-tenant scoping, and EN/JA i18n — without writing per-resource React.

Live Demo (10,000 PostgreSQL rows + Pro views preview)

Asaka Dashboard

Asaka Orders Table

Highlights

  • Full Filament Parity in Go: Declare a resource once in Go (asaka.Resource) and get CRUD tables, dedicated Create / View (Infolists) / Edit pages, Action Modal & Slide-Over Forms, List Page Tabs, Soft Deletes (Restore / Force Delete), Row Reordering, CRUD & Many-to-Many Relation Managers, Pluggable Widgets, Custom Pages & Clusters, Toast & Database Notifications, Built-in Auth & Profile, Multi-Panel, and Multi-Tenancy UI.
  • All 20 Filament Form Fields + Layouts + Reactivity: Complete 20-field catalog (Builder, Repeater, FileUpload, RichEditor, MarkdownEditor, CodeEditor, ColorPicker, Slider, Tags, KeyValue, ToggleButtons, CustomField, etc.), Wizard / Split / Fieldset / Tabs / Collapsible Section / Callout, plus server-driven live() reactivity and async BelongsToSelect with CreateOptionForm.
  • Built for real data volume: Tested with 10,000 PostgreSQL rows and up to 1,000 rows per page (~9 ms LEFT JOIN query, ~11 ms full Dashboard aggregation, ~3.9 ms Cmd+K global search on a standard VPS).
  • Zero-latency UX: Live debounced search, inline editing for badges / money / dates / toggles (PATCH /admin/{slug}/{id}/inline in ~1.5 ms), and EN/JA i18n.
  • Production foundations: Panel-level Guard & built-in Auth, per-resource & per-record Policy, lifecycle Hooks, automatic multi-tenant scoping + Tenant Switcher UI, asaka make:* CLI generators, and asakatest helpers.
  • Single binary: Compiles with go build into a self-contained binary alongside Vite+ assets.

Defining a Resource

func OrdersResource() *asaka.Resource {
	statuses := []asaka.Option{
		{Value: "pending", Label: "Pending", Color: "amber"},
		{Value: "processing", Label: "Processing", Color: "sky"},
		{Value: "shipped", Label: "Shipped", Color: "indigo"},
		{Value: "completed", Label: "Completed", Color: "emerald"},
		{Value: "cancelled", Label: "Cancelled", Color: "rose"},
	}

	return &asaka.Resource{
		Slug:          "orders",
		Table:         "orders",
		Label:         "Orders",
		SingularLabel: "Order",
		Icon:          "shopping-cart",
		Group:         "Sales & Operations",
		PerPage:       25,
		Columns: []asaka.Column{
			asaka.TextColumn("order_number", "Order #").MakeSortable().MakeSearchable(),
			asaka.BelongsToColumn("customer_id", "Customer", "customers", "company_name").MakeSortable().MakeSearchable(),
			asaka.TextColumn("item_summary", "Line Item").MakeSearchable(),
			asaka.BadgeColumn("status", "Status", statuses).MakeSortable(),
			asaka.MoneyColumn("amount", "Amount").MakeSortable().MakeEditable(),
			asaka.DateColumn("due_date", "Due Date").MakeSortable().MakeEditable(),
		},
		Filters: []asaka.Filter{
			asaka.SelectFilter("status", "Status", statuses),
		},
		Fields: []asaka.Field{
			asaka.TextInput("order_number", "Order Number").MakeRequired().MakeUnique().InSection("Order Information"),
			asaka.BelongsToSelect("customer_id", "Customer", "customers", "company_name").MakeRequired().InSection("Order Information"),
			asaka.TextInput("item_summary", "Line Item").MakeRequired().InSection("Order Information"),
			asaka.SelectInput("status", "Status", statuses).MakeRequired().InSection("Order Information"),
			asaka.NumberInput("amount", "Amount (USD)").MakeRequired().WithMin(1).InSection("Schedule & Notes"),
			asaka.DateInput("due_date", "Due Date").InSection("Schedule & Notes"),
			asaka.TextareaInput("notes", "Delivery Notes").InSection("Schedule & Notes"),
		},
	}
}

Register resources (with optional auth guard & multi-tenant scoping):

p := asaka.New("Asaka", "/admin").Register(
	OrdersResource(),
	CustomersResource(),
)
// Optional: p.Guard = requireAuth
// Optional: p.TenantColumn = "tenant_id"; p.TenantResolver = resolveTenant
p.Mount(route)

Prerequisites

  • Go 1.27+
  • Node.js 22+
  • PostgreSQL

Quick Start

A. Add to an existing Laravel Go app
go get github.com/qalainau/asaka
go run github.com/qalainau/asaka/cmd/asaka install
npm install lucide-react
  1. Enable class-based dark mode in resources/css/app.css:
@custom-variant dark (&:where(.dark, .dark *));
  1. Register your resources and mount the panel in routes/web.go:
import "github.com/qalainau/asaka/asaka"

asaka.New("Admin", "/admin").Register(
	OrdersResource(),
).Mount(route)
  1. Build your frontend assets (npm run build or npm run dev) and open /admin.

Pass --force to asaka install to overwrite existing UI files when upgrading.

CLI Generators
go run github.com/qalainau/asaka/cmd/asaka install --force
go run github.com/qalainau/asaka/cmd/asaka make:resource Invoice
go run github.com/qalainau/asaka/cmd/asaka make:page GeneralSettings
go run github.com/qalainau/asaka/cmd/asaka make:widget RevenueTrend --type=chart
go run github.com/qalainau/asaka/cmd/asaka make:relation-manager Customer Order
B. Run the standalone 10,000-row demo locally
git clone https://github.com/qalainau/asaka.git
cd asaka
cp .env.example .env
# Point DATABASE_URL in .env to your PostgreSQL database

npm install && npm run build
go run . migrate --seed
go run .

Open http://127.0.0.1:8080/admin.

Project Structure

  • asaka/ — Core server-driven panel package (schema, CRUD/JOIN/inline handlers, global search, dashboard metrics, policy/guard, multi-tenant scoping, unit tests) and asaka/stubs/ (embedded React UI stubs).
  • cmd/asaka/ — CLI installer (go run github.com/qalainau/asaka/cmd/asaka install).
  • admin/resources.go — Example Orders, Customers, and ActivityLogs resource declarations.
  • resources/js/ — Generic pages/Admin/Dashboard.tsx, pages/Admin/ResourceIndex.tsx, components/GlobalSearchModal.tsx, components/SchemaRenderer.tsx, and lib/i18n.ts.
  • database/migrations/ & database/seeders/ — PostgreSQL schema and 10,000-row seeder.

License

MIT


Built in Asaka, Japan.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
asaka command
database
schema
Package schema embeds the schema dumps that schema:dump writes, such as default-schema.sql, so migrate can build a new database from the binary after schema:dump --prune deletes the migrations.
Package schema embeds the schema dumps that schema:dump writes, such as default-schema.sql, so migrate can build a new database from the binary after schema:dump --prune deletes the migrations.
handlers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL