{"id":15294941,"url":"https://github.com/igorhoffmann/gms-app","last_synced_at":"2026-05-04T20:40:58.547Z","repository":{"id":44342297,"uuid":"512149604","full_name":"igorhoffmann/gms-app","owner":"igorhoffmann","description":"👨‍💻 REST API for Gym Management System ","archived":false,"fork":false,"pushed_at":"2022-08-25T12:04:57.000Z","size":108,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T11:03:27.299Z","etag":null,"topics":["clean-ar","docker","dockerfile","dokcer-compose","gin","go","golang","golang-api","golang-examples","golang-jwt","golang-jwt-a","golang-migrate","golang-rest","jwt","jwt-authentication","makefile","rest-api","sql","sqlx"],"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/igorhoffmann.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}},"created_at":"2022-07-09T09:50:16.000Z","updated_at":"2023-09-11T17:19:26.000Z","dependencies_parsed_at":"2022-08-03T22:30:27.004Z","dependency_job_id":null,"html_url":"https://github.com/igorhoffmann/gms-app","commit_stats":null,"previous_names":["igorgofman/gms-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/igorhoffmann/gms-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorhoffmann%2Fgms-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorhoffmann%2Fgms-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorhoffmann%2Fgms-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorhoffmann%2Fgms-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorhoffmann","download_url":"https://codeload.github.com/igorhoffmann/gms-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorhoffmann%2Fgms-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32624684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["clean-ar","docker","dockerfile","dokcer-compose","gin","go","golang","golang-api","golang-examples","golang-jwt","golang-jwt-a","golang-migrate","golang-rest","jwt","jwt-authentication","makefile","rest-api","sql","sqlx"],"created_at":"2024-09-30T17:08:02.583Z","updated_at":"2026-05-04T20:40:58.515Z","avatar_url":"https://github.com/igorhoffmann.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API \"Gym Management System\" on Go\n\nThe application implements a service for sending methods GET, POST, DELETE, PUT to interact with the database, which is described in this \u003ca href=\"https://github.com/igorgofman/gms-app/blob/master/schema/000001_init.up.sql\"\u003efile\u003c/a\u003e. Additionally implemented authorization and authentication using jwt.\n\n## API:\n\n### POST /auth/sign-up\n\nCreates new user \n\n##### Example Input: \n```\n{\n\t\"username\": \"UncleBob\",\n\t\"password\": \"cleanArch\"\n} \n```\n\n\n### POST /auth/sign-in\n\nRequest to get JWT Token based on user credentials\n\n##### Example Input: \n```\n{\n\t\"username\": \"UncleBob\",\n\t\"password\": \"cleanArch\"\n} \n```\n\n##### Example Response: \n```\n{\n\t\"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzEwMzgyMjQuNzQ0MzI0MiwidXNlciI6eyJJRCI6IjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMCIsIlVzZXJuYW1lIjoiemhhc2hrZXZ5Y2giLCJQYXNzd29yZCI6IjQyODYwMTc5ZmFiMTQ2YzZiZDAyNjlkMDViZTM0ZWNmYmY5Zjk3YjUifX0.3dsyKJQ-HZJxdvBMui0Mzgw6yb6If9aB8imGhxMOjsk\"\n} \n```\n\n### POST /api/info\n\nCreates new info\n\n##### Example Input: \n\n###### Case instructor:\n```\n{\n      \"first_name\": \"Marlon\",\n      \"last_name\": \"Brando\",\n      \"relationship\": \"istructor\",\n      \"phone\": \"+380000000000\",\n      \"date_of_birth\": \"03.04.1998\",\n      \"salary\": 3000\n} \n```\n###### Case member:\n```\n{\n      \"first_name\": \"Steven\",\n      \"last_name\": \"Jobs\",\n      \"relationship\": \"member\",\n      \"phone\": \"+380000000001\",\n      \"date_of_birth\": \"07.08.2000\",\n      \"membership_id\": 1,\n      \"expires_at\": \"16.11.2022\"\n} \n```\n\n### GET /api/info\n\nReturns all user info\n\n##### Example Response: \n```\n{\n\t\"info\": [\n            {\n                \"id\": 1\n                \"first_name\": \"Marlon\",\n                \"last_name\": \"Brando\",\n                \"middle_name\": \"\",\n                \"relationship\": \"istructor\",\n                \"phone\": \"+380000000000\",\n                \"date_of_birth\": \"03.04.1998\",\n                \"date_of_registry\": \"16.08.2022\",\n                \"hire_date\": \"16.08.2022\",\n                \"salary\": 3000\n            }\n    ]\n} \n```\n\n### DELETE /api/info\n\nDeletes info by ID:\n\n##### Example Input: \n```\n{\n\t\"id\": \"1\"\n} \n```\n\n\n## Requirements\n- go 1.18\n- docker \u0026 docker-compose\n- postman (for testing)\n\n\n## To launch an application:\n\n```\nmake build \u0026\u0026 make run\n```\n\nIf the application is running for the first time, you need to apply migrations to the database:\n\n```\nmake migrate\n```\n\n## \u003ca href=\"https://github.com/igorgofman/DB-CNTU/blob/main/info-backup.sql\"\u003eTest data\u003c/a\u003e\n\nYou can simply copy and paste the contents of the file in the terminal, opening the desired database.\n\nIf you're using Git Bash on Windows and don't have a ```make``` command in the terminal, I recommend this \u003ca href=\"https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058#make\"\u003eguide\u003c/a\u003e.\n\n\n## Application testing\n\nThe \u003ca href=\"https://github.com/igorgofman/gms-app/postman\"\u003epostman\u003c/a\u003e folder contains a collection for testing the application. Postman \u003ca href=\"https://www.postman.com/downloads/\"\u003edownload link\u003c/a\u003e.\n\n\n\n### P.s.\nInspired by \u003ca href=\"https://github.com/zhashkevych/todo-app\"\u003eMaksim Zhashkevych\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorhoffmann%2Fgms-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorhoffmann%2Fgms-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorhoffmann%2Fgms-app/lists"}