How dthompsonza/swapokay works
SwapOkay is a client-side collectible collection tracker and swap-finder. The main workflow is to choose a collectible kind, create and update a named collection, then share its encoded QR/link or compare it with another collection by scanning or pasting a code. Collections persist in browser localStorage; kind catalogues load from static JSON. The graph also preserves import, browsing, informational pages, and sound controls. Evidence is limited to the README, source index references, and excerpts shown; unsampled page details and some display wiring are not inferred.
Main entry points: collection.ts Collection editor · collection-store.ts Collection store · kind.service.ts Kind catalogue service · app.routes.ts Page routing
Components 28
App and pages
- App shell
src/app/app.ts - Page routing
src/app/app.routes.ts - Kind browser
src/app/pages/home.ts - Kind collections
src/app/pages/kind.ts - About page
src/app/pages/about.ts - Sponsors page
src/app/pages/sponsors.ts
Collection management
- Create collection
src/app/pages/new-collection.ts - Collection editor
src/app/pages/collection.ts - Icon picker
src/app/shared/icon-picker.ts - Item detail modal
src/app/shared/item-modal.ts
Sharing and swaps
- Import modal
src/app/shared/import-modal.ts - Shared collection view
src/app/shared/shared-collection.ts - Swap comparison
src/app/shared/compare.ts - QR display
src/app/shared/qr-show.ts - Modal frame
src/app/shared/modal.ts
Domain and persistence
- Collection store
src/app/core/collection-store.ts - Browser storage
- Collection codec
src/app/core/collection-codec.ts - Collection icons
src/app/core/collection-icons.ts - Domain models
src/app/core/models.ts - Kind catalogue service
src/app/core/kind.service.ts - Kind JSON data
public/data/kinds.json - Collectible data
public/data/CHK2026.json - Swap calculation
src/app/core/swap-diff.ts - Share link
src/app/core/share.ts - Sound settings
src/app/core/sound.service.ts
Other components
- Collector
- Camera
Connections 48
- Collector → App shell: uses
src/app/app.ts - App shell → Page routing: hosts
src/app/app.ts - Page routing → Kind browser: routes to
src/app/app.routes.ts - Page routing → Kind collections: routes to
src/app/app.routes.ts - Page routing → Create collection: routes to
src/app/app.routes.ts - Page routing → Collection editor: routes to
src/app/app.routes.ts - Page routing → About page: routes to
src/app/app.routes.ts - Page routing → Sponsors page: routes to
src/app/app.routes.ts - Kind browser → Kind catalogue service: loads kinds
src/app/pages/home.ts - Kind collections → Kind catalogue service: loads kind
src/app/pages/kind.ts - Kind collections → Collection store: reads collections
src/app/pages/kind.ts - Create collection → Kind catalogue service: loads kind
src/app/pages/new-collection.ts - Create collection → Collection store: creates collection
src/app/pages/new-collection.ts - Create collection → Icon picker: uses
src/app/pages/new-collection.ts - Collection editor → Kind catalogue service: loads kind
src/app/pages/collection.ts - Collection editor → Collection store: updates collection
src/app/pages/collection.ts - Collection editor → Collection codec: encodes counts
src/app/pages/collection.ts - Collection editor → QR display: opens QR
src/app/pages/collection.ts - Collection editor → Swap comparison: opens comparison
src/app/pages/collection.ts - Collection editor → Icon picker: uses
src/app/pages/collection.ts - Collection editor → Item detail modal: opens details
src/app/pages/collection.ts - Collection editor → Sound settings: plays sounds
src/app/pages/collection.ts - Collection editor → Share link: creates link
src/app/pages/collection.ts - Collection store → Browser storage: reads and writes
src/app/core/collection-store.ts - Collection store → Collection codec: encodes counts
src/app/core/collection-store.ts - Collection store → Collection icons: validates icons
src/app/core/collection-store.ts - Collection store → Domain models: stores records
src/app/core/collection-store.ts - Kind catalogue service → Kind JSON data: fetches index
src/app/core/kind.service.ts - Kind catalogue service → Collectible data: fetches kind file
src/app/core/kind.service.ts - Kind catalogue service → Domain models: types data
src/app/core/kind.service.ts - Import modal → Collection codec: decodes code
src/app/shared/import-modal.ts - Import modal → Collection store: imports collection
src/app/shared/import-modal.ts - App shell → Import modal: opens
src/app/app.ts - App shell → Shared collection view: shows shared code
src/app/app.ts - Shared collection view → Collection codec: decodes code
src/app/shared/shared-collection.ts - Shared collection view → Kind catalogue service: loads kind
src/app/shared/shared-collection.ts - Shared collection view → Collection store: reads collections
src/app/shared/shared-collection.ts - Shared collection view → Swap comparison: opens comparison
src/app/shared/shared-collection.ts - Swap comparison → Collection codec: decodes code
src/app/shared/compare.ts - Swap comparison → Swap calculation: computes swaps
src/app/shared/compare.ts - Swap comparison → Camera: scans with
src/app/shared/compare.ts - QR display → Share link: creates share link
src/app/shared/qr-show.ts - QR display → Modal frame: renders in
src/app/shared/qr-show.ts - Swap comparison → Modal frame: renders in
src/app/shared/compare.ts - Icon picker → Collection icons: selects icon
src/app/shared/icon-picker.ts - Item detail modal → Modal frame: renders in
src/app/shared/item-modal.ts - Import modal → Modal frame: renders in
src/app/shared/import-modal.ts - Sound settings → Browser storage: reads and writes
src/app/core/sound.service.ts