{"id":14972582,"url":"https://github.com/conorheffron/booking-sys","last_synced_at":"2026-05-09T19:15:20.332Z","repository":{"id":255498038,"uuid":"850363843","full_name":"conorheffron/booking-sys","owner":"conorheffron","description":"Sample Reservations \u0026 Bookings Viewer System (Python / Django API \u0026 React TypeScript UI)","archived":false,"fork":false,"pushed_at":"2026-01-10T17:49:07.000Z","size":4876,"stargazers_count":32,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T05:11:23.318Z","etag":null,"topics":["azure","azure-container-apps","azure-container-registry","django-admin-interface","django-framework","django-project","django-test","docker-container","fetch-api","json-api","node","pylint","python-3","react","react-typescript","sonarcloud","sonarqube","swagger-openapi","typescript","vitejs-react"],"latest_commit_sha":null,"homepage":"https://booking-sys-ebgefrdmh3afbhee.northeurope-01.azurewebsites.net/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conorheffron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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},"funding":{"github":["conorheffron"]}},"created_at":"2024-08-31T15:08:52.000Z","updated_at":"2026-01-10T21:10:12.000Z","dependencies_parsed_at":"2024-09-05T20:16:43.428Z","dependency_job_id":"02b2cd3c-500c-463f-8f14-e292c1f4fa40","html_url":"https://github.com/conorheffron/booking-sys","commit_stats":{"total_commits":74,"total_committers":1,"mean_commits":74.0,"dds":0.0,"last_synced_commit":"11b0d268c18c5735752cbe77089deeade1cb2b9b"},"previous_names":["conorheffron/booking-sys"],"tags_count":99,"template":false,"template_full_name":null,"purl":"pkg:github/conorheffron/booking-sys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorheffron%2Fbooking-sys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorheffron%2Fbooking-sys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorheffron%2Fbooking-sys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorheffron%2Fbooking-sys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conorheffron","download_url":"https://codeload.github.com/conorheffron/booking-sys/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorheffron%2Fbooking-sys/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28646946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"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":["azure","azure-container-apps","azure-container-registry","django-admin-interface","django-framework","django-project","django-test","docker-container","fetch-api","json-api","node","pylint","python-3","react","react-typescript","sonarcloud","sonarqube","swagger-openapi","typescript","vitejs-react"],"created_at":"2024-09-24T13:47:09.945Z","updated_at":"2026-05-09T19:15:20.317Z","avatar_url":"https://github.com/conorheffron.png","language":"TypeScript","funding_links":["https://github.com/sponsors/conorheffron"],"categories":["TypeScript"],"sub_categories":[],"readme":"# booking-sys\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n[![Build and deploy container app to Azure Web App - booking-sys](https://github.com/conorheffron/booking-sys/actions/workflows/main_booking-sys.yml/badge.svg)](https://github.com/conorheffron/booking-sys/actions/workflows/main_booking-sys.yml)\n\n[![Django CI](https://github.com/conorheffron/booking-sys/actions/workflows/django.yml/badge.svg)](https://github.com/conorheffron/booking-sys/actions/workflows/django.yml)\n\n[![Pylint](https://github.com/conorheffron/booking-sys/actions/workflows/pylint.yml/badge.svg)](https://github.com/conorheffron/booking-sys/actions/workflows/pylint.yml)\n\n[![Node.js CI](https://github.com/conorheffron/booking-sys/actions/workflows/node.js.yml/badge.svg)](https://github.com/conorheffron/booking-sys/actions/workflows/node.js.yml)\n\n[![Node.js Package](https://github.com/conorheffron/booking-sys/actions/workflows/npm-publish-packages.yml/badge.svg)](https://github.com/conorheffron/booking-sys/actions/workflows/npm-publish-packages.yml)\n\n[![Docker Image CI](https://github.com/conorheffron/booking-sys/actions/workflows/docker-image.yml/badge.svg)](https://github.com/conorheffron/booking-sys/actions/workflows/docker-image.yml)\n\n[![Docker Publish](https://github.com/conorheffron/booking-sys/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/conorheffron/booking-sys/actions/workflows/docker-publish.yml)\n\n[![CodeQL Advanced](https://github.com/conorheffron/booking-sys/actions/workflows/codeql.yml/badge.svg)](https://github.com/conorheffron/booking-sys/actions/workflows/codeql.yml)\n\n### SonarQube\n\n[![Build](https://github.com/conorheffron/booking-sys/actions/workflows/sonar.yml/badge.svg)](https://github.com/conorheffron/booking-sys/actions/workflows/sonar.yml)\n\n[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=conorheffron_booking-sys)](https://sonarcloud.io/summary/new_code?id=conorheffron_booking-sys)\n\n[Sonar Cloud Overall Code Summary](https://sonarcloud.io/summary/overall?id=conorheffron_booking-sys\u0026branch=main)\n\n## Technologies\n - python3, django 6 admin/framework, django.test, React 18, TypeScipt, \u0026 MySQL Server / Sqlite2\n\n## Project Structure (Backend Skeleton)\n```shell\nbackend\n├── Pipfile\n├── booking-sys\n│   ├── asgi.py\n│   ├── settings.py\n│   ├── urls.py\n│   └── wsgi.py\n├── db.sqlite3\n├── hr\n│   ├── admin.py\n│   ├── apps.py\n│   ├── forms.py\n│   ├── models.py\n│   ├── test_apis.py\n│   ├── test_forms.py\n│   ├── time_utils.py\n│   ├── urls.py\n│   └── views.py\n└── manage.py\n```\n\n - See the frontend README.md [here](./frontend/README.md)\n\n### Buil \u0026 Run via Docker\n#### - Update 'DEBUG' in .env to True\n```shell\ndocker image build -t booking-sys .\ndocker compose up -d\ndocker compose down\n```\n\n##### Expose API \u0026 UI\n```shell\ndocker build -t booking-sys .\ndocker run -p 8000:8000 -p 5173:5173 booking-sys\n```\n\n##### Expose UI only oustide container\n```shell\n# dont need to expose API, can reach within container\ndocker build -t booking-sys .\ndocker run -p 5173:5173 booking-sys\n```\n\n## Generate requirements.txt\n```shell\npipenv run pip freeze \u003e requirements.txt\n```\n\n## Build Steps for pip environment.\n```shell\ncd booking-sys/backend/\nsudo pipenv shell\npipenv install -r requirements.txt\n```\n\n## Create DB Schema on MySQL via Mac (mysql client for CLI)\n### Start MySQL server\n```shell\nbrew services start mysql\n```\n\n### Create `reservations` DB\n```sql\nmysql -u root -p \nCREATE DATABASE reservations;\nexit;\n```\n\n### Restart or Stop MySQL server as needed\n```shell\nbrew services stop mysql\n```\n\n## Apply model changes to DB\n```shell\npython3 manage.py makemigrations\npython3 manage.py migrate\npython3 manage.py showmigrations\n```\n\n## Run Pylint\n```shell\npipenv run pylint $(git ls-files '*.py') --generated-members=objects --fail-under=9.2\n```\n\n## Run All Unit Tests\n```shell\npython3 manage.py test\n```\n\n## Run Test Class or specific Test Case\n```shell\npython3 manage.py test hr.test_apis.ApiTests\npython3 manage.py test hr.test_apis.ApiTests.test_version_success\npython3 manage.py test hr.test_forms.TestEditReservationForm\npython3 manage.py test hr.test_forms.TestReservationForm\n```\n\n## Run Django Application\n```shell\npython3 manage.py runserver\n```\n\n## Sample Logs from VS Code Console via `docker compose up`\n```shell\n[+] Running 1/1\n ! app Warning pull access denied for booking-sys, repository does not exist or may require 'docker login'                                                                                       1.3s \nCompose can now delegate builds to bake for better performance.\n To do so, set COMPOSE_BAKE=true.\n[+] Building 16.1s (17/17) FINISHED                                                                                                                                              docker:desktop-linux\n =\u003e [app internal] load build definition from Dockerfile                                                                                                                                         0.0s\n =\u003e =\u003e transferring dockerfile: 983B                                                                                                                                                             0.0s\n =\u003e [app internal] load metadata for docker.io/library/python:3.13-slim                                                                                                                          0.6s\n =\u003e [app internal] load .dockerignore                                                                                                                                                            0.0s\n =\u003e =\u003e transferring context: 2B                                                                                                                                                                  0.0s\n =\u003e [app  1/11] FROM docker.io/library/python:3.13-slim@sha256:f2fdaec50160418e0c2867ba3e254755edd067171725886d5d303fd7057bbf81                                                                  0.0s\n =\u003e =\u003e resolve docker.io/library/python:3.13-slim@sha256:f2fdaec50160418e0c2867ba3e254755edd067171725886d5d303fd7057bbf81                                                                        0.0s\n =\u003e [app internal] load build context                                                                                                                                                            1.2s\n =\u003e =\u003e transferring context: 1.02MB                                                                                                                                                              1.2s\n =\u003e CACHED [app  2/11] RUN apt-get update \u0026\u0026     apt-get install -y --no-install-recommends       default-libmysqlclient-dev build-essential pkg-config curl \u0026\u0026     curl -fsSL https://deb.node  0.0s\n =\u003e CACHED [app  3/11] COPY backend/requirements.txt /backend/                                                                                                                                   0.0s\n =\u003e CACHED [app  4/11] RUN pip install --upgrade pip \u0026\u0026 pip install -r /backend/requirements.txt                                                                                                 0.0s\n =\u003e CACHED [app  5/11] COPY frontend/package*.json /frontend/                                                                                                                                    0.0s\n =\u003e CACHED [app  6/11] RUN npm --prefix /frontend install                                                                                                                                        0.0s\n =\u003e CACHED [app  7/11] COPY backend/ /backend/                                                                                                                                                   0.0s\n =\u003e CACHED [app  8/11] COPY frontend/ /frontend/                                                                                                                                                 0.0s\n =\u003e CACHED [app  9/11] RUN cd backend \u0026\u0026 python manage.py collectstatic --noinput                                                                                                                0.0s\n =\u003e CACHED [app 10/11] COPY entrypoint.sh /entrypoint.sh                                                                                                                                         0.0s\n =\u003e CACHED [app 11/11] RUN chmod +x /entrypoint.sh                                                                                                                                               0.0s\n =\u003e [app] exporting to image                                                                                                                                                                    14.0s\n =\u003e =\u003e exporting layers                                                                                                                                                                          0.0s\n =\u003e =\u003e exporting manifest sha256:cce67f7a8e97f6268c4d90b21f31c57393184d0e75ad9a9f22acdf15b0ee3a3f                                                                                                0.0s\n =\u003e =\u003e exporting config sha256:d3cdf8db09be519aa45c11a4e5f0f64011c2ce287921f972860b4789e9b43f27                                                                                                  0.0s\n =\u003e =\u003e naming to docker.io/library/booking-sys:latest                                                                                                                                            0.0s\n =\u003e =\u003e unpacking to docker.io/library/booking-sys:latest                                                                                                                                        14.0s\n =\u003e [app] resolving provenance for metadata file                                                                                                                                                 0.0s\n[+] Running 3/3\n ✔ app                          Built                                                                                                                                                            0.0s \n ✔ Network booking-sys_default  Created                                                                                                                                                          0.1s \n ✔ Container booking-sys        Created                                                                                                                                                          1.0s \nAttaching to booking-sys\nbooking-sys  | System check identified some issues:\nbooking-sys  | \nbooking-sys  | WARNINGS:\nbooking-sys  | ?: (staticfiles.W004) The directory '/backend/staticfiles' in the STATICFILES_DIRS setting does not exist.\nbooking-sys  | \nbooking-sys  | 0 static files copied to '/backend/hr/static', 127 unmodified.\nbooking-sys  | INFO 2025-06-15 00:04:28,827 autoreload 10 140691409173376 Watching for file changes with StatReloader\nbooking-sys  | System check identified some issues:\nbooking-sys  | \nbooking-sys  | WARNINGS:\nbooking-sys  | ?: (staticfiles.W004) The directory '/backend/staticfiles' in the STATICFILES_DIRS setting does not exist.\nbooking-sys  | \nbooking-sys  | System check identified 1 issue (0 silenced).\nbooking-sys  | \nbooking-sys  | \u003e booking-sys-frontend@3.0.2 dev\nbooking-sys  | \u003e vite --host\nbooking-sys  | \nbooking-sys  | \nbooking-sys  |   VITE v6.3.5  ready in 269 ms\nbooking-sys  | \nbooking-sys  |   ➜  Local:   http://localhost:5173/\nbooking-sys  |   ➜  Network: http://172.18.0.2:5173/\n.\n.\n.\nbooking-sys  | INFO 2025-06-15 00:04:36,341 views 10 140691355207360 Request information (\u003cWSGIRequest: GET '/api/version/'\u003e)\nbooking-sys  | INFO 2025-06-15 00:04:36,362 views 10 140691355207360 Application version (3.0.3)\nbooking-sys  | INFO 2025-06-15 00:04:36,364 basehttp 10 140691355207360 \"GET /api/version/ HTTP/1.1\" 200 5\nbooking-sys  | INFO 2025-06-15 00:04:36,379 views 10 140691344721600 GET by date (2025-06-15) Query set results: [{'id': 2, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 15), 'reservation_slot': datetime.time(12, 30)}]\nbooking-sys  | INFO 2025-06-15 00:04:36,385 views 10 140691334235840 Request information (\u003cWSGIRequest: GET '/api/version/'\u003e)\nbooking-sys  | INFO 2025-06-15 00:04:36,388 views 10 140691334235840 Application version (3.0.3)\nbooking-sys  | INFO 2025-06-15 00:04:36,385 basehttp 10 140691344721600 \"GET /api/bookings?date=2025-06-15 HTTP/1.1\" 200 146\nbooking-sys  | INFO 2025-06-15 00:04:36,392 basehttp 10 140691334235840 \"GET /api/version/ HTTP/1.1\" 200 5\nbooking-sys  | INFO 2025-06-15 00:04:36,412 views 10 140691248252608 GET by date (2025-06-15) Query set results: [{'id': 2, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 15), 'reservation_slot': datetime.time(12, 30)}]\nbooking-sys  | INFO 2025-06-15 00:04:36,414 basehttp 10 140691248252608 \"GET /api/bookings?date=2025-06-15 HTTP/1.1\" 200 146\nbooking-sys  | INFO 2025-06-15 00:04:36,431 views 10 140691237766848 GET by date (2025-06-15) Query set results: [{'id': 2, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 15), 'reservation_slot': datetime.time(12, 30)}]\nbooking-sys  | INFO 2025-06-15 00:04:36,434 basehttp 10 140691237766848 \"GET /api/bookings?date=2025-06-15 HTTP/1.1\" 200 146\nbooking-sys  | INFO 2025-06-15 00:04:36,447 views 10 140691227281088 GET by date (2025-06-15) Query set results: [{'id': 2, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 15), 'reservation_slot': datetime.time(12, 30)}]\nbooking-sys  | INFO 2025-06-15 00:04:36,449 basehttp 10 140691227281088 \"GET /api/bookings?date=2025-06-15 HTTP/1.1\" 200 146\nbooking-sys  | INFO 2025-06-15 00:04:43,893 views 10 140691227281088 Request information (\u003cWSGIRequest: GET '/api/version/'\u003e)\nbooking-sys  | INFO 2025-06-15 00:04:43,894 views 10 140691227281088 Application version (3.0.3)\nbooking-sys  | INFO 2025-06-15 00:04:43,895 basehttp 10 140691227281088 \"GET /api/version/ HTTP/1.1\" 200 5\nbooking-sys  | INFO 2025-06-15 00:04:43,903 views 10 140691237766848 GET by future date (after 2025-06-15) Query set results: []\nbooking-sys  | INFO 2025-06-15 00:04:43,906 views 10 140691248252608 Request information (\u003cWSGIRequest: GET '/api/version/'\u003e)\nbooking-sys  | INFO 2025-06-15 00:04:43,906 views 10 140691248252608 Application version (3.0.3)\nbooking-sys  | INFO 2025-06-15 00:04:43,908 basehttp 10 140691237766848 \"GET /api/bookings HTTP/1.1\" 200 42\nbooking-sys  | INFO 2025-06-15 00:04:43,911 basehttp 10 140691248252608 \"GET /api/version/ HTTP/1.1\" 200 5\nbooking-sys  | INFO 2025-06-15 00:04:43,925 views 10 140691334235840 GET by future date (after 2025-06-15) Query set results: []\nbooking-sys  | INFO 2025-06-15 00:04:43,928 basehttp 10 140691334235840 \"GET /api/bookings HTTP/1.1\" 200 42\nbooking-sys  | INFO 2025-06-15 00:04:45,813 views 10 140691353110208 Request information (\u003cWSGIRequest: GET '/api/version/'\u003e)\nbooking-sys  | INFO 2025-06-15 00:04:45,813 views 10 140691353110208 Application version (3.0.3)\nbooking-sys  | INFO 2025-06-15 00:04:45,818 basehttp 10 140691353110208 \"GET /api/version/ HTTP/1.1\" 200 5\nbooking-sys  | INFO 2025-06-15 00:04:45,821 views 10 140691216795328 GET by date (2025-06-15) Query set results: [{'id': 2, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 15), 'reservation_slot': datetime.time(12, 30)}]\nbooking-sys  | INFO 2025-06-15 00:04:45,825 basehttp 10 140691216795328 \"GET /api/bookings?date=2025-06-15 HTTP/1.1\" 200 146\nbooking-sys  | INFO 2025-06-15 00:04:45,830 views 10 140691206309568 Request information (\u003cWSGIRequest: GET '/api/version/'\u003e)\nbooking-sys  | INFO 2025-06-15 00:04:45,830 views 10 140691206309568 Application version (3.0.3)\nbooking-sys  | INFO 2025-06-15 00:04:45,833 basehttp 10 140691206309568 \"GET /api/version/ HTTP/1.1\" 200 5\nbooking-sys  | INFO 2025-06-15 00:04:45,838 views 10 140691195823808 GET by date (2025-06-15) Query set results: [{'id': 2, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 15), 'reservation_slot': datetime.time(12, 30)}]\nbooking-sys  | INFO 2025-06-15 00:04:45,841 basehttp 10 140691195823808 \"GET /api/bookings?date=2025-06-15 HTTP/1.1\" 200 146\nbooking-sys  | INFO 2025-06-15 00:04:45,851 views 10 140691046926016 GET by date (2025-06-15) Query set results: [{'id': 2, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 15), 'reservation_slot': datetime.time(12, 30)}]\nbooking-sys  | INFO 2025-06-15 00:04:45,853 basehttp 10 140691046926016 \"GET /api/bookings?date=2025-06-15 HTTP/1.1\" 200 146\nbooking-sys  | INFO 2025-06-15 00:04:45,865 views 10 140691036440256 GET by date (2025-06-15) Query set results: [{'id': 2, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 15), 'reservation_slot': datetime.time(12, 30)}]\nbooking-sys  | INFO 2025-06-15 00:04:45,867 basehttp 10 140691036440256 \"GET /api/bookings?date=2025-06-15 HTTP/1.1\" 200 146\nbooking-sys  | INFO 2025-06-15 00:04:50,749 views 10 140691046926016 GET by date (2025-06-16) Query set results: []\nbooking-sys  | INFO 2025-06-15 00:04:50,751 basehttp 10 140691046926016 \"GET /api/bookings?date=2025-06-16 HTTP/1.1\" 200 42\nbooking-sys  | INFO 2025-06-15 00:04:53,700 basehttp 10 140691195823808 \"GET /api/csrf/ HTTP/1.1\" 200 49\nbooking-sys  | INFO 2025-06-15 00:04:53,722 basehttp 10 140691206309568 \"PUT /api/reservations HTTP/1.1\" 201 119\nbooking-sys  | INFO 2025-06-15 00:04:53,730 views 10 140691216795328 GET by date (2025-06-16) Query set results: [{'id': 3, 'first_name': 'Sade Song', 'reservation_date': datetime.date(2025, 6, 16), 'reservation_slot': datetime.time(11, 0)}]\nbooking-sys  | INFO 2025-06-15 00:04:53,732 basehttp 10 140691216795328 \"GET /api/bookings?date=2025-06-16 HTTP/1.1\" 200 144\nbooking-sys  | INFO 2025-06-15 00:05:00,536 views 10 140691353110208 GET by date (2025-06-19) Query set results: []\nbooking-sys  | INFO 2025-06-15 00:05:00,544 basehttp 10 140691353110208 \"GET /api/bookings?date=2025-06-19 HTTP/1.1\" 200 42\nbooking-sys  | INFO 2025-06-15 00:05:01,504 basehttp 10 140691342624448 \"GET /api/csrf/ HTTP/1.1\" 200 49\nbooking-sys  | INFO 2025-06-15 00:05:01,526 basehttp 10 140691332138688 \"PUT /api/reservations HTTP/1.1\" 201 121\nbooking-sys  | INFO 2025-06-15 00:05:01,536 views 10 140691248252608 GET by date (2025-06-19) Query set results: [{'id': 4, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 19), 'reservation_slot': datetime.time(11, 0)}]\nbooking-sys  | INFO 2025-06-15 00:05:01,537 basehttp 10 140691248252608 \"GET /api/bookings?date=2025-06-19 HTTP/1.1\" 200 146\nbooking-sys  | INFO 2025-06-15 00:05:02,919 views 10 140691237766848 Request information (\u003cWSGIRequest: GET '/api/version/'\u003e)\nbooking-sys  | INFO 2025-06-15 00:05:02,920 views 10 140691237766848 Application version (3.0.3)\nbooking-sys  | INFO 2025-06-15 00:05:02,928 basehttp 10 140691237766848 \"GET /api/version/ HTTP/1.1\" 200 5\nbooking-sys  | INFO 2025-06-15 00:05:02,930 views 10 140691248252608 GET by future date (after 2025-06-15) Query set results: [{'id': 4, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 19), 'reservation_slot': datetime.time(11, 0)}, {'id': 3, 'first_name': 'Sade Song', 'reservation_date': datetime.date(2025, 6, 16), 'reservation_slot': datetime.time(11, 0)}]\nbooking-sys  | INFO 2025-06-15 00:05:02,933 basehttp 10 140691248252608 \"GET /api/bookings HTTP/1.1\" 200 250\nbooking-sys  | INFO 2025-06-15 00:05:02,941 views 10 140691332138688 Request information (\u003cWSGIRequest: GET '/api/version/'\u003e)\nbooking-sys  | INFO 2025-06-15 00:05:02,941 views 10 140691332138688 Application version (3.0.3)\nbooking-sys  | INFO 2025-06-15 00:05:02,951 basehttp 10 140691332138688 \"GET /api/version/ HTTP/1.1\" 200 5\nbooking-sys  | INFO 2025-06-15 00:05:02,952 views 10 140691342624448 GET by future date (after 2025-06-15) Query set results: [{'id': 4, 'first_name': 'Halle Movie', 'reservation_date': datetime.date(2025, 6, 19), 'reservation_slot': datetime.time(11, 0)}, {'id': 3, 'first_name': 'Sade Song', 'reservation_date': datetime.date(2025, 6, 16), 'reservation_slot': datetime.time(11, 0)}]\nbooking-sys  | INFO 2025-06-15 00:05:02,954 basehttp 10 140691342624448 \"GET /api/bookings HTTP/1.1\" 200 250\n```\n\n## Alternatively, Debug Django Application\n- Go to 'Run and Debug' View in VS code\n- Select launch.json confirguration 'Python: Bookings API' \u0026 Run\n- Set breakpoints in views.py\n\n![debug](./screenshots/debug.png?raw=true \"Debug GET Bookings Request\")\n\n## Functionality Demo\n\n###  App Frontend Home Address\n- [http://localhost:5173/](http://localhost:5173/)\n\n###  API End-point\n- [http://localhost:8000/api/](http://localhost:8000/api/)\n\n###  Django Admin UI\n- [http://localhost:5173/admin](http://localhost:5173/admin)\n\n###  Make a Reservation Form\n![reserve](./screenshots/reserve.png?raw=true \"Make a Reservation\")\n\n###  Date Picker\n![date-picker](./screenshots/date-picker.png?raw=true \"Date Picker\")\n\n###  Booking Complete Confirmation / Alert\n![booking-complete](./screenshots/booking-complete.png?raw=true \"Booking Complete\")\n\n###  View Current Bookings for Date Change in Booking Form\n![bookings-by-date](./screenshots/bookings-by-date.png?raw=true \"View Bookings By Date Change\")\n\n###  Bookings By Date REST API End-point (used for view template above)\nUsing `request parameter 'date'`:\n\n- [http://localhost:8000/api/bookings?date=2024-08-22](http://localhost:8000/api/bookings?date=2024-08-22)\n\n  and\n\n- [http://localhost:8000/api/bookings?date=2024-09-01](http://localhost:8000/api/bookings?date=2024-09-01)\n\n\n\n![postman](./screenshots/postman.png?raw=true \"Postman GET Bookings Request\")\n\n###  Duplicate Booking Fail by Date \u0026 Time Value\n![duplicate-booking-fail](./screenshots/duplicate-booking-fail.png?raw=true \"Duplicate Booking Fail\")\n\n###  Date/Time in the Past Booking Fail \n![past-date-time-booking-fail](./screenshots/booking-date-in-past-fail.png?raw=true \"Past Date/Time Booking Fail\")\n\n###  Dynamic JSON Table Update on Date Change\n![dynamic-table-update](./screenshots/dynamic-table-update.png?raw=true \"JSON Table Update\")\n\n###  View All Bookings Page\n- [http://localhost:8000/api/bookings](http://localhost:8000/api/bookings)\n\n![all-bookings](./screenshots/all-bookings.png?raw=true \"View All Resrvations\")\n\n###  Hanlder 404\n![handler404](./screenshots/handler404.png?raw=true \"Handle Page Not Found Exception\")\n\n\n### Terminal Logs\n\n####  - MySQL\n```sql\n% mysql -u root -p  \nWelcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 1610\nServer version: 9.0.1 Homebrew\n\nCopyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.\n\nOracle is a registered trademark of Oracle Corporation and/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nmysql\u003e USE reservations;\nReading table information for completion of table and column names\nYou can turn off this feature to get a quicker startup with -A\n\nDatabase changed\n\nmysql\u003e SHOW TABLES;\n+----------------------------+\n| Tables_in_reservations     |\n+----------------------------+\n| auth_group                 |\n| auth_group_permissions     |\n| auth_permission            |\n| auth_user                  |\n| auth_user_groups           |\n| auth_user_user_permissions |\n| django_admin_log           |\n| django_content_type        |\n| django_migrations          |\n| django_session             |\n| hr_reservation     |\n+----------------------------+\n11 rows in set (0.00 sec)\n\nmysql\u003e SELECT * FROM hr_reservation;\n+----+------------+------------------+------------------+\n| id | first_name | reservation_date | reservation_slot |\n+----+------------+------------------+------------------+\n| 48 | Test       | 2024-09-04       | 15:41:00.000000  |\n| 49 | Test       | 2024-09-04       | 15:42:00.000000  |\n| 50 | Test 2     | 2024-09-07       | 16:42:00.000000  |\n+----+------------+------------------+------------------+\n3 rows in set (0.00 sec)\n\nmysql\u003e DELETE FROM hr_reservation WHERE first_name='Test';\nQuery OK, 2 rows affected (0.01 sec)\n\nmysql\u003e SELECT * FROM hr_reservation;\n+----+------------+------------------+------------------+\n| id | first_name | reservation_date | reservation_slot |\n+----+------------+------------------+------------------+\n| 50 | Test 2     | 2024-09-07       | 16:42:00.000000  |\n+----+------------+------------------+------------------+\n1 row in set (0.00 sec)\n\nmysql\u003e SELECT DISTINCT first_name FROM hr_reservation;\n+------------+\n| first_name |\n+------------+\n| Test 2     |\n+------------+\n1 row in set (0.01 sec)\n\nmysql\u003e SELECT DISTINCT first_name FROM hr_reservation;\n+------------+\n| first_name |\n+------------+\n| Test 2     |\n| Test 3     |\n| Test       |\n+------------+\n3 rows in set (0.00 sec)\n\nmysql\u003e SELECT * FROM hr_reservation;\n+----+------------+------------------+------------------+\n| id | first_name | reservation_date | reservation_slot |\n+----+------------+------------------+------------------+\n| 50 | Test 2     | 2024-09-07       | 16:42:00.000000  |\n| 51 | Test 3     | 2024-09-04       | 16:42:00.000000  |\n| 52 | Test       | 2024-09-26       | 20:54:00.000000  |\n+----+------------+------------------+------------------+\n3 rows in set (0.00 sec)\n```\n\n####  - Bash for pip / python3\n```shell\n% sudo pipenv shell              \nCreating a virtualenv for this project...\nPipfile: /.../workspace/booking-sys/Pipfile\nUsing /usr/local/bin/python3 (3.12.4) to create virtualenv...\n⠙ Creating virtual environment...created virtual environment CPython3.12.4.final.0-64 in 795ms\n  creator CPython3macOsBrew(dest=/.../.local/share/virtualenvs/booking-sys-PIHfCB-G, clear=False, no_vcs_ignore=False, global=False)\n  seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/.../Library/Application Support/virtualenv)\n    added seed packages: pip==24.2\n  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator\n\n% pipenv install\nInstalling dependencies from Pipfile.lock (84d28c)...\n\n✔ Successfully created virtual environment!\nVirtualenv location: /.../.local/share/virtualenvs/booking-sys-PIHfCB-G\nLaunching subshell in virtual environment...\n . /.../.local/share/virtualenvs/booking-sys-.../bin/activate\nzsh compinit: insecure directories, run compaudit for list.\n\n% python3 manage.py makemigrations\nNo changes detected\n\n% python3 manage.py migrate       \nOperations to perform:\n  Apply all migrations: admin, auth, contenttypes, hr, sessions\nRunning migrations:\n  Applying contenttypes.0001_initial... OK\n  Applying auth.0001_initial... OK\n  Applying admin.0001_initial... OK\n  Applying admin.0002_logentry_remove_auto_add... OK\n  Applying admin.0003_logentry_add_action_flag_choices... OK\n  Applying contenttypes.0002_remove_content_type_name... OK\n  Applying auth.0002_alter_permission_name_max_length... OK\n  Applying auth.0003_alter_user_email_max_length... OK\n  Applying auth.0004_alter_user_username_opts... OK\n  Applying auth.0005_alter_user_last_login_null... OK\n  Applying auth.0006_require_contenttypes_0002... OK\n  Applying auth.0007_alter_validators_add_error_messages... OK\n  Applying auth.0008_alter_user_username_max_length... OK\n  Applying auth.0009_alter_user_last_name_max_length... OK\n  Applying auth.0010_alter_group_name_max_length... OK\n  Applying auth.0011_update_proxy_permissions... OK\n  Applying auth.0012_alter_user_first_name_max_length... OK\n  Applying hr.0001_initial... OK\n  Applying hr.0002_reservation_delete_menu... OK\n  Applying sessions.0001_initial... OK\n\n% python3 manage.py showmigrations\nadmin\n [ ] 0001_initial\n [ ] 0002_logentry_remove_auto_add\n [ ] 0003_logentry_add_action_flag_choices\nauth\n [ ] 0001_initial\n [ ] 0002_alter_permission_name_max_length\n [ ] 0003_alter_user_email_max_length\n [ ] 0004_alter_user_username_opts\n [ ] 0005_alter_user_last_login_null\n [ ] 0006_require_contenttypes_0002\n [ ] 0007_alter_validators_add_error_messages\n [ ] 0008_alter_user_username_max_length\n [ ] 0009_alter_user_last_name_max_length\n [ ] 0010_alter_group_name_max_length\n [ ] 0011_update_proxy_permissions\n [ ] 0012_alter_user_first_name_max_length\ncontenttypes\n [ ] 0001_initial\n [ ] 0002_remove_content_type_name\nhr\n [ ] 0001_initial\n [ ] 0002_reservation_delete_menu\nsessions\n [ ] 0001_initial\n\n% python3 manage.py test          \nFound 23 test(s).\nCreating test database for alias 'default'...\nSystem check identified some issues:\n\nWARNINGS:\n?: (staticfiles.W004) The directory '******/booking-sys/backend/staticfiles' in the STATICFILES_DIRS setting does not exist.\n\nSystem check identified 1 issue (0 silenced).\n..............INFO 2025-06-15 00:17:20,300 views 43359 140704407604672 Request information (\u003cWSGIRequest: GET '/version'\u003e)\nINFO 2025-06-15 00:17:20,300 views 43359 140704407604672 Application version (3.0.3)\n.........\n----------------------------------------------------------------------\nRan 23 tests in 0.049s\n\nOK\nDestroying test database for alias 'default'...\n\n% python manage.py runserver     \nWatching for file changes with StatReloader\nWatching for file changes with StatReloader\nPerforming system checks...\n\nSystem check identified no issues (0 silenced).\nSeptember 01, 2024 - 20:28:22\nDjango version 5.1, using settings 'booking-sys.settings'\nStarting development server at http://127.0.0.1:8000/\nQuit the server with CONTROL-C.\n```\n### Test Coverage\n```shell\n(booking-sys) backend(base) % pipenv run coverage run manage.py test\nFound 23 test(s).\n.\n.\n.\nRan 23 tests in 0.112s\n\nOK\nDestroying test database for alias 'default'...\n\n\n(booking-sys) backend(base) % pipenv run coverage report\nName                                         Stmts   Miss  Cover\n----------------------------------------------------------------\nbooking-sys/__init__.py                          0      0   100%\nbooking-sys/settings.py                         41      7    83%\nbooking-sys/urls.py                              5      0   100%\nhr/__init__.py                                   6      0   100%\nhr/admin.py                                      0      0   100%\nhr/apps.py                                       4      0   100%\nhr/forms.py                                     13      0   100%\nhr/migrations/0001_initial.py                    5      0   100%\nhr/migrations/0002_alter_reservation_id.py       4      0   100%\nhr/migrations/__init__.py                        0      0   100%\nhr/models.py                                     6      0   100%\nhr/test_apis.py                                115      0   100%\nhr/test_forms.py                                53      0   100%\nhr/time_utils.py                                21      1    95%\nhr/urls.py                                       3      0   100%\nhr/views.py                                    129     42    67%\nmanage.py                                        8      0   100%\n----------------------------------------------------------------\nTOTAL                                          413     50    88%\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconorheffron%2Fbooking-sys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconorheffron%2Fbooking-sys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconorheffron%2Fbooking-sys/lists"}