How saviganga/flolyt works
flolyt-go is an HTTP API whose evidenced domain workflow creates or fetches an Airbyte access token, refreshing expired tokens before persisting the replacement. Startup wires configuration, logging, database access, the Airbyte provider, and HTTP routes. The README also documents a standalone database migration command. The graph follows relationships shown in excerpts or the source index; unsampled modules and optional wiring are not inferred.
Main entry points: main.go Application Startup · data_ingest.go Token Service · implementation.go GORM Repository · migrate.go Migration Command
Components 18
HTTP API
- HTTP Server
api/server.go - Versioned Routes
api/v1/routes.go - Token Handlers
api/v1/handlers/data_ingest/data_ingest.go - Hello Handler
api/v1/handlers/hello/hello.go - API Responses
api/utils/responses.go
Token Workflow
- Token Service
internal/services/data_ingest/data_ingest.go - Airbyte Provider
external/data_ingest/airbyte.go - Token Record
internal/database/tables/airbyte.go
Runtime Infrastructure
- Application Startup
main.go - GORM Repository
internal/database/implementation.go - PostgreSQL
- Configuration
config/env.go - Database Setup
config/db.go - Application Logger
internal/logger/logger.go - HTTP Utilities
internal/utils/httputil/utils.go
Database Migration
- Migration Command
cmd/migrate.go - Schema Migrations
migrations
Other components
- API Client
Connections 22
- API Client → HTTP Server: sends requests
api/server.go - HTTP Server → Versioned Routes: mounts routes
api/server.go - Versioned Routes → Token Handlers: registers endpoints
api/v1/routes.go - Versioned Routes → Hello Handler: registers endpoint
api/v1/routes.go - Token Handlers → Token Service: calls
api/v1/handlers/data_ingest/data_ingest.go - Token Handlers → API Responses: formats replies
api/v1/handlers/data_ingest/data_ingest.go - Hello Handler → API Responses: uses response helpers
api/v1/handlers/hello/hello.go - Token Service → GORM Repository: reads and writes
internal/services/data_ingest/data_ingest.go - Token Service → Airbyte Provider: requests token
internal/services/data_ingest/data_ingest.go - Token Service → Application Logger: logs failures
internal/services/data_ingest/data_ingest.go - GORM Repository → Token Record: maps records
internal/database/implementation.go - GORM Repository → PostgreSQL: queries
- Airbyte Provider → HTTP Utilities: sends request
external/data_ingest/airbyte.go - Application Startup → Configuration: loads config
main.go - Application Startup → Database Setup: opens database
main.go - Application Startup → GORM Repository: creates repository
main.go - Application Startup → Airbyte Provider: creates provider
main.go - Application Startup → Application Logger: initializes logger
main.go - Application Startup → HTTP Server: starts server
main.go - Migration Command → Configuration: loads config
cmd/migrate.go - Migration Command → Schema Migrations: applies migrations
README.md - Migration Command → PostgreSQL: migrates schema
cmd/migrate.go