This application is a simple Workout App built in Go to showcase my skills in utilizing the Go programming language. It demonstrates routing, database management, and health check functionality with a modular structure.
- REST API implementation.
- Modular structure for scalability and maintainability.
- Database integration and utility functions.
- Health check endpoint for monitoring uptime.
- Easy-to-understand codebase for learning and experimentation.
- Language: Go (Golang)
- Database: Postgres, goose(for migrations)
- Additional Tools/Packages: go-chi
.
├── internal # Compiled files (alternatively `dist`)
│ ├── api # Route handler
│ ├── app # application's core components, including the database, logger, API handlers, and health check functionality.
│ ├── routes # Api End-points
│ ├── store # Database connections
│ └── utils # Utilities
├── migrations # Migrations directory
└── README.md
Make sure you have the following installed on your machine before running the application:
- Go (version 1.23 or later)
- (Add any other necessary installations, such as Docker/Postgres if applicable.)
- (Include details of third-party packages required by the app and how they can be installed.)
-
Clone this repository to your local system:
git clone <repository-url> cd <repository-folder>
-
Run the following command to download all dependencies:
go mod tidy
-
Configure your database (if applicable) by editing the configuration file.
-
Run the application:
go run main.go
-
Access endpoints using tools like curl, Postman, or a web browser.
For example:
GET /health
- Returns app health status.
Method | Endpoint | Description |
---|---|---|
GET | /health | Health check endpoint |
POST | /workouts | Create a workout |
GET | /workouts | List all workouts |
(Add more as needed.)
If your application has migrations, include instructions for handling them:
- To apply database migrations, run:
(Add command or tool, e.g., migrate up, sqlc, etc.)