How rawanmohameedd/collecting-data works
Project type and purpose
• This is a full-stack, mobile data-collection application.
• Frontend: React Native app (Android + iOS).
• Backend: Node.js + Express server that receives Wi-Fi strength readings and persists them to CSV files.
• Purpose: collect labeled Wi-Fi RSSI data by room, to train an AI model for indoor localization.
File structure
• Top-level “Frontend” directory: React Native, native platform folders (android/, ios/), JavaScript entry points (App.js, index.js), utility modules (BSSIDs.js, netInfo.js), tests.
• Top-level “Backend” directory: Node.js service with index.js (Express app), package.json, data/ (raw CSV), dataParsers/ (post-processing scripts), append.js (appends new data points).
• Project root also contains Postman collection for testing and top-level package.json (probably workspace or root deps).
README
• Describes exactly: the mobile app reads Wi-Fi strength every 2s, sends an object {timestamp, BSSID, RSSI, roomId…} to the Express server; server appends to CSV.
• Data used later for ML model training.
Main components and their interactions
a. Mobile Frontend
• UI Layer: “Start”/“Stop” buttons in App.js
• Wi-Fi Scanner Module: netInfo.js + BSSIDs.js (identifies current BSSID and RSSI)
• Networking Layer: fetch or axios POST → Express endpoint
b. Backend Server
• API Layer: index.js defines POST /append or similar route
• Business Logic: append.js enriches incoming payload (timestamp, room info)
• Data Parsers: dataParsers/*.js (post-processing per room)
• Storage Layer: data/*.csv (room0.csv, room1.csv, out.csv…)
c. External Tools
• Postman collection for manual or automated testing
Architectural patterns and design principles
• Client-Server (REST) architecture
• Single-responsibility backend modules: routers, append logic, per-room parsers
• Separation of concerns: UI vs. data collection vs. networking
• File-based persistence (CSV) instead of a database for simplicity
Final advice
• Be exhaustive: break Backend into Router, Append Service, Parsers, Storage
• Clearly demarcate the 2s sampling interval loop in the mobile module
• With relevant file paths or entry-point filenames (e.g., App.js, index.js) for traceability