{"id":16521343,"url":"https://github.com/mikebionic/clearparking","last_synced_at":"2025-03-03T01:17:20.671Z","repository":{"id":79220115,"uuid":"427289501","full_name":"mikebionic/clearparking","owner":"mikebionic","description":"Smart Parking API for accounting and balance translaction","archived":false,"fork":false,"pushed_at":"2025-02-19T21:59:27.000Z","size":422,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-19T22:32:32.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/mikebionic.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":"2021-11-12T08:44:53.000Z","updated_at":"2025-02-19T21:59:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3c95583-84c0-45b6-9360-59f54b1eb8bd","html_url":"https://github.com/mikebionic/clearparking","commit_stats":null,"previous_names":["mikebionic/clearparking"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fclearparking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fclearparking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fclearparking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fclearparking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikebionic","download_url":"https://codeload.github.com/mikebionic/clearparking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241592149,"owners_count":19987311,"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-10-11T16:55:19.481Z","updated_at":"2025-03-03T01:17:20.660Z","avatar_url":"https://github.com/mikebionic.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ClearParking Smart parking IoT System\n\nWatch the Video showcasing the Project:\n![Youtube Video](https://youtu.be/48IGrkGlwJY)\n\n\n## Workflow\n\nSo there should be a resource in database with its price and all data.. (total, etc..)\nThe Res_price is a price for a minute used by resource.\n\nWe take the Resource ResGuid and put into .env\n\nThere should be a user (Rp_acc) with it's registered Device (qr-code), and Rp_acc should have it's Rp_acc_trans_total.\n\nIn the entrance, scanner scans the QR-code and finds a Device and its Rp_acc, it records the Attendance AttStartDate, Specify it by AttTypeId.\nIn the exit, scanner scans the QR and records the Attendance AttEndDate, then calculates the Whole time spent or used by Resource and returns its price.\n\n------\n\u003e Note! It supports saphasap and akhsasap! Just switch the DB_STRUCTURE in .env file\n\n------ \nin case if you don't have attendance table:\n```sql\ncreate table tbl_dk_attendance(\"AttId\" int, \"AttGuid\" varchar, \"EmpId\" int, \"RpAccId\" int, \"DevId\" int, \"UId\" int, \"AttTypeId\" int, \"AttDesc\" varchar, \"AttDate\" timestamp without time zone,\"CreatedDate\" timestamp without time zone,\"ModifiedDate\" timestamp without time zone);\n```\n\n----------\n\n## API\n\nRoute: \"/find-device/\"\nMethod: POST\nURL: ${hostname}${url_prefix}\nHeaders: {`\"Authorization\": \"Bearer ${token}\"`}\nPayload: {\"data\": ${qr_data}}\nurlParams: type=[\"entrance\", \"exit\"]\n\n\u003e Response\n\n200\n{\n    \"status\": 1,\n    \"data\": {...ulanyjy}\n}\n\n---\n\n200\n{\n    \"status\": 0,\n    \"data\": {}\n}\n\n---\n\n401\n{\n    \"status\": 0,\n    \"data\": {}\n}\n\n---\n\n\u003e Example response \n\n```json\n{\n  \"data\": {\n    \"AddInf1\": null,\n    \"AddInf2\": null,\n    \"AddInf3\": null,\n    \"AddInf4\": null,\n    \"AddInf5\": null,\n    \"AddInf6\": null,\n    \"CId\": 1,\n    \"CreatedDate\": \"2021-10-22 14:40:02\",\n    \"CreatedUId\": null,\n    \"DbGuid\": null,\n    \"Device\": {\n      \"AddInf1\": null,\n      \"AddInf2\": null,\n      \"AddInf3\": null,\n      \"AddInf4\": null,\n      \"AddInf5\": null,\n      \"AddInf6\": \"id=QP1A.190711.020,androidId=e4d788879fbe6635,baseOS=,release=10,brand=samsung,device=a7y18lte,display=QP1A.190711.020.A750FXXU5CTK1,manufacturer=samsung,model=SM-A750F,isPhysicalDevice=true\",\n      \"AllowedDate\": null,\n      \"CreatedDate\": \"2021-01-15 20:04:55\",\n      \"CreatedUId\": null,\n      \"DevDesc\": null,\n      \"DevGuid\": \"d1bddb81-2c27-4b93-b79f-5d1e5576eb78\",\n      \"DevId\": 2,\n      \"DevName\": \"2021-01-14 23:44:26.778464\",\n      \"DevUniqueId\": \"788879fbe6635\",\n      \"DevVerifyDate\": \"2021-01-15 20:04:57\",\n      \"DevVerifyKey\": null,\n      \"DisallowedDate\": null,\n      \"GCRecord\": null,\n      \"IsAllowed\": false,\n      \"ModifiedDate\": \"2021-01-21 20:52:16\",\n      \"ModifiedUId\": null,\n      \"RpAccId\": 50,\n      \"SyncDateTime\": \"2021-01-15 20:04:55\",\n      \"UId\": null\n    },\n    \"DeviceQty\": null,\n    \"DivId\": 1,\n    \"EmpId\": null,\n    \"GCRecord\": null,\n    \"GenderId\": null,\n    \"IsMain\": null,\n    \"ModifiedDate\": \"2021-10-22 14:40:02\",\n    \"ModifiedUId\": null,\n    \"NatId\": null,\n    \"ReprId\": null,\n    \"ResPriceGroupId\": null,\n    \"RpAccAddress\": \"helloworlddd\",\n    \"RpAccBirthDate\": null,\n    \"RpAccEMail\": null,\n    \"RpAccFirstName\": null,\n    \"RpAccGuid\": \"9d40a40d-cf50-4bbd-a7e5-733a0314beb0\",\n    \"RpAccHomePhoneNumber\": \"\",\n    \"RpAccId\": 50,\n    \"RpAccLangSkills\": null,\n    \"RpAccLastActivityDate\": \"2021-10-22 15:01:02\",\n    \"RpAccLastActivityDevice\": \"Browser: chrome, Platform: linux, Details: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36\",\n    \"RpAccLastName\": null,\n    \"RpAccLatitude\": 0.0,\n    \"RpAccLongitude\": 0.0,\n    \"RpAccMobilePhoneNumber\": \"+99361509038\",\n    \"RpAccName\": \"bionicccccc\",\n    \"RpAccPassportIssuePlace\": null,\n    \"RpAccPassportNo\": null,\n    \"RpAccPatronomic\": null,\n    \"RpAccPurchBalanceLimit\": 0.0,\n    \"RpAccRegNo\": \"ARAK12\",\n    \"RpAccResidency\": null,\n    \"RpAccSaleBalanceLimit\": 0.0,\n    \"RpAccStatusId\": 1,\n    \"RpAccTypeId\": 2,\n    \"RpAccUName\": \"mike\",\n    \"RpAccViewCnt\": null,\n    \"RpAccVisibleIndex\": null,\n    \"RpAccWebAddress\": \"\",\n    \"RpAccWorkFaxNumber\": \"\",\n    \"RpAccWorkPhoneNumber\": \"\",\n    \"RpAccZipCode\": \"\",\n    \"SyncDateTime\": \"2021-10-22 14:40:02\",\n    \"UnusedDeviceQty\": null,\n    \"WpId\": null\n  },\n  \"message\": \"Find Device\",\n  \"total\": 1\n}\n```\n\n-------------\n## IoT Device Set Ip function to update it if changes:\n\nRoute: \"/set-ip/\"\nMethod: GET\nurlParams: device_key={secret_key_of_device_in_env}\n\n-------------\n\n## Other data routes for UI\n\n/clearpark/attendances/\n/clearpark/rp-accs/\n/clearpark/devices/\n\n\u003e Response\n\n```json\n{\n  \"status\": 1,\n  \"data\": \"[...data]\",\n  \"message\": \"Info\"\n}\n```\n\n-------\n\nNOTE! If you are using Akhasap schema, disable the triggers in \"tbl_mg_arap_attandence\" table\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebionic%2Fclearparking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikebionic%2Fclearparking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebionic%2Fclearparking/lists"}