{"id":23613785,"url":"https://github.com/teohrt/auth-task","last_synced_at":"2025-10-18T03:06:50.876Z","repository":{"id":56301862,"uuid":"312441517","full_name":"teohrt/auth-task","owner":"teohrt","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-17T06:40:01.000Z","size":179,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-18T05:32:51.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/teohrt.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":"2020-11-13T01:35:11.000Z","updated_at":"2020-11-17T06:40:04.000Z","dependencies_parsed_at":"2022-08-15T16:20:13.971Z","dependency_job_id":null,"html_url":"https://github.com/teohrt/auth-task","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teohrt/auth-task","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teohrt%2Fauth-task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teohrt%2Fauth-task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teohrt%2Fauth-task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teohrt%2Fauth-task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teohrt","download_url":"https://codeload.github.com/teohrt/auth-task/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teohrt%2Fauth-task/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260458550,"owners_count":23012495,"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","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":[],"created_at":"2024-12-27T17:28:39.609Z","updated_at":"2025-10-08T17:19:55.401Z","avatar_url":"https://github.com/teohrt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# auth-task\nThe Authentication Service handles username \u0026 password registration and login. Successful authorization results in a JWT token for the authorized client to use moving forward. The tokens expire after one hour.\n\nThe Task Service allows authorized users to perform operations on their tasks.\n\n## Routes\n* Authentication API\n    * [Register](docs/registerContract.md)\n        * `POST {{auth-endpoint}}/register`\n    * [Login](docs/loginContract.md)\n        * `POST {{auth-endpoint}}/login`\n* Tasks API\n    * [Create Task](docs/createTaskContract.md)\n        * `POST {{tasks-endpoint}}/v1/tasks`\n        * `POST {{tasks-endpoint}}/v2/tasks`\n    * [Get Task](docs/getTaskContract.md)\n        * `GET {{tasks-endpoint}}/v1/tasks/{id}`\n        * `GET {{tasks-endpoint}}/v2/tasks/{id}`\n    * [Get All Tasks](docs/getAllTasksContract.md)\n        * `GET {{tasks-endpoint}}/v1/tasks`\n        * `GET {{tasks-endpoint}}/v2/tasks`\n    * [Update Task](docs/updateTaskContract.md)\n        * `PUT {{tasks-endpoint}}/v1/tasks/{id}`\n        * `PUT {{tasks-endpoint}}/v2/tasks/{id}`\n    * [Delete Task](docs/deleteTaskContract.md)\n        * `DELETE {{tasks-endpoint}}/v1/tasks/{id}`\n        * `DELETE {{tasks-endpoint}}/v2/tasks/{id}`\n\n\n## Local Development\n1.  Initialize the local DB with Docker\n    *   This step requires the `make` utility. \n        *   Additional configuration for this is required on [Windows](https://vispud.blogspot.com/2019/02/how-to-run-makefile-in-windows.html)\n    1.  Install [Docker](https://www.docker.com/products/docker-desktop)\n    2.  Create the Docker image for the local DB\n        * This only needs to be done once unless modifcations have been made to `/docker/local-db/init.sql`. See notes below.\n        1.  Navigate to `/docker/local-db/`\n        2.  Run command: \n            ```bash\n            make image\n            ```\n    3.  Spin up a corresponding Docker container\n        1.  Navigate to `/docker/local-db/`\n        2.  Run command:\n            ```bash\n            make container\n            ```\n2.  Create a `.env` file in the root of the directory\n    1.  Make sure the file includes these keys:\n        ```\n        PGHOST=127.0.0.1 \n        PGUSER=docker \n        PGPASSWORD=docker \n        PGDATABASE=devdb \n        PGPORT=8888 \n\n        ACCESS_TOKEN_SECRET=secretpassword123\n        ```\n4.  Initialize Auth and Task servers\n    1.  Install project dependencies:\n        1. Run command:\n            ```bash\n            npm install\n            ```\n    2. Build project:\n        1. Run command: \n            ```bash\n            npm run build\n            ```\n    3. Start Auth service:\n        1. Run command: \n            ```bash\n            npm run start-auth\n            ```\n    4. Start Tasks service:\n        1. Run command: \n            ```bash\n            npm run start-tasks\n            ```\n\n\n### Local Dev Notes:\nIf changes are made to `/docker/local-db/init.sql`, the old docker image must be deleted, regenerated and containerized for the changes to take place.\n\nThe command for deleting the previous image is:\n```bash\nmake rm-image\n```\n\nAfter deleting the image with that command, follow \"Step 1.  Initialize the local DB with Docker\" again for your local DB to be back up and running.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteohrt%2Fauth-task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteohrt%2Fauth-task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteohrt%2Fauth-task/lists"}