{"id":30453341,"url":"https://github.com/yunkhngn/autoparking-server","last_synced_at":"2026-04-30T11:32:52.007Z","repository":{"id":302035537,"uuid":"1011000385","full_name":"yunkhngn/autoparking-server","owner":"yunkhngn","description":"Đây là một hệ thống đỗ xe thông minh mô phỏng sử dụng ESP32, cảm biến, LED, servo và một hệ thống web để đăng ký, check-in và check-out bãi đỗ xe.","archived":false,"fork":false,"pushed_at":"2025-11-21T06:55:09.000Z","size":34273,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-21T08:29:12.966Z","etag":null,"topics":["esp32","iot","mysql","nodejs"],"latest_commit_sha":null,"homepage":"https://github.com/yunkhngn/parking-client","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/yunkhngn.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-30T06:46:01.000Z","updated_at":"2025-11-21T06:54:08.000Z","dependencies_parsed_at":"2025-08-08T20:01:00.338Z","dependency_job_id":null,"html_url":"https://github.com/yunkhngn/autoparking-server","commit_stats":null,"previous_names":["yunkhngn/autoparking-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yunkhngn/autoparking-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunkhngn%2Fautoparking-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunkhngn%2Fautoparking-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunkhngn%2Fautoparking-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunkhngn%2Fautoparking-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yunkhngn","download_url":"https://codeload.github.com/yunkhngn/autoparking-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunkhngn%2Fautoparking-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32463892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":["esp32","iot","mysql","nodejs"],"created_at":"2025-08-23T15:44:47.711Z","updated_at":"2026-04-30T11:32:46.982Z","avatar_url":"https://github.com/yunkhngn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚗 Hệ thống AutoParking IoT\n\n## ℹ️ Giới thiệu\nĐây là một hệ thống đỗ xe thông minh mô phỏng sử dụng ESP32, cảm biến, LED, servo và một hệ thống web để đăng ký, check-in và check-out bãi đỗ xe.\n\n## ✨ Tính năng\n- Đăng ký slot đỗ xe qua website (chạy trên ESP32 captive portal hoặc website chạy trên máy chủ nội bộ)\n- Check-in, check-out xe bằng biển số và mã OTP\n- Giao tiếp ESP32 với server qua API nội bộ\n- Tự động mở/đóng cổng bằng servo\n- Cảnh báo đèn nhấp nháy khi xe sắp vào slot\n- LED hiển thị trạng thái slot (trống / đã đăng ký / đang chờ xe vào)\n\n## 🧰 Phần cứng\n\n| Thiết bị           | Mô tả                                  |\n|--------------------|-----------------------------------------|\n| ESP32 Dev Module   | Vi điều khiển chính                     |\n| 4 cảm biến HW-870  | Phát hiện xe trong slot                 |\n| 4 đèn LED          | Hiển thị trạng thái từng slot           |\n| 1 Servo SG90       | Điều khiển cổng                         |\n| Dây nối, breadboard| Kết nối mạch                            |\n\n## 🔌 Giao tiếp chân (ESP32)\n- Servo: D13\n- LED: D26, D25, D33, D32 (slot 1 → 4)\n- Cảm biến: D18, D19, D21, D22 (slot 1 → 4)\n\n## 🖥️ Backend (Node.js + MySQL)\n- Địa chỉ: `http://localhost:1204`\n- Cơ sở dữ liệu: MySQL, gồm bảng `slots` và `logs`\n- API chính:\n\n| Endpoint         | Chức năng                                 |\n|------------------|--------------------------------------------|\n| `GET /slots`     | Lấy danh sách slot                         |\n| `POST /register` | Đăng ký slot và sinh OTP                   |\n| `POST /checkin`  | Check-in xe                                |\n| `POST /checkout` | Check-out xe                               |\n| `POST /status`   | Kiểm tra trạng thái check-in/out           |\n| `GET /logs`      | Lấy lịch sử check-in/out                   |\n\n## 🌐 Client (React)\n- Giao diện web đơn giản: chọn slot, nhập biển số, thao tác check-in/out\n- Gửi và nhận dữ liệu qua API nội bộ\n\n## 📡 ESP32 - Web server captive portal\n- Phát Wi-Fi \"Parking Hotspot\" (password: `12042005`)\n- Lưu và phục vụ website React build (dưới dạng SPIFFS)\n- Các endpoint nhận dữ liệu từ server:\n  - `POST /esp-checkin { slot }`\n  - `POST /esp-checkout { slot }`\n\n## 🔄 Quy trình hoạt động\n1. Người dùng truy cập vào Wi-Fi ESP32 hoặc đăng ký trên web\n2. Đăng ký biển số và slot đỗ → nhận OTP\n3. Khi tới bến đỗ, người dùng nhập biển số và OTP để check-in\n4. ESP sẽ:\n   - Nháy đèn slot đang chờ\n   - Mở cổng sau 3 giây\n   - Khi cảm biến phát hiện xe đã vào, tắt đèn và đóng cổng\n5. Khi người dùng check-out:\n   - Nếu cảm biến xác nhận slot trống → mở cổng\n   - Sau 10s → đóng cổng\n\n## 📝 Ghi chú\n- Server phải nằm trong cùng mạng với ESP32\n- Web React build phải được convert sang file tĩnh và upload lên SPIFFS\n- Nếu không popup captive portal, truy cập thủ công: `http://192.168.4.1`\n\n## 👤 Tác giả\nKhoa Nguyễn (yunkhngn)\n\n---\n© 2025 yunkhngn\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunkhngn%2Fautoparking-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyunkhngn%2Fautoparking-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunkhngn%2Fautoparking-server/lists"}