{"id":17001831,"url":"https://github.com/abayo-luc/shuri-api","last_synced_at":"2026-05-06T03:32:06.835Z","repository":{"id":100503670,"uuid":"216572922","full_name":"abayo-luc/shuri-api","owner":"abayo-luc","description":null,"archived":false,"fork":false,"pushed_at":"2019-10-21T14:09:10.000Z","size":234,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-08-31T14:43:43.417Z","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/abayo-luc.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":"2019-10-21T13:18:17.000Z","updated_at":"2019-11-04T12:16:26.000Z","dependencies_parsed_at":"2023-05-15T11:30:24.855Z","dependency_job_id":null,"html_url":"https://github.com/abayo-luc/shuri-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abayo-luc/shuri-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abayo-luc%2Fshuri-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abayo-luc%2Fshuri-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abayo-luc%2Fshuri-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abayo-luc%2Fshuri-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abayo-luc","download_url":"https://codeload.github.com/abayo-luc/shuri-api/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abayo-luc%2Fshuri-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32677926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"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":[],"created_at":"2024-10-14T04:26:18.772Z","updated_at":"2026-05-06T03:32:06.818Z","avatar_url":"https://github.com/abayo-luc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shuri-API\n\n[![pipeline status](https://gitlab.com/shuri-dev/shuri-api/badges/develop/pipeline.svg)](https://gitlab.com/shuri-dev/shuri-api/commits/develop)\n[![coverage report](https://gitlab.com/shuri-dev/shuri-api/badges/develop/coverage.svg)](https://gitlab.com/shuri-dev/shuri-api/commits/develop)\n\n## Code style\n\nThe style-guide is ESlint-airbnb, and it uses prettier for frommating code. To enable `VS Code + ESLint + prettier` follow the steps below:\n\n- Text editor [VSCode](https://code.visualstudio.com)\n- In VS Code, `Ctrl + Shift + X`\n- Search and install _ESLint_\n- Search and install _Prettier Code Formatter_\n- Restart VS Code.\n\n### Getting Started\n\n### Clone the latest version of the repository\n\n`https://gitlab.com/shuri-dev/shuri-api.git` or `git@gitlab.com:shuri-dev/shuri-api.git`\n\n### Change directory\n\n`cd into the project directory`\n\n### Update the environment variables in sample.env file and rename it to '.env'\n\n`cp sample.env ./.env`\n\n### Install the project's dependencies with\n\n`yarn` or `npm install`\n\n### Make sure to have the postgres database created for the project\n\nAfter setting up the database,\n\n- Install the `Sequelize CLI` ==\u003e `https://www.npmjs.com/package/sequelize-cli`\n- Run the database migrations with the `db:migrate` command found in `package.json`\n\n### Testing CI/CD\n\n`yarn test` or `npm run test`\n\n### Start the application\n\n`yarn start` or `yarn run dev`\n\n## API Spec\n\nThe preferred JSON object to be returned by the API should be structured as follows:\n\n### Admin Endpoints\n\nCreate new admin\n`POST /admins`\n\n```source-json\n    {\n        \"email\":\"me@example.com\",\n        \"password\":\"password\"\n    }\n```\n\nSample response body:\n\n```source-json\n{\n    \"message\": \"Success\",\n    \"data\": {\n        \"id\": \"43ebe85f-8f61-49f2-b438-866d2ef9e983\",\n        \"email\": \"me@example.com\",\n        \"updatedAt\": \"2019-09-09T10:21:12.703Z\",\n        \"createdAt\": \"2019-09-09T10:21:12.703Z\",\n        \"type\": \"accountant\"\n    }\n}\n```\n\nGet all admins `GET /admins`\n\n```source-json\n{\n    \"message\": \"Success\",\n    \"data\": [\n        {\n            \"id\": \"43ebe85f-8f61-49f2-b438-866d2ef9e983\",\n            \"email\": \"me@example.com\",\n            \"type\": \"accountant\",\n            \"createdAt\": \"2019-09-09T10:21:12.703Z\",\n            \"updatedAt\": \"2019-09-09T10:21:12.703Z\"\n        }\n    ]\n}\n```\n\nGet admins by ID `GET /admins/:id`\n\n```source-json\n{\n    \"message\": \"Success\",\n    \"data\": {\n        \"id\": \"43ebe85f-8f61-49f2-b438-866d2ef9e983\",\n        \"email\": \"luc.bayo@gmail.com\",\n        \"type\": \"accountant\",\n        \"createdAt\": \"2019-09-09T10:21:12.703Z\",\n        \"updatedAt\": \"2019-09-09T10:21:12.703Z\"\n    }\n}\n```\n\n### User Authentication Endpoints\n\nAdmins authentication `POST /admins/auth`\nBus company authentication `POST /companies/auth`\nSchool users authentication `POST /school-users/auth`\n\n```source-json\n{\n    \"email\":\"me@example.com\",\n    \"password\":\"password\"\n}\n```\n\nsample response body:\n\n```source-json\n{\n    \"message\": \"Success\",\n    \"token\": \"jwt-token-on-success\"\n}\n```\n\nGet current user `GET /current`\n\n```source-json\n{\n    \"message\": \"Success\",\n    \"data\": {\n        \"id\": \"36e46bea-3f99-44ee-a610-23e7a997a641\",\n        \"email\": \"me@example.com\",\n        \"type\": \"general\",\n        \"createdAt\": \"2019-09-02T20:36:56.504Z\",\n        \"updatedAt\": \"2019-09-02T20:36:56.504Z\"\n    }\n}\n```\n\n### Bus Company Endpoint\n\nGet all companies `GET /companies`\nSample response\n\n```source-json\n{\n    \"message\": \"Success\",\n    \"data\": {\n        \"companies\": [\n            {\n                \"id\": \"063d3a6d-8e18-4686-8939-38dbd18162c5\",\n                \"name\": \"company1\",\n                \"email\": \"company1@example.com\",\n                \"country\": \"Rwanda\",\n                \"district\": \"Gasabo\",\n                \"createdAt\": \"2019-09-05T12:41:25.002Z\",\n                \"updatedAt\": \"2019-09-05T12:41:25.002Z\"\n            },\n        ]\n    }\n}\n```\n\nCreate new busy company `POST /companies`\nSample request post\n\n```source-json\n{\n\t\"name\":\"Company 1\",\n\t\"email\":\"company@example.com\",\n    \"country\":\"Rwanda\",\n    \"district\":\"Nyarugenge\",\n    \"phoneNumber\":\"456789\",\n    \"password\":\"password\",\n    \"description\":\"Hello world\"\n}\n```\n\nSample response body\n\n```source-json\n{\n    \"message\": \"Success\",\n    \"data\": {\n        \"id\": \"2a108be6-6435-4ac3-a968-247260d9b0d9\",\n        \"name\": \"Company 1\",\n        \"email\": \"company@example.com\",\n        \"country\": \"Rwanda\",\n        \"district\": \"Nyarugenge\",\n        \"updatedAt\": \"2019-09-09T10:39:42.859Z\",\n        \"createdAt\": \"2019-09-09T10:39:42.859Z\",\n        \"phoneNumber\": null,\n        \"description\": null\n    }\n}\n```\n\nGet company by ID `GET /companies/:id`\n\u003cbr/\u003e\n\u003cbr/\u003e\nUpdate company `PUT /companies/:id`\n\u003cbr/\u003e\n\u003cbr/\u003e\nGet all company partners `GET /companies/:id/partners`\n\u003cbr/\u003e\n\u003cbr/\u003e\nApprove partnership `PUT /partners/:schoolId/approve`\n\u003cbr/\u003e\n\u003cbr/\u003e\nReject partnership `PUT /partners/:schoolId/reject`\n\u003cbr/\u003e\n\u003cbr/\u003e\n\nDelete company `DELETE /companies/:id`\n\n### School Endpoints\n\nAdd a new school school `POST /schools`\n\n```source-json\n{\n    \"name\":\"School 1\",\n    \"email\":\"school@example.com\",\n    \"phoneNumber\":\"0789277275\",\n    \"password\":\"password\",\n    \"longitude\":\"-56788765\",\n    \"province\":\"Kigali\",\n    \"sector\":\"Kimironko\",\n    \"cell\":\"Bibare\",\n    \"latitude\":\"+678987\",\n    \"district\":\"Gasabo\",\n    \"country\":\"Rwanda\"\n}\n```\n\nGet all schools `GET /schools`\nGet school by id `GET /schools/:id`\nUpdate school `PUT /schools/:id`\nDelete school `DELETE /schools/:id`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabayo-luc%2Fshuri-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabayo-luc%2Fshuri-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabayo-luc%2Fshuri-api/lists"}