{"id":30899880,"url":"https://github.com/aejkatappaja/workout_tracker","last_synced_at":"2026-05-06T18:31:27.703Z","repository":{"id":313100388,"uuid":"1050044834","full_name":"Aejkatappaja/workout_tracker","owner":"Aejkatappaja","description":"Production-ready workout tracker API in Go with clean architecture, authentication, and PostgreSQL. Built for scalability and maintainability.","archived":false,"fork":false,"pushed_at":"2025-09-03T21:49:41.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-03T23:28:57.993Z","etag":null,"topics":["api","clean-architecture","docker","go","jwt","middleware","postgresql","rest","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aejkatappaja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-03T21:38:18.000Z","updated_at":"2025-09-03T22:05:51.000Z","dependencies_parsed_at":"2025-09-03T23:28:59.817Z","dependency_job_id":"67565731-1e47-42e5-969c-fede4136e219","html_url":"https://github.com/Aejkatappaja/workout_tracker","commit_stats":null,"previous_names":["aejkatappaja/workout_tracker"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Aejkatappaja/workout_tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aejkatappaja%2Fworkout_tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aejkatappaja%2Fworkout_tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aejkatappaja%2Fworkout_tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aejkatappaja%2Fworkout_tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aejkatappaja","download_url":"https://codeload.github.com/Aejkatappaja/workout_tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aejkatappaja%2Fworkout_tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274243015,"owners_count":25248148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","clean-architecture","docker","go","jwt","middleware","postgresql","rest","testing"],"created_at":"2025-09-09T04:11:18.793Z","updated_at":"2026-05-06T18:31:27.698Z","avatar_url":"https://github.com/Aejkatappaja.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"  # Workout Tracker API\n\n  REST API in Go for tracking workouts and exercises. Bearer token auth, CRUD on workouts with exercise entries, PostgreSQL storage.\n\n  ## Stack\n\n  - **Go 1.24** with [Chi](https://github.com/go-chi/chi) router\n  - **PostgreSQL** with [pgx](https://github.com/jackc/pgx) driver\n  - **[Goose](https://github.com/pressly/goose)** for migrations\n  - **Docker Compose** for local dev (app DB + test DB)\n\n  ## API\n\n  | Method | Route | Auth | Description |\n  |--------|-------|------|-------------|\n  | `POST` | `/users` | — | Register |\n  | `POST` | `/tokens/authentication` | — | Login (get bearer token) |\n  | `GET` | `/workouts/{id}` | Bearer | Get workout with entries |\n  | `POST` | `/workouts` | Bearer | Create workout |\n  | `PUT` | `/workouts/{id}` | Bearer | Update workout |\n  | `DELETE` | `/workouts/{id}` | Bearer | Delete workout |\n  | `GET` | `/health` | — | Health check |\n\n  ## Data model\n\n  Workouts contain exercise entries. Each entry tracks either **reps** or **duration** (mutually exclusive, enforced by a `CHECK` constraint).\n\n  - `users` → `tokens` (bearer, SHA-256 hashed, scoped, expirable)\n  - `users` → `workouts` → `workout_entries` (sets, reps/duration, weight, order)\n\n  ## Run\n\n  ```bash\n  docker compose up -d\n  go run migrations/fs.go  # apply migrations\n  go run main.go           # starts on :8080\n\n  Test\n\n  docker compose up -d     # test_db runs on :5433\n  go test ./...\n\n  Project structure\n\n  internal/\n  ├── api/          # HTTP handlers\n  ├── app/          # App config, DI wiring\n  ├── middleware/    # Auth middleware (bearer token)\n  ├── routes/       # Route definitions\n  ├── store/        # PostgreSQL repositories (interface-based)\n  ├── tokens/       # Token generation + hashing\n  └── utils/        # Request/response helpers\n  migrations/       # Goose SQL migrations\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faejkatappaja%2Fworkout_tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faejkatappaja%2Fworkout_tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faejkatappaja%2Fworkout_tracker/lists"}