How msayib/fibernote works
Project type and purpose
• This is a backend‐only RESTful API (“Note App”) written in Go.
• It uses Go Fiber for the HTTP server, GORM for ORM/database access, and Viper for configuration.
• Its sole purpose is to expose CRUD endpoints for “notes.”
File structure
• main.go: entry point that ties everything together.
• controllers/note.controller.go: HTTP handlers (CRUD).
• models/note.model.go: GORM model definition for Note.
• initializers/loadEnv.go: reads environment variables via Viper.
• initializers/db.go: sets up the DB connection via GORM.
• docker-compose.yml + app.env.example: containerized database and examples of environment variables.
• go.mod/go.sum, .gitignore, README.md: metadata and configuration.
README for additional insights
• Confirms usage of Go Fiber, GORM, and Viper.
• Mentions “air” (live‐reload) for development.
Final Recommendations
• Be exhaustive in component separation: show the Viper config loader and Docker Compose as distinct modules.
• Environment file → Viper → DB connection under a “Configuration” cluster.
• Don’t overthink—break the system into all logical pieces so stakeholders see exactly how requests travel through the app.