BaryoDev / BaryoDev/barakoCMS

Offline: capture entries and transitions without a connection and sync them safely

Open
#849 0 comments 0 reactions 0 assignees View on GitHub
module
Dominant language
C#
Stars
6
Forks
7
Avg merge
4h 42m
Merged PRs (30d)
307

Description

Arnel, 14 September 2026: offline is one of the shapes a barako system should brew in, for a field worker without signal, a teacher's time in on a bad connection, or a registration desk when the venue's network drops.

## Change

- **Capture offline.** barakoPress pages (and the PWA module's app shell) can queue creates and named transitions in the browser when offline, each with a client-generated idempotency key (docs/idempotency.md) and the time it happened on the device.
- **Sync.** On reconnect the queue is sent in order. A write that the API now refuses (a validation, a uniqueness rule, a permission change) is shown to the user with the API's message to fix or discard, never silently dropped.
- **Conflicts.** Updates carry the version they were made against; a 412 is shown as "someone changed this while you were offline" with both values.
- **Device time.** The server records both the device time and the received time, so a time in captured offline at 7:58 is stored as 7:58, with the gap visible.
- **Read offline.** Pages and the lists a viewer may read are cached for offline reading with a clear "last updated" note.

## Done when

- A time in captured offline syncs once when the connection returns, keeps its device time, and a refused sync shows the reason.

## Where it lives

No core change. Offline capture and sync belong to barakoPress and the PWA module's service worker. The core already provides what sync needs: idempotency keys and versioned updates with If-Match.

Contributor guide

Open the contributing guide

Research direction

Start with the barakoPress pages and the PWA module's service worker, then read docs/idempotency.md and the core's versioned-update and If-Match behavior. Trace how offline creates and named transitions can queue and replay in order, and define the cache and conflict paths. Done means an offline time-in syncs once with device time preserved, while refused writes and conflicts are shown to the user.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.