1Space Documentation

website·Indexed 32 days ago

https://docs.1space.tech

Documentation for 1Space, covering account management such as hiding, deactivating, and unsubscribing, as well as self-hosting and deployment instructions using Cloudflare Workers.

Tokens
831
Snippets
5
Records
8
Agent score
0%

What's inside 1Space

  1. Overview of 1Space self-hosting components

    Deploying 1Space requires a combination of infrastructure services and application components. Some can be self-hosted, while others offer cloud versions.

    Infrastructure Requirements

    • Postgres (Database)
    • Temporal (Workflow orchestration)
    • Minio or S3-compatible storage
    • PowerSync (Sync service)
    • Logto (Identity/Auth)
    • Axiom (Optional data analysis)
    • Cloudflare Account (Required for Workers)

    Application Services

    • @1space/backend: Main API server
    • @1space/backend-worker: Background job processor
    • @1space/backend-cf: Cloudflare Workers logic
    • @1space/web: Frontend SPA
  2. Run database migrations for 1Space backend

    After deploying the backend container, you must apply the database migrations from within the container.
    # Execute inside the backend container
    cd /app/packages/api && pnpm migrations:apply
  3. Deactivate a feed to stop fetching articles

    Deactivating a feed stops the system from fetching new articles. All other feed settings and existing data remain unchanged. Deactivated feeds can be reactivated at any time to resume fetching.
  4. Unsubscribe from a feed and delete associated data

    Unsubscribing from a feed is an irreversible action that permanently deletes nearly all associated data. Article deletion occurs asynchronously in the background with an intentional delay. If you resubscribe to the same feed shortly after unsubscribing, you may recover articles with their states intact, although this behavior is not guaranteed.
  5. Hide feeds or folders from the sidebar

    The hide feature is used for workflow-only feeds or folders. Hiding a folder or feed removes it from the sidebar visibility. For hidden feeds, articles continue to be fetched, stored, and processed by the Workflow in the background. To access a hidden feed, use the feed's settings panel or a previously saved direct link. Note that hiding a folder does not affect the visibility or status of the feeds contained within it.
  6. Deploy the @1space/web frontend

    The @1space/web service is a Single Page Application (SPA) and can be hosted on any static file server.
    # Build the frontend
    pnpm build:web
    
    # Host the resulting directory: ./apps/web/dist
  7. Deploy @1space/backend and @1space/backend-worker

    The @1space/backend provides the API for the frontend, and @1space/backend-worker handles background jobs. Both can be scaled horizontally. They require a REQUESTER_ENDPOINT which points to the @1space/backend-cf service.
    # Start the API backend
    docker run -p 3335:3335 -e DATABASE_URL=... -e JWKS_URI=... -e TEMPORAL_ADDRESS=... -e AXIOM_DATASET=... -e AXIOM_TOKEN=... -e REQUESTER_ENDPOINT=... ghcr.io/1space-app/backend
    
    # Start the background worker
    docker run -e DATABASE_URL=... -e JWKS_URI=... -e TEMPORAL_ADDRESS=... -e AXIOM_DATASET=... -e AXIOM_TOKEN=... -e REQUESTER_ENDPOINT=... ghcr.io/1space-app/backend-worker
  8. Configure infrastructure for 1Space deployment

    Before deploying the backend services, prepare the following infrastructure and environment variables. If self-hosting PowerSync, Temporal, or Logto, separate Postgres databases may be required for each.
    # Postgres
    DATABASE_URL=postgres://user:password@host:port/1space
    
    # Temporal
    TEMPORAL_ADDRESS=localhost:7233
    TEMPORAL_NAMESPACE=1space
    
    # S3 Storage (Minio/AWS)
    S3_ENDPOINT=http://localhost:9000
    S3_ACCESS_KEY=minio
    S3_SECRET_KEY=minio123
    
    # PowerSync
    POWERSYNC_ENDPOINT=http://localhost:8080
    
    # Logto
    LOGTO_ENDPOINT=https://localhost:3001
    LOGTO_APP_ID=your-logto-app-id
    JWKS_URI=https://localhost:3001/oidc/jwks
    
    # Axiom (Optional)
    AXIOM_TOKEN=your-axiom-token
    AXIOM_DATASET=1space