SiteLog Pro

Operations

Original Idea

Construction Daily Log A mobile app that logs progress offline, adds photos, and auto-includes weather.

Product Requirements Document (PRD): SiteLog Pro

1. Executive Summary

SiteLog Pro is an "Offline-First" mobile application designed for construction site supervisors and foremen working in remote or connectivity-challenged environments. The app streamlines the creation of daily construction logs by automating environmental data (weather), enforcing high-integrity photo documentation (GPS/Timestamp metadata), and ensuring seamless background synchronization. By treating internet connectivity as a secondary utility rather than a requirement, SiteLog Pro ensures that field data is captured accurately at the moment of occurrence, reducing reporting delays and administrative overhead.

2. Problem Statement

Construction sites are frequently located in areas with poor or non-existent cellular connectivity. Supervisors often rely on manual paper logs or "online-only" apps that crash or lose data when the signal drops. This leads to:

  • Inaccurate Reporting: Weather and labor data are filled out from memory at the end of the day.
  • Lack of Evidence: Photos lack verified GPS/Timestamp metadata, leading to disputes with subcontractors or insurance providers.
  • Administrative Bottlenecks: Manual data entry into systems like Procore or Excel takes hours of a supervisor’s week.

3. Goals & Success Metrics

  • Goal 1: Achieve 100% data retention during offline sessions.
  • Goal 2: Reduce time spent on daily reporting by 40% through automation.
  • Goal 3: Ensure "Golden Record" photo integrity for compliance.

| Metric | Target | | :--- | :--- | | Sync Success Rate | >99.9% of local records successfully merged to cloud | | Log Completion Time | < 5 minutes per daily entry | | Offline Reliability | 0 reported data loss incidents during offline-to-online transitions | | User Adoption | >80% of site supervisors preferring the app over paper within 30 days |

4. User Personas

A. Site Foreman (Frank)

  • Environment: In the field, wearing gloves, loud background noise, bright sunlight.
  • Need: Needs to log a worker count and take 5 photos of a foundation pour quickly without fighting the UI.

B. Project Manager (Pam)

  • Environment: Office or trailer, multi-tasking across 5 different job sites.
  • Need: Needs a high-level PDF report every evening to verify the project is on schedule.

5. User Stories

  • As a Foreman, I want to create a log entry while in a basement with no signal so that I don't forget the details later.
  • As a Foreman, I want the app to automatically pull the weather so I don't have to manually check a thermometer.
  • As a PM, I want the photos to have embedded GPS tags so I can prove the work was done at the correct location.
  • As a Safety Inspector, I want to sign the daily report on the foreman's tablet so that the record is legally binding.

6. Functional Requirements

6.1. Offline-First Entry

  • Users must be able to create, edit, and save full daily logs (Notes, Labor, Equipment) without an active internet connection.
  • The app must use a local relational database for immediate persistence.

6.2. Automated Weather & GPS

  • Upon log creation, the app must capture the device's GPS coordinates.
  • The app will fetch current weather (temp, wind, conditions) via API if online; if offline, it will queue the request to fetch historical weather for that timestamp once a signal is restored.

6.3. Media Capture with Integrity

  • Camera must overlay GPS and Timestamp onto the image file.
  • High-resolution photos must be compressed on-device (WebP/JPEG 0.8) before being queued for background upload.

6.4. Synchronization Engine

  • Background "Outbox" pattern to drain pending logs and images once 4G/Wi-Fi is detected.
  • Conflict resolution using "Last Write Wins" or "Server-Side Merging."

6.5. Digital Signatures

  • On-device signature canvas for stakeholders to sign off on the day's progress.

7. Technical Requirements

7.1. Tech Stack (2026 Standards)

  • Mobile Framework: React Native 0.83.x (New Architecture / Fabric enabled).
  • Local Database: WatermelonDB 0.29.3 (using JSI/C++ adapter for 3x speed).
  • Backend Framework: NestJS with TypeORM.
  • Primary Database: PostgreSQL with PostGIS extension for spatial indexing.
  • Authentication: Auth0 with Offline Access (dual-store strategy: Auth0 SDK + Encrypted MMKV for tokens).
  • Cloud Infrastructure: AWS (S3 for media, RDS for DB, Lambda for PDF generation).

7.2. Critical Libraries

  • Camera: react-native-vision-camera (v4+) for hardware EXIF injection.
  • Media Upload: tus-js-client for resumable uploads on spotty signals.
  • Sync Logic: Custom NestJS Sync Engine using the "Tombstone" deletion pattern.

