Mohamed Rayen Sansa
ENFR
All projects
Academic · Team of 52025

NoorCity

How can a city monitor its street lighting in real time and anticipate failures?

A Smart City platform for public street lighting, as a Symfony web app and a JavaFX desktop app on one MySQL database. I led the Infrastructure module (failure prediction, YOLO vehicle detection, ESP32 IoT), then extended the project with a Kotlin Android app: the city is run from the field, with Firebase, on-device AI and scooter charging.

My role
Infrastructure module (AI, computer vision, IoT) and the Kotlin Android extension
Platforms
Android, Web, Desktop, IoT, AI
Stack
  • Symfony
  • Kotlin
  • Jetpack Compose
  • Python
  • YOLO
  • TensorFlow Lite
  • Firebase
  • OpenCV
  • Scikit-learn
  • ESP32-CAM
  • JavaFX
  • WebSocket
  • PHP
  • MVC
  • Java
  • MySQL
  • ML Kit
  • Stripe
  • Leaflet.js
  • Arduino
  • Node.js
  • Machine learning
  • Computer vision
  • NumPy
  • pandas
  • JavaScript
1:10 000

Situation

15features delivered in my module: lamps, zones, cameras, IoT

Street lighting is costly in energy and often managed by hand: failures found late, interventions poorly tracked. NoorCity connects smart lamps, citizens and technicians in one system.

3rd-year PIDEV project at Esprit, in a team of 5, one area each. Mine: infrastructure (lamps, zones, cameras), which I made predictive and real-time with AI and IoT.

Then I wanted to go beyond the desktop screen: I extended the project with an Android app, to take NoorCity where the lamps are, in the field.

1:1 000

Product

  • Lamp map showing each lamp’s failure probability.
  • A QR code on every lamp: a technician scans it and opens its sheet.
  • 3 suggested spots for new lamps in a zone.
  • Live traffic from the cameras, with a traffic-jam alert.

Mobile extension: the city in your pocket

An idea added to the web and Java project: everything the team manages from the office, available in the field, plus new uses for citizens.

  • 3 profiles (admin, technician, citizen), around forty screens, in French, English and Arabic.
  • Scan a lamp’s QR code to report a failure or start an intervention.
  • Live cameras, analysed by on-phone AI: people, vehicles, safety score.
  • Noor Charge: charge a scooter or a bike on an equipped lamp, with Stripe payment (test mode) and energy tracked live.
  • Real-time sensors, weather and air quality.
  • Certified videos through a SHA-256 blockchain: you can prove a recording was not altered.
  • Lighting programmes, citizen-proposed events, team chat.
1:100

System

  • Web: Symfony 6.4, MVC (Twig, Doctrine, Leaflet), for staff and citizens.
  • Desktop: JavaFX, MVC (FXML), connected over JDBC to the same MySQL database: web and desktop share the same data.
  • AI in Python (scikit-learn, YOLO, OpenCV), called from Symfony or linked over WebSocket for real time.
  • IoT: camera-equipped ESP32, Arduino and motion, light and temperature sensors.
  • Mobile: Kotlin + Jetpack Compose (Material 3), MVVM: screen → ViewModel (StateFlow) → repository listening to Firebase in real time.
  • Firebase as a serverless backend: Auth (email, Google, Facebook), Realtime Database, Firestore, Cloud Functions.
  • The ESP32 boards read and write the same Firebase data: app and hardware stay in sync live; only the ESP32-CAM video stream is read directly.
ESP32-CAM (PIR · LDR · temp.), YOLO + OpenCV (Python), Firebase (Realtime DB · Firestore), Ratchet WS (WebSocket :8081), Android (Kotlin · Compose), Symfony 6.4 (Twig · Leaflet), RandomForest (scikit-learn), MySQL (Doctrine ORM), JavaFX (FXML · JDBC).esp32 → vision : video; esp32 → firebase : sync; vision → ws : JSON; firebase → android : Flow; ws → web : push; web → ml : Process; web → db : ORM; db → desktop : JDBCvideosyncJSONFlowpushProcessORMJDBCESP32-CAMPIR · LDR · temp.YOLO + OpenCVPythonFirebaseRealtime DB · FirestoreRatchet WSWebSocket :8081AndroidKotlin · ComposeSymfony 6.4Twig · LeafletRandomForestscikit-learnMySQLDoctrine ORMJavaFXFXML · JDBC

One request, end to end

1:10

Model & data

  • Failures: a RandomForest estimates each lamp’s risk from its age, power, type, past failures and traffic.
  • Traffic: YOLO finds and counts vehicles in the ESP32-CAM stream.
  • Placement: positions are drawn around existing lamps, filtered by distance and validated by geocoding (not in water, in an urban area).

On mobile and embedded:

  • A TensorFlow Lite model (MobileNet) analyses the camera image right on the phone: people, vehicles, safety score.
  • The ESP32-CAM detects accidents by frame difference, with rules and thresholds generated in Python and embedded in the board.

Limit: the failure model was trained on simulated data; the next step is to retrain it on the exported real data.

Hiring? Compare with your offer

Paste your internship offer. You will see which of the technologies you ask for are backed by one of my projects or internships, and which are not.

The text stays in your browser; nothing is sent.