AstraEngine Go
AstraEngine is a modular Go engine for building multi-platform bots, community systems and platform automation products.
It is not just a single bot template. AstraEngine is designed as a reusable runtime core: it provides the event loop, routing, middleware pipeline, platform abstraction, storage contracts, plugin lifecycle and integration boundaries that concrete bots and automation apps can be built on top of.
Purpose
AstraEngine is intended to be the foundation for products that need one shared backend logic layer across multiple platforms, such as Telegram, VK, Discord and future adapters.
The engine focuses on:
- keeping business logic independent from platform SDKs;
- providing a unified event and context model;
- supporting plugins and reusable modules;
- allowing different storage/cache implementations;
- keeping platform adapters isolated from the core;
- making it easier to build bots, admin tools and automation services on one architecture.
Install
go get github.com/andrewkydev/astraengine
Project layout
AstraEngine is designed as:
core — engine runtime, events, context, router, middleware and platform interfaces.
keyboard — unified keyboard and button builder for supported platforms.
payload — callback payload model, codec and helpers.
storage — database/session interfaces and basic memory implementation.
cache — cache interfaces and basic memory implementation.
admin — basic Admin HTTP API skeleton for engine management.
platform — Telegram/VK/Discord platform adapters.
plugin — plugin lifecycle, contracts and registry.
plugins — example built-in engine plugins.
examples — runnable examples built on top of AstraEngine.
docs/PROJECT_STRUCTURE.md — current module map and dependency boundaries.
Run examples
go mod tidy
go run ./examples/multi-platform
Environment:
cp .env.example .env
# fill TELEGRAM_TOKEN / VK_TOKEN / VK_GROUP_ID
Adapters use real SDKs:
- Telegram:
github.com/go-telegram/bot
- VK:
github.com/SevereCloud/vksdk/v3
- Discord:
github.com/bwmarrin/discordgo
Release readiness
CLI migrations
go run ./cmd/astraengine migrate up
go run ./cmd/astraengine migrate status
go run ./cmd/astraengine migrate down 1
Key env vars:
ASTRAENGINE_STORAGE_DRIVER=memory|postgres
ASTRAENGINE_DATABASE_URL=postgres://... — PostgreSQL connection string for the postgres driver.
ASTRAENGINE_PG_AUTO_SCHEMA=true — auto-create engine tables, for example system_users and astra_sessions.
ASTRAENGINE_MIGRATIONS_STORE=file|session — migrations state storage, default: file.
ASTRAENGINE_MIGRATIONS_FILE=.astraengine/migrations.json — file-based migrations state path.
Architecture rule
The engine core must not import Telegram/VK/Discord SDKs directly. Platform SDKs must live only inside adapters.
This keeps AstraEngine reusable: the same core can run with different platform adapters, while business logic and plugins remain platform-independent.
License
MIT. See LICENSE.