Bytes
Media and asset management surface for uploads, organization, review, and sharing.
Documentation Map
What It Is
Media and asset management surface for uploads, organization, review, and sharing.
Canonical documentation for Topolo Bytes lives in `PlatformApplications/TopoloDocs`.
Use this repository for implementation only. Local product and operational docs have been retired in favor of the docs application.
Architecture
Owners: media-platform
Source repos: PlatformApplications/TopoloBytes
Dependencies: topolo-auth, applications-packages
Repo shape
- PlatformApplications/TopoloBytes/README.md
- PlatformApplications/TopoloBytes/apps/
- PlatformApplications/TopoloBytes/migration.config.ts
- PlatformApplications/TopoloBytes/package.json
- PlatformApplications/TopoloBytes/pnpm-lock.yaml
- PlatformApplications/TopoloBytes/pnpm-workspace.yaml
- PlatformApplications/TopoloBytes/scripts/
- PlatformApplications/TopoloBytes/start-dev-simple.sh
- PlatformApplications/TopoloBytes/start-dev.sh
- PlatformApplications/TopoloBytes/topolo.cloudcontrol.json
Runtime Surfaces
Hosts:
https://bytes.topolo.app https://bytes.pages.dev Config: PlatformApplications/TopoloBytes/apps/web/wrangler.toml
Main: not declared
Routes: workers.dev or asset-only surface
Config: PlatformApplications/TopoloBytes/apps/worker/wrangler.toml
Main: src/index.ts
Routes: workers.dev or asset-only surface
API Reference
Coverage: curated
Source: PlatformApplications/TopoloDocs/src/content/public/applications/bytes.mdx
Source exists in repo: yes
Canonical Bytes coverage now lives in the docs application, the browser launcher lane now reads Auth-owned catalog data through same-origin /api/auth/* on the Bytes host, the browser callback delegates one-time `sso_code` exchange to the shared Auth client without exposing a legacy `/sso?token=` route or app-local `/sso/exchange` parser, accepts a compact exchanged-token payload, and SPA-navigates after auth update events so the memory-only token survives protected-route hydration. First-party embedded password login also completes through Bytes-owned router navigation after shared Auth token persistence. Closed lazy panels and modals are deferred until opened so `/browse` startup is not held behind hidden Suspense loaders. The worker now requires Topolo Auth validation for all operator bearer tokens with no Bytes-local JWT secret path. Bytes route permission checks evaluate unscoped route requirements against the `svc_r2_media_manager` service id so Auth-scoped grants match correctly. Bytes exposes `GET /api/widget` with the shared `@topolo/sdk` widget response contract for TopoloOne live workspace.
App API page: /reference/apps/topolo-bytes
This system currently relies on a curated or README-derived contract surface instead of a source-controlled OpenAPI spec.
Auth and Permissions
Depends on Topolo Auth: yes
Service IDs:
svc_r2_media_manager API key scopes
Manage Bytes machine credentials
Resource pattern: none
Delete files and folders
Resource pattern: none
View and download files
Resource pattern: none
Upload and edit files
Resource pattern: none
View folder structure
Resource pattern: none
Create and organize folders
Resource pattern: none
View shared files and permissions
Resource pattern: none
Share files and manage permissions
Resource pattern: none
View storage usage and analytics
Resource pattern: none
Service permissions
api_keys:write, files:delete, files:read, files:write, folders:read, folders:write, sharing:read, sharing:write, storage:read
Data Ownership
Binding: SHARE_LINKS
Target: 728a7a682f024c468f6f55fd3dce64d6
Environment: default
Source: PlatformApplications/TopoloBytes/apps/worker/wrangler.toml
Binding: VEC
Target: media-embeddings
Environment: default
Source: PlatformApplications/TopoloBytes/apps/worker/wrangler.toml
Queues / Cron / Workflows
Queue bindings:
No queue bindings were detected.
Cron triggers
*/5 * * * *via PlatformApplications/TopoloBytes/apps/worker/wrangler.toml
Workflow signals
- cron */5 * * * *
Environment Variables and Bindings
Environment variables:
NEXUS_GATEWAY_URL SERVICE_ID All wrangler bindings
-
SHARE_LINKS(kv) -> 728a7a682f024c468f6f55fd3dce64d6 -
VEC(vectorize) -> media-embeddings
Deployments
Deployment environments: default only or not declared
Routes: workers.dev or Pages-only delivery
Observability enabled: yes
Wrangler surfaces
- PlatformApplications/TopoloBytes/apps/web/wrangler.toml -> bytes
- PlatformApplications/TopoloBytes/apps/worker/wrangler.toml -> r2-media-manager-worker
Build and deploy commands
-
build— PlatformApplications/TopoloBytes/apps/desktop/package.json :: tsc -b && vite build -
build— PlatformApplications/TopoloBytes/apps/web/package.json :: VITE_API_BASE=https://r2-media-manager-worker.topolo.workers.dev tsc -b && vite build -
preview— PlatformApplications/TopoloBytes/apps/web/package.json :: vite preview -
deploy— PlatformApplications/TopoloBytes/apps/worker/package.json :: wrangler deploy -
deploy:dry-run— PlatformApplications/TopoloBytes/apps/worker/package.json :: wrangler deploy --dry-run --config wrangler.toml -
build— PlatformApplications/TopoloBytes/apps/worker/package.json :: tsc --noEmit -
build— PlatformApplications/TopoloBytes/package.json :: cd apps/web && pnpm run build -
build:desktop— PlatformApplications/TopoloBytes/package.json :: pnpm --filter desktop build -
build:all— PlatformApplications/TopoloBytes/package.json :: pnpm run --filter worker build && pnpm run --filter web build -
deploy:worker— PlatformApplications/TopoloBytes/package.json :: wrangler deploy --config apps/worker/wrangler.toml -
deploy:web— PlatformApplications/TopoloBytes/package.json :: cd apps/web && pnpm build && cp -r functions dist/ && npx wrangler pages deploy dist --project-name=bytes --branch=main -
deploy— PlatformApplications/TopoloBytes/package.json :: pnpm deploy:worker && pnpm deploy:web
Failure Modes
No default failure-mode heuristics are currently flagged for this system.
Debugging Runbooks
Start with these entrypoints:
- PlatformApplications/TopoloBytes/apps/web/wrangler.toml
- PlatformApplications/TopoloBytes/apps/worker/wrangler.toml
- PlatformApplications/TopoloDocs/src/content/public/applications/bytes.mdx
- PlatformApplications/TopoloBytes/README.md
- PlatformApplications/TopoloBytes/apps/desktop/package.json
- PlatformApplications/TopoloBytes/apps/web/package.json
- PlatformApplications/TopoloBytes/apps/worker/package.json
- PlatformApplications/TopoloBytes/package.json
Change Log / Verification
Lifecycle: active
Last verified: 2026-04-25
Any code change to this system is expected to update the canonical docs in PlatformApplications/TopoloDocs and refresh the verification date.