7.3. Integrations

  • Weather: OpenWeatherMap API (One Call 3.0).
  • Industry Sync: Procore API (using origin_id for idempotency).
  • Maps: Google Maps SDK for geofencing site boundaries.

8. Data Model

Entities:

  1. Project: id (UUID), name, geofence (Polygon), timezone.
  2. DailyLog: id (UUID), projectId, date, summary, status (Draft/Submitted), lastModified.
  3. LaborEntry: id, logId, tradeType, workerCount, hours.
  4. MediaAttachment: id, logId, localUri, remoteUrl, gpsCoords, timestamp, isUploaded (Bool).
  5. WeatherRecord: logId, temp, humidity, windSpeed, conditions.

9. API Specification (Key Endpoints)

POST /v1/sync/pull

  • Description: Fetches changes from the server since the last sync.
  • Payload: { lastPulledAt: Timestamp, schemaVersion: 1 }
  • Response: { changes: { daily_logs: { created: [], updated: [], deleted: [] } }, timestamp: Timestamp }

POST /v1/sync/push

  • Description: Pushes local changes to the server.
  • Payload: { changes: { daily_logs: { created: [...], updated: [...] } } }
  • Response: 200 OK (Server handles conflict resolution via updated_at checks).

10. UI/UX Requirements

  • Accessibility: Buttons must be a minimum of 48x48dp to accommodate gloved hands.
  • Visibility: High-contrast "Outdoor Mode" to prevent glare issues on-site.
  • Feedback: Persistent "Sync Status" indicator (Green: Synced, Orange: Pending, Red: Offline).
  • Form Logic: Progressive disclosure (only show Labor fields if "Labor" toggle is active).

11. Non-Functional Requirements

  • Performance: App must boot and become interactive in < 2 seconds.
  • Security: AES-256 encryption for data-at-rest on the mobile device.
  • Scalability: Support for up to 500 high-res photos per project per day.
  • Reliability: 15-minute S3 Pre-signed URLs for media access.

12. Out of Scope

  • Real-time video streaming/conferencing.
  • Full-scale payroll processing (only hours logging is supported).
  • 3D BIM Model editing (view-only/referencing may be a future feature).

13. Risks & Mitigations

  • Risk: GPS drift leads to incorrect site tagging.
    • Mitigation: Use react-native-gnss-status-checker to verify signal quality before allowing log creation.
  • Risk: Large image uploads drain battery and data.
    • Mitigation: Implement "Wi-Fi Only" sync toggle in settings and use WebP compression.
  • Risk: Sync conflicts between foreman and office PM.
    • Mitigation: Implement field-level merging and record-level locking for logs older than 24 hours.

14. Implementation Tasks

Phase 1: Project Foundation

  • [ ] Initialize React Native 0.83.x project with New Architecture enabled.
  • [ ] Configure WatermelonDB 0.29.3 with JSI adapter.
  • [ ] Set up NestJS backend with PostgreSQL and PostGIS.
  • [ ] Implement Auth0 login with MMKV-based encrypted token storage.

Phase 2: Offline Core & Schema

  • [ ] Define WatermelonDB schemas for Project, DailyLog, Labor, and Media.
  • [ ] Build "Project Selection" and "Offline Log Entry" UI screens.
  • [ ] Implement local-first persistence for text-based notes.
  • [ ] Create PostGIS migration for site geofencing support.

Phase 3: Hardware Integration

  • [ ] Integrate react-native-vision-camera for photo capture.
  • [ ] Implement background EXIF metadata injection (GPS/Timestamp).
  • [ ] Build on-device image compression utility (WebP, 0.8 quality).
  • [ ] Integrate OpenWeatherMap API with historical fallback logic.

Phase 4: Sync Engine & Media Transfer

  • [ ] Implement Pull/Push sync protocol in NestJS.
  • [ ] Set up TUS server (or AWS S3 Multipart) for resumable media uploads.
  • [ ] Develop the "Sync Outbox" background service to handle connectivity changes.
  • [ ] Build conflict resolution logic (Last Write Wins) on the server.

Phase 5: Reporting & Industry Sync

  • [ ] Implement on-device Digital Signature capture using react-native-signature-canvas.
  • [ ] Build automated PDF generation service using pdfmake or Lambda.
  • [ ] Develop Procore API bridge for Manpower and Weather logs.
  • [ ] Conduct "Field Stress Test" (Simulated 0% signal with 50+ images).