Skip to content

evankazadaiev/solarsync

Repository files navigation

☀️ SolarSync

SolarSync is a demo project, built using offline-first application architecture. It simulates a field reporting tool for solar panel technicians - focused on logging comments, observations, and map-based data tied to a single report.

⚠️ This is a conceptual demo, built to showcase clean architecture, local-first principles, and scalability. The app is currently scoped to field noting for one report.


🌐 Live Demo


🌍 What is SolarSync?

SolarSync is a PWA designed for technicians who may be working in remote areas with poor or no internet connectivity. It lays the groundwork for future multi-report support, multi-user conflict handling, and real-world deployments.


🔧 Key Features

✅ Offline-First Field Notes

  • Works fully offline - try turning off Wi-Fi and reloading!
  • Uses IndexedDB via Dexie.js for local persistence
  • Cached tiles and markers (Leaflet/OpenStreetMap)
  • Nested threaded comments

💡 Local-first Architecture

  • Notes are created, updated and read locally
  • Uses synced (whether uploaded to the server) and updatedAt (last local change timestamp) for offline-first synchronization and future conflict resolution
  • Multi-tab notes sync
  • TBD: Sync engine will support conflict resolution patterns

⚡ Progressive-Web-Application

  • Installable on desktop & mobile
  • Service worker handles background caching
  • Fully unit-tested with Vitest and React Testing Library
  • Clean, domain-oriented architecture for modularity and scalability

🚧 Current Limitations

This is a demo/prototype build with the following constraints:

  • 📝 Single report scope — the app assumes one predefined report for now
  • 🚫 No real backend — everything is stored locally in the browser
  • 🔄 Sync logic is TBD
  • 🔐 No auth/users — everyone is a fake technician with mock avatars
  • 🧷 No media support — you can’t attach files, photos, or audio notes

📁 Project structure

src/
├── common/             # Shared types, UI components, utilities
├── features/
│   └── notes/       # Field note logic, forms, nested UI
├── sync/               # (WIP) Sync engine for remote API integration
├── App.tsx             # Entry point

🏗️ Tech Stack

  • React + TypeScript
  • Vite + SWC
  • TailwindCSS
  • IndexedDB via Dexie.js
  • Vitest + Testing Library
  • Leaflet + OpenStreetMap
  • VitePWA plugin

🔁 Sync Layer (Planned)

The sync/ folder will host logic for keeping local and remote data in sync.


🚀 Getting Started

# Clone the repo
git clone https://github.com/evankazadaiev/solarsync.git
cd solarsync

# Install dependencies
npm install

# Start the dev server
npm run dev

# Run the tests
npm run test

About

Offline-First Solar Site Reporting PWA

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors