wraith/main.go
Vantz Stockwell 8b891dca00 feat: wire all services into Wails app entry point
Create WraithApp struct in internal/app that initializes SQLite,
runs migrations, seeds themes, and exposes vault management methods
(IsFirstRun, CreateVault, Unlock, IsUnlocked) to the frontend.
Register WraithApp, ConnectionService, ThemeService, and SettingsService
as Wails v3 bound services.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 06:28:32 -04:00

49 lines
1.0 KiB
Go

package main
import (
"embed"
"log"
"log/slog"
wraithapp "github.com/vstockwell/wraith/internal/app"
"github.com/wailsapp/wails/v3/pkg/application"
)
//go:embed all:frontend/dist
var assets embed.FS
func main() {
slog.Info("starting Wraith")
wraith, err := wraithapp.New()
if err != nil {
log.Fatalf("failed to initialize: %v", err)
}
app := application.New(application.Options{
Name: "Wraith",
Description: "SSH + RDP + SFTP Desktop Client",
Services: []application.Service{
application.NewService(wraith),
application.NewService(wraith.Connections),
application.NewService(wraith.Themes),
application.NewService(wraith.Settings),
},
Assets: application.AssetOptions{
Handler: application.BundledAssetFileServer(assets),
},
})
app.Window.NewWithOptions(application.WebviewWindowOptions{
Title: "Wraith",
Width: 1400,
Height: 900,
URL: "/",
BackgroundColour: application.NewRGBA(13, 17, 23, 255),
})
if err := app.Run(); err != nil {
log.Fatal(err)
}
}