How nersus15/webcore-go works
WebCoreGo is a pluggable Go/Fiber API framework. Its principal workflow starts with an HTTP request, applies global middleware and authentication, checks authorization, and dispatches onward to registered module routes. At startup, the app initializes shared libraries and modules before listening; configuration and library/module interfaces support that composition. Authentication is the clearest sampled feature branch, including credential validation, user lookup, access control, and optional sessions. README-described capabilities such as CORS and external database, Redis, Kafka, and Pub/Sub drivers are not represented as implementations because their source paths are absent from this tree.
Main entry points: authn.go Authentication manager · app.go Application · auth.go Auth middleware · module.go Module manager
Components 20
HTTP Runtime
- Application
app/core/app.go - Global middleware
infra/middleware/middleware.go - Auth middleware
infra/middleware/auth.go - Fiber server
app/core/app.go
Modules And Libraries
- Module manager
app/core/module.go - Library manager
app/core/library.go - Pluggable modules
app/core/module.go
Authentication
- Authentication manager
adapter/auth/authn/authn.go - Credential validators
adapter/auth/apikey/validator.go - Basic validator
adapter/auth/basic/validator.go - User authenticator
port/auth/authn.go - Auth store
adapter/authstore/store/store.go - YAML backend
adapter/authstore/yaml/backend.go - RBAC / ABAC
port/auth/authz.go - Session manager
adapter/authsession/session/session.go - Memory session store
adapter/authsession/cache/storage.go
Configuration And Ports
- Config loader
infra/config/interface.go - Dependency ports
port/conn.go - Cache provider
Other components
- API client
Connections 20
- API client → Fiber server: sends requests
- Application → Fiber server: creates and serves
- Application → Global middleware: sets up
- Application → Module manager: initializes and routes
- Application → Library manager: loads and destroys
- Application → Auth middleware: installs auth
- Fiber server → Auth middleware: runs protected requests
- Auth middleware → Authentication manager: gets handler
- Authentication manager → Credential validators: validates credentials
- Authentication manager → User authenticator: checks user
- User authenticator → Auth store: looks up user
- Auth store → YAML backend: uses backend
- Authentication manager → RBAC / ABAC: checks access
- Authentication manager → Fiber server: continues request
- Authentication manager → Session manager: loads optional sessions
- Session manager → Memory session store: uses store
- Memory session store → Cache provider: reads and writes
- Module manager → Pluggable modules: initializes modules
- Config loader → Application: provides settings
- Library manager → Dependency ports: loads implementations