aigen-app

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 3 Imported by: 0

README

AIGenApp

A headless CMS and dynamic application framework in Go, evolved from the FormCMS original C# implementation. It uses a single-table JSON store for maximum schema flexibility.

Features

  • Agentic Workflows: Integrated multi-agent system powered by Gemini models for orchestrating tasks.
    • Router Agent: Intelligently routes user requests between specialized sub-agents.
    • App Agent: Manages and queries app data and schemas autonomously.
    • UI Agent: Dynamically updates the A2UI dashboard components based on user interactions and data changes.
  • App Capability Discovery: Built-in app_def.json and context file framework allowing LLM agents to dynamically discover app purpose, roles, and entity relationships.
  • A2UI Protocol: Real-time Agent-to-User Interface for streaming backend-driven UI updates (SSE) using a high-performance adjacency list model.
  • Multi-Channel Communication: Seamlessly interact with users via WhatsApp, Email, Signal, Telegram, X.com, and Bluesky.
    • Authenticated Channels: Link verified platform identities to user profiles.
    • E-trail Logging: Secure audit logs with IP and User Agent for non-repudiation.
    • Guest Support: Configurable guest access across different channels.
  • Frappe/ERPNext Integration: Built-in support for importing and mapping Frappe Doctypes to native app schemas.
  • Advanced RBAC: Granular Role-Based Access Control with field-level and row-level security filters managed via JSON metadata.
  • Schema-on-Read Data Modeling: Define entities and attributes dynamically. All data is stored in a highly flexible single-table JSON schema (aigen_records), making migrations a thing of the past.
  • REST & GraphQL APIs: Auto-generated CRUD and GraphQL endpoints.
  • File Storage: Local and S3 support with image processing.
  • Social Engagement: Built-in likes, bookmarks, and comments.
  • Embedded UI: React Admin panel, GrapesJS page builder, and dynamic A2UI renderer included.

Getting Started

AIGenApp is a reusable Go framework. To use it, create a new Go project and import the framework.

Prerequisites
  • Go 1.25+
Creating a Project
  1. Initialize a new Go module:
mkdir my-app
cd my-app
go mod init my-app
  1. Create a main.go file:
package main

import (
	"log"
	"os"

	"github.com/innomon/aigen-app/framework"
)

func main() {
	configPath := ""
	if len(os.Args) > 1 {
		configPath = os.Args[1]
	}

	config, err := framework.LoadConfig(configPath)
	if err != nil {
		log.Fatalf("Error loading configuration: %v", err)
	}

	if err := framework.Start(config); err != nil {
		log.Fatalf("Framework failed to start: %v", err)
	}
}
  1. Create a config.yaml file:
apps_dir: "apps"
www_root: "wwwroot"
database_dsn: "sqlite://aigen.db"
domain: ""
port: "5000"
agentic_config_path: "agentic.yaml"
  1. Run the server:
go run main.go config.yaml

The server will start on http://localhost:5000.

Deployment

Environment Variables
Variable Description Default
DOMAIN Your external domain name (e.g., example.com). If set, enables automatic HTTPS via autocert. ""
PORT The port to listen on for HTTP. Ignored if DOMAIN is set. 5000
Automatic HTTPS (autocert)

AIGenApp supports automatic TLS certificate provisioning via Let's Encrypt using autocert. To enable this:

  1. Point your domain's DNS A/AAAA records to your server's IP.
  2. Ensure ports 80 and 443 are open and not in use by other processes.
  3. Run the application with the DOMAIN environment variable:
DOMAIN=yourdomain.com go run main.go config.yaml

The server will automatically handle HTTP-to-HTTPS redirection and store certificates in a local certs directory.

Framework Structure

  • framework: The main entry point Start() function to initialize the application.
  • apps: Pre-packaged data models, test data, and UI logic that load dynamically.
  • core/api: HTTP handlers and routing.
  • core/descriptors: Data models and schema definitions.
  • core/services: Business logic and orchestration.
  • infrastructure/filestore: File storage implementations (Local, S3).
  • infrastructure/relationdbdao: Database abstraction layer (PostgreSQL, SQLite, and Firestore using single JSON store).
  • utils: Shared utilities and data models.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
export command
import command
core
api
infrastructure
utils

Jump to

Keyboard shortcuts

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