nutcas3
cebed0a904
feat: Add CSRF protection middleware and Swagger annotations, remove GraphQL handler setup
...
- Add github.com/utrack/gin-csrf import for CSRF protection
- Remove internal/graphql import and resolver initialization
- Add Swagger API documentation annotations (@title, @version, @description, @host, @BasePath, @securityDefinitions)
- Add CSRF middleware with configurable secret from CSRF_SECRET environment variable
- Add warning log when using default CSRF secret
- Add return statement after database
2026-04-30 22:53:09 +03:00
nutcas3
93bf51df65
feat: Add Consul service discovery integration to API server with automatic registration
...
- Add discovery package import to server.go
- Add fmt and strconv imports for service ID generation and port parsing
- Add CONSUL_ADDR environment variable check to conditionally enable service discovery
- Add discovery.NewServiceDiscovery initialization with error handling and logging
- Add service registration with api-server name, dynamic port from config, and api/telecom tags
- Add serviceID generation using api
2026-04-25 06:51:04 +03:00
nutcas3
1fc84859df
refactor: Remove structured logging initialization from API server startup
...
- Remove logging package import from server.go
- Remove logging.InitWithDefaults call and error handling
- Replace logging.Fatalf with log.Fatalf for database initialization errors
2026-04-25 06:37:33 +03:00
nutcas3
1c89fdac92
feat: Add structured logging initialization to API server startup with database error logging
...
- Add logging package import to server.go
- Add logging.InitWithDefaults call after config loading with error handling
- Replace log.Fatalf with logging.Fatalf for database initialization errors
2026-04-25 06:36:37 +03:00
nutcas3
c0034b195a
feat: Refactor api-server main.go to extract route setup and handlers into separate packages for improved modularity
...
- Move route registration logic to registerV1Routes with dependency injection pattern
- Extract metrics collector initialization to buildMetricsCollector helper function
- Extract service/handler dependency initialization to buildDeps helper function
- Remove all inline handler implementations (auth/services/monitoring/deployments/plugins/automation/config/chaos/billing routes)
- Remove all metrics collection helper functions (startMetricsCollection/
2026-04-24 08:58:53 +03:00
nutcas3
0e28b8a1ac
feat: Add comprehensive API server with REST endpoints, WebSocket support, RBAC, monitoring, and service integrations
...
- Add server.go with Swagger documentation endpoint, WebSocket handler, health/ready/live monitoring endpoints
- Add global middleware: rate limiting, performance optimization, security headers, CORS, request size (10MB), timeout (30s)
- Add performance metrics endpoint with 100ms threshold monitoring
- Add authentication service initialization with JWT, WebSocket hub, health monitor
2026-04-20 18:09:53 +03:00
Nutcase and GitHub
1b2b9d2412
Revert "Revert "App layer"" ( #5 )
2026-04-17 16:08:27 +03:00
Nutcase and GitHub
efed7e936c
Revert "App layer"
2026-04-17 15:59:31 +03:00
nutcas3
ccd50ac79e
feat: Add API server main entry point with GraphQL, metrics collection, and system monitoring
...
- Add main server setup with Gin router, GraphQL handler, and graceful shutdown
- Initialize database connection and metrics collectors (Prometheus and InfluxDB time-series)
- Add HTTP middleware for Prometheus metrics collection
- Add /metrics endpoint for Prometheus scraping and /health endpoint for health checks
- Implement periodic metrics collection (30s interval) for subscribers, sessions, and system
2026-04-17 15:35:33 +03:00