Skip to content

DALnet/tiamat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiamat

Tiamat is an alpha-stage DALnet server-side project written in Go. It combines core components for an IRC-facing gateway and web experience, including Bahamut protocol handling, services integration, AJAX endpoints, and a lightweight Web UI. This project is under active development and not ready for production use.


For Users

Requirements

  • Go 1.21 or newer (1.22 recommended)
  • A POSIX-like environment (Linux or macOS). Windows is supported but less tested.
  • Network access to your DALnet uplink, if you plan to connect.

Install

# Clone
git clone https://github.com/your-org/tiamat.git
cd tiamat

# Build just the main app (recommended for users)
go mod tidy
go build -o tiamat .

Configure

Tiamat uses an INI-style configuration file named tiamat.conf. Place it next to the compiled binary or point to it via an environment variable.

Schema (matches current code):

[server]
name = <public server name>
description = <server description>
debugmode = yes|no
secure_cookies = true|false
max_channels_per_session = <int>

[web]
port = <http_port>
sslport = <https_port_if_enabled>
cookiedomain = <cookie domain or IP>

[uplink]
name = <uplink-server-name>
host = <uplink-host>
port = <uplink-port>
pass = <uplink-password>

[services]
uline = <service1>
uline = <service2>
# repeat as needed

[operators]
# format: oper = nick:password
oper = <nick:password>
# repeat as needed

[admin]
name  = <admin name>
email = <admin email>

Example:

[server]
name = tiamat.testnet.dal.net
description = Test server
debugmode = yes
secure_cookies = false
max_channels_per_session = 10

[web]
port = 8080
sslport = 8443
cookiedomain = 127.0.0.1

[uplink]
name = test-hub.testnet.dal.net
host = 127.0.0.1
port = 7325
pass = changeme

[services]
uline = services.dal.net
uline = stats.dal.net
uline = services2.dal.net

[operators]
oper = admin:changeme

[admin]
name  = Admin-nick
email = your-nick@dal.net

Run

# Using the default tiamat.conf in the current directory
./tiamat

# Or point to a custom config path
TIAMAT_CONF=/etc/tiamat/tiamat.conf ./tiamat

Quick start

  1. Build the binary.
  2. Create and edit tiamat.conf to match your environment.
  3. Start the server.
  4. Open the Web UI in your browser at http://localhost:8080 (or your configured host and port).
  5. Log in with a nickname and optionally prefill channels to join from the UI.

Basic usage and common actions

  • Visit the login page and choose a nickname.
  • Join channels from the Web UI. The server will relay to the IRC network via the Bahamut uplink.
  • Use the About page to confirm configuration and connectivity.
  • If enabled, operator actions require an oper nick and password defined in tiamat.conf.

Security tip: If you expose the HTTP server publicly, place it behind HTTPS. Set secure_cookies=true and configure a reverse proxy (e.g., Nginx or Caddy).


For Developers

Project layout

.
├── tiamat.go              # Main entry point
├── tiamat.conf            # Example config (user-provided)
├── src/
│   ├── api/               # WebSocket API and hub
│   │   └── ws.go
│   ├── bahamut/           # Bahamut protocol handling and uplink helpers
│   │   └── bahamut.go
│   ├── conf/              # Config loader and getters
│   │   └── conf.go
│   ├── funcs/             # Shared validators and helpers
│   │   └── funcs.go
│   ├── lang/              # Language infrastructure
│   │   └── lang.go
│   ├── mem/               # In-memory stores
│   │   └── mem.go
│   ├── relay/             # Relay and snapshots for channels/users/servers
│   │   └── relay.go
│   ├── types/             # Types and constants (nick length, session, etc.)
│   │   └── types.go
│   └── web/               # Web UI and HTTP handlers
│       ├── ajax.go
│       ├── auth.go
│       ├── pages.go
│       ├── sessions.go
│       ├── utils.go
│       └── web.go
├── templates/             # HTML templates
├── public/                # Static assets (css, js)
└── lang/                  # Language files (e.g., english.json)

Build

# Build just the main app (typical local/dev use)
go build -o tiamat .

# CI sanity check: build all packages in the module (optional)
go build ./...

Dependencies

  • Go modules are used (see go.mod, go.sum).
  • Run go mod tidy if you add/remove imports.

Development tips

  • Run go vet ./... and consider golangci-lint (with errcheck, staticcheck) before commits.
  • Use -race during tests or local runs to detect data races.
  • Keep handlers small by responsibility (auth/pages/ajax/sessions), and put reusable logic in utils.go or a shared package.
  • Validate all user input via helpers in src/funcs (expand them as needed).

Contributing

  1. Fork the repository and create a feature branch.
  2. Keep PRs small, documented, and tested where possible.
  3. Follow Go idioms and avoid large, monolithic files.
  4. Document any config changes in both README and CHANGELOG.
  5. For security-sensitive changes, include a paragraph on the threat model.

License

See the LICENSE file at the project root for full license terms.

Credits

  • Original code and ongoing development by Kobi_S.
  • Community contributions are welcome - please open issues or PRs for bugs, docs, and features.

Status Notice

Alpha version - under active development.
APIs, configuration keys, and behavior may change without notice. Do not deploy to production. If you experiment in a public environment, use HTTPS, enable secure cookies, and restrict access.

About

DALnet's HTTP/s IRC server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published