app

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package app provides the core application setup using Fx.

Index

Constants

This section is empty.

Variables

View Source
var BackendModule = fx.Module("backend",
	fx.Provide(
		provideBackendService,
	),
	fx.Invoke(backend.RegisterEventHandlers),
)

BackendModule provides core business logic and access to persistent data.

View Source
var ConfigModule = fx.Module("config",
	fx.Provide(
		mcpConfig.NewConfig,
		webConfig.NewConfig,
	),
)

ConfigModule provides configuration values for different application components.

CoreModules bundles all application components for Fx dependency injection.

CursorModule manages Cursor MCP configuration file (.cursor/mcp.json).

View Source
var DatabaseModule = fx.Module("database",
	fx.Provide(
		provideDBConfig,
		provideDatabase,
	),
)

DatabaseModule provides database connectivity and lifecycle management.

View Source
var EventsModule = fx.Module("events",
	fx.Provide(
		events.NewBus,
	),
)

EventsModule provides the application-wide event bus for component communication.

View Source
var InitModule = fx.Module("init",
	fx.Invoke(
		initializeApplication,
	),
)

InitModule handles application startup tasks and initial data seeding.

View Source
var LogModule = fx.Module("logger",
	fx.Provide(
		log.NewLogger,
	),
)

LogModule provides common logging components for the entire application.

View Source
var MCPClientModule = fx.Module("mcp_client",
	fx.Provide(
		provideAPIClient,
		mcp.NewMCPComponents,
	),
	fx.Invoke(
		mcp.RegisterMCPServerHooks,
		mcp.RegisterEventSubscribers,
	),
)

MCPClientModule provides connectivity to remote MCP servers.

View Source
var WebModule = fx.Module("web",
	fx.Provide(
		handlers.NewUIHandler,
		provideAPIHandlers,
		provideSSEHandler,
		provideHTTPRouter,
		web.NewServer,
	),
	fx.Invoke(
		registerHTTPRoutes,
		web.RegisterWebServerHooks,
	),
)

WebModule provides HTTP API, UI, and Server-Sent Events.

Functions

This section is empty.

Types

type DefaultServer

type DefaultServer struct {
	Name string
	URL  string
}

DefaultServer represents a default MCP server configuration.

Jump to

Keyboard shortcuts

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