init bootstrap

This commit is contained in:
Fran Jurmanović
2025-07-06 15:02:09 +02:00
commit 016728532c
47 changed files with 8894 additions and 0 deletions

48
cmd/api/main.go Normal file
View File

@@ -0,0 +1,48 @@
package main
import (
"fmt"
"omega-server/local/utl/cache"
"omega-server/local/utl/db"
"omega-server/local/utl/logging"
"omega-server/local/utl/server"
"os"
"go.uber.org/dig"
)
// @title Bootstrap App API
// @version 1.0
// @description A comprehensive web-based management system built with clean architecture principles
// @contact.name API Support
// @contact.email support@example.com
// @license.name MIT
// @license.url https://opensource.org/licenses/MIT
// @host localhost:3000
// @BasePath /api/v1
// @securityDefinitions.apikey BearerAuth
// @in header
// @name Authorization
// @description Type "Bearer" followed by a space and JWT token.
func main() {
// Initialize logger
logger, err := logging.Initialize()
if err != nil {
fmt.Printf("Failed to initialize logger: %v\n", err)
os.Exit(1)
}
defer logger.Close()
// Set up panic recovery
defer logging.RecoverAndLog()
logging.Info("Starting Bootstrap App...")
// Initialize dependency injection container
di := dig.New()
// Initialize core components
cache.Start(di)
db.Start(di)
server.Start(di)
}