{"id":18406429,"url":"https://github.com/ardeman/exercise-nodejs-parkinglot","last_synced_at":"2025-04-12T20:29:01.416Z","repository":{"id":135102198,"uuid":"323341476","full_name":"ardeman/exercise-nodejs-parkingLot","owner":"ardeman","description":"Simple parking management","archived":false,"fork":false,"pushed_at":"2020-12-21T20:39:59.000Z","size":163,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T04:29:03.127Z","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/ardeman.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":"2020-12-21T13:17:18.000Z","updated_at":"2021-03-11T15:24:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac600c96-f284-4fad-aee2-46dd4e14ff88","html_url":"https://github.com/ardeman/exercise-nodejs-parkingLot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardeman%2Fexercise-nodejs-parkingLot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardeman%2Fexercise-nodejs-parkingLot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardeman%2Fexercise-nodejs-parkingLot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardeman%2Fexercise-nodejs-parkingLot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ardeman","download_url":"https://codeload.github.com/ardeman/exercise-nodejs-parkingLot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248628460,"owners_count":21136084,"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-11-06T03:09:03.854Z","updated_at":"2025-04-12T20:29:01.388Z","avatar_url":"https://github.com/ardeman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parking Lot\n\n## About Problem\n\nTo **design a parking lot system** with ability:\n\n- Automated ticketing.\n\n- Documenting the vehicle regtistration number (car number).\n\n- Allocating an available parking slot to the car before actually handing over a ticket to the driver.\n\n- Calculating total parking charge. Charge applicable is `$10` for first 2 hours and `$10` for every additional hour.\n\n## Pre requisites\n\nThe source code for this project is written using [Node.js](https://nodejs.org/). Make sure you have [Node.js](https://nodejs.org/) installed on your computer before running this application, **if not please install Node.js from [nodejs.org](https://nodejs.org/en/download/)**.\n\nTo check if you have Node.js and NPM installed by running simple commands to see what version of each is installed:\n\n - **Test Node.js**: To see if Node is installed, type `node -v` in Terminal. This should print the version number so you’ll see something like this `v10.16.0`.\n\n - **Test NPM**. To see if NPM is installed, type `npm -v` in Terminal. This should print the version number so you’ll see something like this `6.9.0`.\n\n\u003e **Note:** [Node installer](https://nodejs.org/en/download/) installs both Node.js and npm on your system.\n\n## How to run?\n\nThis is a console application written in `Node.js`. This can be run in two modes:\n\n1. **Interactive Mode**: An interactive terminal based shell where commands can be typed in to perform different actions.\n\n2. **File Mode**: It accepts a filename as a parameter at the terminal and read the commands from that file.\n\n### Quick Start\n\n**Proceed to the steps below only if you've `Node.js` installed.** If not, please refer [pre requisites](#pre-requisites) section.\n\n#### For Interactive Mode\n\nOpen terminal and navigate (`cd`) to this folder and type the following commands:\n\n```bash\n1. npm install\n2. npm start\n```\n\n#### For File Mode\n\nOpen terminal and type:\n\n```bash\n1. bin/setup\n2. bin/parking_lot \u003cpath_to_file.txt\u003e\n```\n\n**Note**: You can use a provided sample input file inside `functional_spec/fixtures/file_input.txt` .\n\n## List of User Commands\n\nUsers can interact with the Parking Lot system via a following simple set of commands which produce a specific output:\n\n- **create_parking_lot {{CAPACITY}}**:\n`create_parking_lot 6` will create a parking lot with 6 slots.\n\n- **park {{CAR NUMBER}}**:\n`park KA-01-HH-1234` will allocate the nearest slot from entry gate.\n\n- **leave {{CAR NUMBER}} {{HOURS}}**:\n`leave KA-01-HH-3141 4` will free the slot occupied by car with registration number KA-01-HH-3141 and will return parking charge.\n\n- **status**:\n`status` will display cars and their slot details\n\n```bash\nSlot No.    Registration No.\n1    KA-01-HH-1234\n2    KA-01-HH-9999\n3    KA-01-BB-0001\n4    KA-01-HH-7777\n5    KA-01-HH-2701\n```\n\n- **exit**: `exit` will quit the application and return to the console.\n\n\u003e **NOTE: Any commands which are not mentioned above will throw an error: `\u003cINPUT\u003e is an invalid command`**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardeman%2Fexercise-nodejs-parkinglot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fardeman%2Fexercise-nodejs-parkinglot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardeman%2Fexercise-nodejs-parkinglot/lists"}