A full-stack platform connecting car owners with mechanics β featuring real-time fault detection, OBD2 integration via ESP32, appointment scheduling, and live notifications.
- About
- Features
- System Architecture
- Tech Stack
- Project Structure
- Getting Started
- Arduino / ESP32 Setup
- Deployment
- API Endpoints
CarConnect solves the communication gap between car owners and mechanics. Instead of calling garages or showing up without information, the app allows:
- Clients to report faults (manually or automatically via OBD2), view real-time vehicle data, and book appointments
- Mechanics to receive fault reports, respond with price estimates, manage their schedule, and track repair history
- π Register / Login with role-based access
- π Dashboard with fault stats and quick actions
- π¨ Report faults manually or receive automatic alerts from ESP32
- π‘ View real-time vehicle data (engine temp, RPM, battery voltage, DTC codes)
- π Book appointments from mechanic's available slots
- π View full fault and repair history
- π§ Dashboard with incoming fault requests
- β Accept faults and update status (Pending β In Progress β Resolved)
- π° Send price estimates and repair time
- π Manage available appointment slots
- π Real-time notifications via Socket.io
- π Reads live vehicle data via ELM327 Bluetooth adapter
- π€ Sends data to server every 10 seconds over WiFi
β οΈ Auto-creates fault reports when DTC error codes are detected
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT β
β React App (localhost:3000) β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β REST API / Socket.io
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β BACKEND β
β Node.js + Express (localhost:5000) β
β JWT Auth β
ββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββββββ
β β
ββββββββββββΌβββββββββββ βββββββββββββΌββββββββββββββββββββ
β MongoDB β β ESP32 + ELM327 β
β (localhost:27017) β β Reads OBD2 β Sends via WiFi β
βββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ
| Layer | Technology |
|---|---|
| Frontend | React 18, React Router v6, Material UI, Chart.js, Axios |
| Backend | Node.js, Express.js, Socket.io, JWT |
| Database | MongoDB, Mongoose |
| Hardware | ESP32, ELM327 Bluetooth OBD2, Arduino IDE |
| DevOps | Docker, GitHub Actions CI/CD, Oracle Cloud, Duck DNS, Nginx, Let's Encrypt |
CarConnect/
βββ frontend/ # React Application
β βββ src/
β βββ App.jsx # Main router
β βββ context/
β β βββ AuthContext.jsx # Global auth state
β βββ services/
β β βββ api.jsx # Axios instance + interceptors
β βββ components/
β β βββ shared/
β β βββ Navbar.jsx
β βββ pages/
β βββ LoginPage.jsx
β βββ RegisterPage.jsx
β βββ ClientDashboard.jsx
β βββ MechanicDashboard.jsx
β βββ FaultReportPage.jsx
β βββ VehicleDataPage.jsx
β βββ AppointmentsPage.jsx
β βββ FaultHistoryPage.jsx
β
βββ backend/ # Node.js API
β βββ server.js # Entry point + Socket.io
β βββ config/
β β βββ db.js # MongoDB connection
β βββ models/
β β βββ User.js
β β βββ FaultReport.js
β β βββ Appointment.js
β β βββ SensorData.js
β βββ routes/
β β βββ auth.js
β β βββ faults.js
β β βββ appointments.js
β β βββ sensorData.js
β βββ middleware/
β βββ auth.js # JWT middleware
β
βββ arduino/ # ESP32 Code
β βββ CarConnect_ESP32.ino # Main file
β βββ config.h # WiFi + server settings
β βββ wifi_manager.h/cpp # WiFi connection
β βββ obd2_reader.h/cpp # OBD2 data reading
β βββ server_sender.h/cpp # HTTP data upload
β
βββ .github/
β βββ workflows/
β βββ deploy.yml # CI/CD Pipeline
βββ docker-compose.yml
βββ README.md
- Node.js 18+
- MongoDB installed locally
- Git
1. Clone the repository
git clone https://github.com/osayl12/CarConnect.git
cd CarConnect2. Start the Backend
cd backend
npm install
node server.js3. Start the Frontend
cd frontend
npm install
npm startThe app will open at http://localhost:3000
Create a .env file inside /backend:
PORT=5000
MONGO_URI=mongodb://localhost:27017/carconnect
JWT_SECRET=your_secret_key_here
CLIENT_URL=http://localhost:3000| Component | Description |
|---|---|
| ESP32 DevKit | Main microcontroller with WiFi |
| ELM327 Bluetooth v1.5 | OBD2 adapter (PIC18F25K80 chip) |
| Jumper Wires | For connections |
ELM327 TX β ESP32 GPIO16 (RX2)
ELM327 RX β ESP32 GPIO17 (TX2)
ELM327 GND β ESP32 GND
ELM327 VCC β ESP32 VIN (5V)
- Install Arduino IDE
- Add ESP32 board URL in Preferences:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - Install libraries:
ArduinoJson,ELMduino - Edit
arduino/config.hwith your WiFi credentials, server URL, and MongoDB user ID - Upload
CarConnect_ESP32.inoto your ESP32
Every push to main automatically:
- Builds Docker images for frontend and backend
- Pushes images to DockerHub
- SSHs into the Oracle Cloud server and deploys
| Secret | Description |
|---|---|
DOCKERHUB_USERNAME |
DockerHub username |
DOCKERHUB_TOKEN |
DockerHub access token |
SSH_HOST |
Oracle server IP |
SSH_USER |
SSH username (ubuntu) |
SSH_KEY |
Private SSH key |
MONGO_URI |
MongoDB connection string |
JWT_SECRET |
JWT secret key |
https://carconnect.duckdns.org
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
Login |
| GET | /api/auth/me |
Get current user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/faults/my-faults |
Client: get own faults |
| GET | /api/faults/mechanic-faults |
Mechanic: get all faults |
| POST | /api/faults |
Create fault report |
| PATCH | /api/faults/:id/status |
Update fault status |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/appointments/available |
Get available slots |
| POST | /api/appointments/add-slot |
Mechanic: add slot |
| PATCH | /api/appointments/:id/book |
Client: book slot |
| PATCH | /api/appointments/:id/cancel |
Cancel appointment |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/sensor-data |
ESP32: send vehicle data |
| GET | /api/sensor-data/latest |
Get latest reading |
| GET | /api/sensor-data/history |
Get history |
Osayl β Kinneret College of Technology
Final Year Project β Software Engineering Track
Built with β€οΈ using React, Node.js, MongoDB, ESP32, and Docker