{"id":16489335,"url":"https://github.com/suddi/parkinglot-api","last_synced_at":"2026-01-21T02:02:59.470Z","repository":{"id":13469188,"uuid":"74520204","full_name":"suddi/parkinglot-api","owner":"suddi","description":"parkinglot API developed in Koa.js","archived":false,"fork":false,"pushed_at":"2025-08-01T10:35:24.000Z","size":824,"stargazers_count":1,"open_issues_count":20,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-01T12:51:21.022Z","etag":null,"topics":["api","koa","koajs","mysql","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suddi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2016-11-22T22:49:02.000Z","updated_at":"2020-06-03T18:57:01.000Z","dependencies_parsed_at":"2025-08-01T12:35:23.198Z","dependency_job_id":null,"html_url":"https://github.com/suddi/parkinglot-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/suddi/parkinglot-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suddi%2Fparkinglot-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suddi%2Fparkinglot-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suddi%2Fparkinglot-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suddi%2Fparkinglot-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suddi","download_url":"https://codeload.github.com/suddi/parkinglot-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suddi%2Fparkinglot-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28622472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T23:49:58.628Z","status":"online","status_checked_at":"2026-01-21T02:00:08.227Z","response_time":86,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","koa","koajs","mysql","nodejs"],"created_at":"2024-10-11T13:43:57.606Z","updated_at":"2026-01-21T02:02:59.449Z","avatar_url":"https://github.com/suddi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parking Lot API\n\n[![Build Status](https://travis-ci.org/suddi/parkinglot-api.svg?branch=master)](https://travis-ci.org/suddi/parkinglot-api)\n[![codecov](https://codecov.io/gh/suddi/parkinglot-api/branch/master/graph/badge.svg)](https://codecov.io/gh/suddi/parkinglot-api)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/78fca57f78334b20b5a23cb9090977b0)](https://www.codacy.com/app/Suddi/parkinglot-api?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=suddi/parkinglot-api\u0026utm_campaign=badger)\n[![Greenkeeper badge](https://badges.greenkeeper.io/suddi/parkinglot-api.svg)](https://greenkeeper.io/)\n[![David](https://img.shields.io/david/suddi/parkinglot-api.svg)](https://david-dm.org/suddi/parkinglot-api)\n[![David](https://img.shields.io/david/dev/suddi/parkinglot-api.svg)](https://david-dm.org/suddi/parkinglot-api?type=dev)\n[![license](https://img.shields.io/github/license/suddi/parkinglot.svg)](https://github.com/suddi/parkinglot/LICENSE)\n\n[![codecov](https://codecov.io/gh/suddi/parkinglot-api/branch/master/graphs/commits.svg)](https://codecov.io/gh/suddi/parkinglot-api)\n\n## Setup\n\nTo setup on Ubuntu 16.04 Xenial Xerus, setup scripts are provided, to run these:\n\n````sh\n. ./setup.sh\n````\n\nThis will install the following:\n* docker\n* nvm, node and npm\n\nYou will also need to mysql 5.7, to install all these manually, you may follow:\n* [docker](https://docs.docker.com/engine/installation/)\n* [nvm](https://github.com/creationix/nvm#install-script)\n* [mysql](https://dev.mysql.com/doc/refman/5.7/en/installing.html)\n\nIf you are not using the default configuration in mysql, you will need to update the DB config [here](/config/primitive/db.js) and testing config [here](/test/db_utils.js).\n\nPlease create a database in mysql and load the [SQL schema file](/scripts/schema.sql), this will create the necessary tables.\n\nOnce these have been installed, please run:\n\n````sh\n# This may be skipped if you used used setup.sh to setup node.js\nnpm install -g pm2\n\n# For development environment, can execute API with nodemon or pm2\nnpm install\n````\n\n## Usage\n\nTo load fixtures, first add a fixture file to the `fixtures` directory.\n\nThere is already a sample fixture file provided [here](/fixtures/cars.xml), to load this into the DB:\n\n````sh\n# npm run load-fixtures \u003cfilename\u003e\n\nnpm run load-fixtures cars.xml\n````\n\nTo startup `redis`, which is used for rate-limiting:\n\n````sh\n# To bring up redis\nnpm run docker-up\n\n# To take down redis\nnpm run docker-down\n````\n\nTo start up the API:\n\n````sh\nnpm start\n````\n\nYou may also startup the API using PM2:\n\n````sh\npm2 start scripts/startup/development.json\n# or\npm2 start scripts/startup/production.json\n````\n\nThis will by default, start up the API on port 3000.\n\nThere are several endpoints provided:\n* `GET /` and `GET /whoami`\n  * Health check endpoints\n* `GET /parkinglots/:parkingLotId/cars/:hoursPassed`\n  * This will calculate the earning made on parked cars given a valid parking lot and number of hours in the future\n* `GET /inventory/:hoursPassed`\n  * This will return the number of cars in all the parking lots and the earning made given the number of hours in the future\n* `POST /parkinglots/:parkingLotId/cars`\n  * This will add a car to the parking lot\n  * You only need to provide the following: `brand`, `licencePlate` and `parkingTime` (will take current UTC time if not provided)\n\nTo run the linter, tests and generate code coverage:\n\n````sh\n# To execute the linter separately\nnpm run lint\n\n# To execute linter, tests and generate code coverage\nnpm test\n````\n\n## Outstanding Issues\n\nThere are a number of outstanding issues, that due to time limitation have not been included, to view these, please visit [OUTSTANDING_ISSUES.md](/OUTSTANDING_ISSUES.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuddi%2Fparkinglot-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuddi%2Fparkinglot-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuddi%2Fparkinglot-api/lists"}