{"id":20065292,"url":"https://github.com/westrachel/training-log","last_synced_at":"2026-05-15T21:36:10.033Z","repository":{"id":154542198,"uuid":"630048824","full_name":"westrachel/training-log","owner":"westrachel","description":"Training log application for tracking progressive overload training built with Ruby, Sinatra, and PostgreSQL.","archived":false,"fork":false,"pushed_at":"2023-04-20T02:29:33.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-24T07:00:40.646Z","etag":null,"topics":["erb","postgresql","ruby","sinatra"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/westrachel.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}},"created_at":"2023-04-19T14:59:43.000Z","updated_at":"2023-04-24T15:03:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd2a9bfb-e3fa-4424-8d01-b7adf4b78ae3","html_url":"https://github.com/westrachel/training-log","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/westrachel/training-log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westrachel%2Ftraining-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westrachel%2Ftraining-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westrachel%2Ftraining-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westrachel%2Ftraining-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/westrachel","download_url":"https://codeload.github.com/westrachel/training-log/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/westrachel%2Ftraining-log/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33080777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["erb","postgresql","ruby","sinatra"],"created_at":"2024-11-13T13:49:41.465Z","updated_at":"2026-05-15T21:36:10.015Z","avatar_url":"https://github.com/westrachel.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Overview:\n\nWelcome to the Training Log Application!\n\nThe purpose of this application is to give users the ability to track information for\ntheir respective workouts in order to assist in their progressive overload training.\nOnce a user has registered and logged in, they will be able to navigate through various\npage(s) of the training log that shows up to 10 workouts per page and on each page, they\ncan click the 'View Workout' link associated with a workout to see more information about\nthat workout, like the exercises it contains.\n\nCRUD access is not universally available. Specifically, once logged in, a user can only\ncreate, update, and delete workouts and exercises that are associated with their specific\nuser account. A workout is tied to 1 user. A user can only read another user's records.\nThis choice was made, so that no user can mess with another user's workout information.\nUsers are allowed to view other users' workouts in order to gain inspiration and new\nexercise ideas to potentially add to their own routine. In terms of CRUD, a user can also\ndelete their user record and all associated workout and exercise data.\n\n# Version Info:\n\n- PostgreSQL: 9.6.22\n- Ruby: 2.6.3\n- Browser: Google Chrome Version 100.0.4896.88\n\n# How To Run The Application:\n\n### Part 1: Setting Up the SQL Database + Installing Dependencies\n\nBrief Overview:\nThe database consists of 3 tables and two 1:Many relationships:\n\n- A user can have many workouts, but a workout is tied to only one user.\n- A workout can have many exercises, but an exercise is associated with only one workout.\n\ni. Ensure PostgreSQL is running by executing the following in the terminal:\n`sudo service postgresql96 start`\n\nii. Create a new database with the appropriate name by executing the following in the terminal:\n`sudo -u postgres createdb training_log`\n\niii. Integrate the desired table schemas and initial seed data into the `training_log` database by executing the following from the terminal:\n`sudo -u postgres psql -d training_log \u003c schema.sql`\n\niv. Navigate into the training_log folder:\n`cd training_log`\n\nv. Once in the training_log folder, execute the following from the terminal to install all gem dependencies required for this application.\n`bundle install`\n\n### Part 2: Use the App\n\ni. Within the `training_log` folder, execute the following command from the terminal:\n`ruby workouts.rb`\n\nii. Signup and register a new test account to start tracking workouts!\n\nNote:\n\n- If you don't enter a specific url to be redirected to prior to logging in, then by default, after logging in, you will be redirected to `/training_log/1/workouts`.\n- From `/training_log/1/workouts`, you can:\n  - log a new workout\n  - navigate to other training log pages to see other workouts\n  - or you can click on 'View Workout' to see the exercises associated with a specific workout; if the particular workout viewed is associated with your user record then you can:\n    - edit details about that workout\n    - delete the workout\n    - edit an exercise tied to that workout\n    - add an exercise to the workout (assuming it doesn't have 10 exercises yet)\n    - delete an exercise from the workout\n\n# Other Design Choices and Their Tradeoffs:\n\ni. 10 workouts are loaded per page and are sorted alphabetically by associated username and\nthen descendingly by date of workout. Specifically, when a user is examining their\nworkout records within a training log page, their most recent workout will be topmost\nrelative to all of their other workout records. This ordering choice was selected with\nprogressive overload training in mind; a main focus of progressive overload training is\nto increase workout intensity over time. As a result, a user will be most interested in\nvisiting their most recent workout(s) in order to plan for their next workout, so that\nthey can increase either the number of sets, reps, or weights they use relative to what\nthey used for their most recent workout.\n\nii. A further enhancement considered, but not pursued, would be to allow for filtering to\nworkouts only associated with a particular user and/or to allow for quick searching to a\nnew page number. Currently, a user with a name that's at the end of the alphabet will have\nto flip through single pages using the 'prior page' and 'next page' navigation buttons, or\nby randomly guessing what training_log page number their workouts start to appear on, and\nentering that page number in the url (in the format: /training_log/:pagenumber/workouts),\nwhich could make for a poor user experience if this application were to scale sizably to\nmore users. If this application were to scale, these further enhancements to page navigation\nwould be pursued.\n\niii. A user will not need to enter \u003e10 exercises per workout. The choice to limit the number\nof exercises added per workout was based on actual training. A demanding workout can be\nachieved with 4 exercises only, so it seemed reasonable to set a cap.\n\niv. A user is not allowed to add more than 1 workout per day. Bodybuilders and some athletes\nmay do 2+ workouts in a day, so there could be a need to allow for \u003e1 workout per day, but\nthe assumption is that the current userbase is satisfied with the capability of logging one\nworkout per day.\n\nv. Checks have been added to help ensure that the user enters valid exercise and workout content.\nHowever, more robust validation could potentially be added for checking descriptions. For\nexample, I currently have added checks to ensure that for one workout, a user can't log\n'Bench Press.', 'Bench Press', and 'BenchPress'. However, it is currently possible for\nusers to enter nonsensical strings, like 'broccoli', for both an exercise's description and\na workout's name. I considered changing the input for exercise description and workout name to\ndropdown formats with constrained options, but didn't pursue this due to the vast amount of\npossible exercises and the desire for a user to be able to able to enter their specific\nterminology that I may not be aware of.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwestrachel%2Ftraining-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwestrachel%2Ftraining-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwestrachel%2Ftraining-log/lists"}