PROJECT STUDY

Artly

Offline lessons. Consistent state. One shared runtime.

An offline-first instruction platform with a shared React runtime across web, Android and desktop, explicit lesson transitions, ordered local persistence and platform-specific media delivery.

Explore the build
Artly architecture diagram: a typed content catalog feeds one React lesson runtime, delivered through a web PWA, Capacitor Android and Tauri desktop, each with its own local persistence adapter.
Architecture diagram derived from the implementation.View larger

At a glance

Industry
Education and research
Capabilities
5
Technologies
9
Year
2026

The challenge

An instruction app has to preserve more than the current screen.

A lesson must retain its position after reopening, reject repeated input, release media when a step changes and behave consistently across browser and native navigation. Those guarantees must hold without a network connection or a server session.

Artly applies these constraints to guided drawing sessions for academic research. The engineering problem is a shared lesson runtime with controlled progression, bilingual content and durable local state across delivery targets.

What we built

One React and TypeScript application separates lesson rules, content and device services, with distinct builds for the web PWA, Capacitor Android package and Tauri desktop host.

An explicit lesson model

Typed sketch and colouring steps become one ordered sequence. Progress is either in progress at a step or completed; a separate transition pauses before colouring until the participant continues

An explicit lesson model

Typed sketch and colouring steps become one ordered sequence. Progress is either in progress at a step or completed; a separate transition pauses before colouring until the participant continues

A platform-neutral persistence boundary

Progress and settings use an asynchronous key-value interface. Android uses Capacitor Preferences, desktop uses Tauri Store, and the browser prefers IndexedDB with localStorage and memory fallbacks

Controlled offline delivery

The web build precaches the application, illustrations and narration. Native builds load packaged content directly and exclude web service-worker registration

A validated bilingual catalog

Levels, categories, objects and lessons are data rather than component branches. Validation checks references, identifiers, translations, step counts and sketch-before-colour ordering

Scoped media playback

Narration belongs to the active step and attempt. Native builds also expose packaged tutorial videos with playback and seeking, while the production web interface uses still illustrations

How it works

  1. Compile the lesson sequence

    The catalog resolves a lesson's objects into ordered steps. Each step receives a key containing the object's position, object ID and step ID. Vite discovers bundled illustrations and media at build time, and a content checker reports structural errors and missing image references.

  2. Restore local progress

    The repository validates the saved schema and lesson identity before resolving the stored step key against the current sequence. A usable record resumes its step; an absent or removed step starts the lesson again. Existing version-one records can restore without the newer audio-attempt field.

  3. Guard each transition

    Each visible instruction starts a fresh five-second readiness delay. The advance handler also checks readiness, a synchronous step latch, a monotonic cooldown and a finishing flag. Rapid taps and stale callbacks cannot advance the same step twice. Steps stay inside the lesson route, so Back exits the lesson rather than rewinding its instructions.

  4. Save in write order

    Progress writes enter a promise queue, and reads wait for pending writes. IndexedDB writes resolve on transaction completion; the desktop adapter explicitly saves its store. The completion screen waits for the repository operation to settle, while handled storage failures let the session continue.

Engineering insights

The architecture keeps lesson behaviour in the shared application and limits platform differences to storage, device capabilities and build configuration.

Stack by layer

Frontend
  • React 19
  • TypeScript
  • React Router
  • CSS Modules
  • HTML Audio
  • HTML Video
Data
  • IndexedDB
  • Capacitor Preferences
  • Tauri Store
  • localStorage
Infrastructure
  • Vite
  • Capacitor Android
  • Tauri 2
  • vite-plugin-pwa
  • Workbox
  • Vitest
  • React Testing Library
  • ESLint
  1. Stable identity instead of an array offset

    Saved progress references a step key, so reordering steps within the same object does not silently resume a different instruction. Removing the saved step invalidates the resume position; moving an object changes its positional key

  2. Persistence is ordered, not assumed

    Serializing writes prevents a slow earlier save from overwriting a later one within the repository instance. Corrupt records are discarded. Memory fallback keeps the app usable but cannot preserve progress after close; there is no cross-device synchronization

  3. Updates respect active sessions

    A waiting web service worker activates only while the page has received no pointer or keyboard input. Once interaction begins, the update waits for a later opening. Native packages use installer updates and never load content through a web service worker

  4. Audio limits survive reopening

    An attempt stores per-step playback counts alongside progress. Successful playback starts consume the allowance; failed starts do not. Attempt identity rejects callbacks from an older attempt, and leaving a step pauses audio and removes its listeners

  5. Media weight follows the target

    Tutorial playback is lazy-loaded for native builds and development preview. The production web interface excludes that player, and MP4 tutorials are outside the web precache patterns. Android and desktop package tutorial assets for local use

  6. Tests target failure modes

    The source includes regression tests for stale handlers, repeated input, restored-step delays, audio-attempt continuity, corrupt storage, ordered writes, desktop saves and native exclusion from service workers. These checks exercise the boundaries where session state can drift

The implementation is a research application, with no claimed learning outcome or production usage metric. Desktop packaging is configured for Windows and macOS; the source documentation records Windows verification and leaves the macOS build unverified. Signing, notarization and physical-device offline checks remain separate release work.

Design system

The interface contract follows the lesson state: one active instruction, one forward action and consistent exit behaviour across delivery targets.

  • State drives controls

    Next and Finish use the same readiness guard as the transition handler. Audio exposes unavailable, playing, failed and limit-reached states through localized accessible labels

  • Language is a content boundary

    English and Bahasa Indonesia share typed interface keys and localized lesson fields. The selected language persists locally, and the document language follows the active locale

  • Feedback has redundant cues

    Text accompanies the progress marker, image alternatives describe instruction artwork, and reduced-motion rules remove nonessential animation

  • Device behaviour stays behind adapters

    Android Back, app exit and screen wakefulness are platform services, keeping native APIs out of the lesson progression model

Where this fits

This architecture suits offline instruction tools, guided field procedures and training applications that need consistent local workflows across browser and packaged clients. Its reusable elements are typed content, guarded transitions, storage adapters and target-specific asset delivery.

discuss your offline workflow

Let’s connect the dots

Let's put these ideas to work.

Share a process, product, or problem you want to improve. We will work through the possibilities together.

Discuss your project