Files
tsview/readme.hints.md
2026-01-23 22:15:51 +00:00

1.3 KiB

tsview - Project Hints

Overview

tsview is a CLI tool for viewing S3 and MongoDB data through a web UI.

Key Patterns

Configuration

  • Reads from .nogit/env.json (created by gitzone service)
  • Environment variables: MONGODB_URL, S3_HOST, S3_ACCESSKEY, etc.

CLI Commands

  • tsview - Start viewer (auto-finds free port from 3010+)
  • tsview --port 3000 - Force specific port
  • tsview s3 - S3 viewer only
  • tsview mongo - MongoDB viewer only

Dependencies

  • Uses @push.rocks/smartbucket for S3 operations
  • Uses @push.rocks/smartdata for MongoDB operations
  • Uses @api.global/typedserver + @api.global/typedrequest for API
  • Uses @design.estate/dees-catalog for UI components

Build Process

  • Run pnpm build to compile TypeScript and bundle web UI
  • UI is bundled from ts_web/ to ts/bundled_ui.ts as base64

TypedRequest Pattern

// Interface definition
export interface IReq_ListBuckets extends plugins.typedrequest.implementsTR<
  plugins.typedrequest.ITypedRequest,
  IReq_ListBuckets
> {
  method: 'listBuckets';
  request: {};
  response: { buckets: string[] };
}

// Handler registration
typedrouter.addTypedHandler(
  new plugins.typedrequest.TypedHandler<IReq_ListBuckets>(
    'listBuckets',
    async (reqData) => {
      return { buckets: [...] };
    }
  )
);