A Blazor WebAssembly application that enables seamless data collection with full offline capability and intelligent automatic synchronization.
- β Offline-First Architecture - Works without internet connection
- β Smart Sync - Automatic synchronization when connection is restored
- β Real-Time Status - Connection, queue, and sync indicators
- β Local Persistence - Data saved in browser LocalStorage
- β Queue Management - Offline operations queued and synced automatically
- β Clean UI - Modern, responsive interface with status indicators
- Frontend: Blazor WebAssembly (.NET 9.0)
- Backend: Blazor Server + ASP.NET Core Web API (.NET 9.0)
- Database: Microsoft SQL Server (LocalDB)
- ORM: Entity Framework Core 9.0
- Storage: Browser LocalStorage (via JavaScript Interop)
- .NET 9.0 SDK or higher
- SQL Server LocalDB (included with Visual Studio)
| Column | Type | Description |
|---|---|---|
| Id | int | Primary key (auto-increment) |
| UserName | string | Name of user entering data |
| EntryDateTime | DateTime | Auto-captured timestamp |
| ProductModel | string | Product model name |
| PartNumber | string | Product part number |
| Quantity | int | Quantity of items |
| Price | decimal(18,2) | Price per item |
| CreatedAt | DateTime | Record creation timestamp |
git clone https://github.com/SiliconCatalyst/SyncFlow.git
cd SyncFlowcd Server
dotnet ef migrations add InitialCreate
dotnet ef database updateTerminal 1 - Start Server:
cd Server
dotnet runTerminal 2 - Start Client:
cd Client
dotnet runAccess the application at the URL shown in the Client terminal (typically http://localhost:5007).
- User submits data through the form
- Data is sent directly to the API
- API stores data in SQL Server database
- Success confirmation shown to user
- User submits data through the form
- Data is stored in browser LocalStorage with temporary negative ID
- Operation is added to sync queue
- Success confirmation shown (no errors!)
- Data remains accessible in the app
- Connection indicator detects internet is back
- Automatic sync is triggered
- Queued operations are sent to API in order
- Temporary IDs are replaced with real database IDs
- Queue count updates to reflect synced items
The navbar displays three real-time indicators:
- Queue: X - Number of pending operations waiting to sync (blue)
- Syncing / Not Syncing - Current sync status with animated spinner (gray/blue)
- Connected / Disconnected - Internet connection status (green/red)
- Go Offline: Stop the Server terminal (Ctrl+C)
- Add Entries: Create 2-3 product entries via the form
- Verify Queue: Check navbar shows "Queue: 3"
- Go Online: Restart the Server (
dotnet runin Server folder) - Watch Sync: Observe "Syncing" indicator and queue count drop to 0
- Verify Data: Check Database Viewer page - all entries should have real IDs
- Created Blazor WASM + ASP.NET Core Web API architecture
- Configured Entity Framework Core with SQL Server LocalDB
- Created ProductEntry model and database migrations
- Set up API controllers with CRUD operations
- Built product entry form with validation
- Created database viewer with table display
- Implemented navigation and routing
- Added README.md display with Markdown rendering
- Implemented LocalStorage service for data persistence
- Created sync queue system for offline operations
- Built ProductEntryService with offline/online logic
- Added connection monitoring with reconnection detection
- Implemented automatic sync on reconnection (offline β online)
- Added conflict resolution (negative IDs β real IDs)
- Created sync queue management
- Built status indicators (connection, queue, sync)
- Adding real-time status indicators in navbar
- Implementing visual feedback for all operations
- Styling components with modern CSS
- Ensuring no errors shown to users when offline
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=SyncFlowDb;Trusted_Connection=true;MultipleActiveResultSets=true"
}
}Update in service classes if your server runs on a different port:
private const string ApiUrl = "http://localhost:5188/api/productentries";This is a portfolio/interview project demonstrating offline-first architecture. Feel free to fork and experiment!
Licensed under GNU AGPL v3.0 - see LICENSE for details.
Abdulmalek Boulellou
- π§ malek.boulellou@proton.me
- π GitHub
Built as part of a technical interview assessment demonstrating:
- Offline-first web application architecture
- Blazor WebAssembly development
- ASP.NET Core Web API design
- Entity Framework Core and database migrations
- Browser storage and synchronization patterns
- Event-driven architecture
- Clean code and separation of concerns
Status:
- β Phase 1 - Project Setup & Database (Complete)
- β Phase 2 - Client UI (Complete)
- β Phase 3 - Offline-First Architecture (Complete)
- β Phase 4 - Smart Synchronization (Complete)
- β³οΈ Phase 5 - Polish User Experience (In Progress)