How adriankiv/go-portoapi works
This is a Go/Gin portfolio-content API. Clients can browse achievements/certifications, experience, and featured projects; authenticated users can manage those records, while registration and login provide credentials and JWTs for protected operations. Featured-project images are stored through ImageKit. The two entry points configure overlapping routes: main.go runs a Gin server, while api/index.go exposes a serverless handler. Source excerpts show the domain handlers and persistence calls; no README is present, and unexcerpted modules are not mapped beyond what the routes establish.
Main entry points: main.go Gin server · index.go Serverless handler · fea_controller.go Featured project handlers · user_controller.go Auth handlers
Components 16
HTTP entry points
- Gin server
main.go - Serverless handler
api/index.go
Authentication
- Auth handlers
controllers/user_controller.go - JWT middleware
middleware/auth_middleware.go - User model
models/user.go
Portfolio content
- Achievement handlers
controllers/ac_controller.go - Achievement model
models/achievements&certifications.go - Experience handlers
controllers/expe_controller.go - Experience model
models/experience.go - Featured project handlers
controllers/fea_controller.go - Featured project model
models/featuredprojects.go - Duplicate project handlers
controller/fea_controller.go
Persistence and media
- DB connection setup
config/db.go - PostgreSQL database
- ImageKit media
Other components
- API client
Connections 25
- API client → Gin server: sends requests
main.go - API client → Serverless handler: sends requests
api/index.go - Gin server → DB connection setup: connects database
main.go - Serverless handler → DB connection setup: connects database
api/index.go - Gin server → Auth handlers: routes auth
main.go - Gin server → Achievement handlers: routes content
main.go - Gin server → Experience handlers: routes content
main.go - Gin server → Featured project handlers: routes content
main.go - Serverless handler → Auth handlers: routes login
api/index.go - Serverless handler → Achievement handlers: routes content
api/index.go - Serverless handler → Experience handlers: routes content
api/index.go - Serverless handler → Featured project handlers: routes content
api/index.go - Gin server → JWT middleware: protects routes
main.go - Serverless handler → JWT middleware: protects routes
api/index.go - Auth handlers → User model: uses model
controllers/user_controller.go - Auth handlers → PostgreSQL database: reads and writes
controllers/user_controller.go - JWT middleware → API client: rejects invalid token
middleware/auth_middleware.go - Achievement handlers → Achievement model: reads and writes
controllers/ac_controller.go - Achievement handlers → PostgreSQL database: reads and writes
controllers/ac_controller.go - Experience handlers → Experience model: reads and writes
controllers/expe_controller.go - Experience handlers → PostgreSQL database: reads and writes
controllers/expe_controller.go - Featured project handlers → Featured project model: reads and writes
controllers/fea_controller.go - Featured project handlers → PostgreSQL database: reads and writes
controllers/fea_controller.go - Featured project handlers → ImageKit media: uploads and deletes
controllers/fea_controller.go - DB connection setup → PostgreSQL database: opens and migrates
config/db.go