{"id":26911670,"url":"https://github.com/cicovic-andrija/spot","last_synced_at":"2026-05-01T09:32:02.098Z","repository":{"id":231008683,"uuid":"750211059","full_name":"cicovic-andrija/spot","owner":"cicovic-andrija","description":"Parking space sensor and monitoring service","archived":false,"fork":false,"pushed_at":"2024-01-30T07:46:43.000Z","size":1095,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-02T03:30:16.201Z","etag":null,"topics":["go","raspberry-pi","rest","sensor","webservice"],"latest_commit_sha":null,"homepage":"","language":"Go","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/cicovic-andrija.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}},"created_at":"2024-01-30T07:46:25.000Z","updated_at":"2024-04-02T03:30:19.559Z","dependencies_parsed_at":"2024-04-02T03:40:31.370Z","dependency_job_id":null,"html_url":"https://github.com/cicovic-andrija/spot","commit_stats":null,"previous_names":["cicovic-andrija/spot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cicovic-andrija%2Fspot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cicovic-andrija%2Fspot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cicovic-andrija%2Fspot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cicovic-andrija%2Fspot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cicovic-andrija","download_url":"https://codeload.github.com/cicovic-andrija/spot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246659943,"owners_count":20813333,"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":["go","raspberry-pi","rest","sensor","webservice"],"created_at":"2025-04-01T14:49:25.568Z","updated_at":"2026-05-01T09:32:02.091Z","avatar_url":"https://github.com/cicovic-andrija.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spot\n\n## Parking space tracking service\nSpot is a web service with exposed REST API for tracking parking spots\nin public garages. It was developed as the final BSc\nstudies assignment before graduation.\n\n## Parking monitor on Raspberry Pi\nMonitor is implemented using Go programming language and a RaspberryPi, with a couple of LEDs and\nan ultrasonic distance sensor. For more information about the device,\ncheck the [rpi](./rpi/monitor) directory.\n\n## Prerequisites\n* Linux distribution\n* Go programming language v1.10 or newer\n* `dep` - Go dependency management tool\n* MongoDB database server\n\n## Programmer's deployment\nAssuming `GOPATH` is set correctly and MongoDB server is running, execute following commands:\n```bash\n$ cd $GOPATH/src\n$ go get -v github.com/cicovic-andrija/spot\n$ cd github.com/cicovic-andrija/spot\n$ dep ensure\n$ make deploy\n```\n\n##  REST API Overview\n| Operation  | Request |\n| :--- | :--- |\n| Create a garage | `POST /v1/garages {\"name\": \"Union Sq. Garage\", \"city\": \"San Francisco\", \"address\": \"333 Post Street\", \"geolocation\": {\"longitude\": -122.40754, \"latitude\": 37.788062}}` |\n| Get all garages' properties  | `GET /v1/garages` |\n| Get garage properties | `GET /v1/garages/{id}` |\n| Change garage properties | `PUT /v1/garages/{id} {\"name\": \"Union Square Garage\", \"city\": \"San Francisco\"}` |\n| Delete a garage | `DELETE /v1/garages/{id}` |\n| Create a garage section | `POST /v1/garages/{id}/sections {\"name\": \"A\", \"level\": \"Ground\", \"description\": \"Regular parking space\", \"total_spots\": 42}` |\n| Get all sections' properties | `GET /v1/garages/{id}/sections` |\n| Get section properties | `GET /v1/garages/{id}/sections/{name}` |\n| Change section properties | `PUT /v1/garages/{id}/sections/{name} {\"name\": \"A1\", \"total_spots\": 10}` |\n| Delete a section | `DELETE /v1/garages/{id}/sections/{name}` |\n| Update parking spot status (connect device) | `POST /v1/garages/{id}/sections/{name}/actions {\"action\": \"update\", \"params\": [{\"number\": 1, \"label\": \"A1-1\", \"taken\": false}]}` |\n| Parking spot status: bulk update | `POST /v1/garages/{id}/sections/{name}/actions {\"action\": \"update\", \"params\": [{\"number\": 2, \"label\": \"A1-2\", \"taken\": false}, {\"number\": 3, \"label\": \"A1-3\", \"taken\": true}, {\"number\": 4, \"label\": \"A1-4\", \"taken\": false}]}` |\n| Disconnect device | `POST /v1/garages/{id}/sections/{name}/actions {\"action\": \"disconnect\", \"params\": [{\"number\": 1}]}` |\n| Disconnect device - bulk | `POST /v1/garages/{id}/sections/{name}/actions {\"action\": \"disconnect\", \"params\": [{\"number\": 2}, {\"number\": 3}, {\"number\": 4}]}` |\n| Shutdown the server | `POST /v1/control {\"action\": \"shutdown\"}` |\n\n## Running tests\n\nIn order to run tests, assuming the current working directory is the project's root, run:\n\n```bash\n$ cd test\n$ go test -v ./...\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcicovic-andrija%2Fspot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcicovic-andrija%2Fspot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcicovic-andrija%2Fspot/lists"}