← Back to Docs

Zero-Config Protocol

Mana is designed for developers who want to prioritize speed. The minimal setup illustrates exactly how much power is available with just **three lines of code**.

1. Default Config

By calling mana.DefaultConfig(), the framework automatically configures:

2. The New Engine

Every Mana application starts with app := mana.New(cfg). This instance acts as your command center, orchestrating the SignalHub, RoomManager, and AuthService.

3. Starting the Server

Calling app.Start() launches the high-performance HTTP/WebSocket server. It is built on standard net/http, making it compatible with existing Go middleware like CORS or Logging.

main.go
package main

import (
    "log"
    mana "github.com/Aswanidev-vs/mana"
    "github.com/Aswanidev-vs/mana/core"
)

func main() {
    // 1. Minimum viable functional RTC server.
    // Zero-config enables auto-persistent storage (SQLite).
    app := mana.New(core.DefaultConfig())
    
    // 2. Start the engine on port 8080 (default)
    log.Fatal(app.Start())
}