Startup Sequence

"/home/yossef/notes/git/projects/maplibra/flows/Startup Sequence.md"

path: maplibra/flows/Startup Sequence.md

- **fileName**: Startup Sequence
- **Created on**: 2026-06-16 00:48:42

Startup Sequence

Purpose: Full app initialization from URL parameter, file upload, cache, or asset root.

Related: ../Home.md, ../Architecture.md, ../modules/Bootstrap System.md, ../modules/MVF Loading.md, ../modules/Asset System.md

Startup Modes

The app can start from four sources, resolved by src/app/startup-source.js:

  1. URL (?mvf=...) — Load MVF from a URL
  2. File Upload — User drops a ZIP file
  3. Cache — Restore last used map from IndexedDB
  4. Asset Root (/assets) — Load pre-bundled server assets
  5. Offline Package — Prepackaged offline map

Startup Flow

Phase 1: Shell (immediate)

Phase 2: MVF Load (blocking)

Phase 3: Derived Assets (async, can defer)

Phase 4: Map Creation (blocking)

Phase 5: First Floor Render (blocking)

Phase 6: UI Initialization (post-render)

Phase 7: Post-Render Tasks (idle)

Phase 8: Performance Reporting

Performance Timing

Key performance marks:

Important Files

How It Connects