Files
zeekayandHanzo Dev 915fe3d029 fix: complete the TypeScript 7 tsconfig migration
The first pass left three classes of config that BOTH tsc 5.9 and tsc 7
reject. Each was proven against both compilers before changing:

  TS5090  A `paths` target must be relative once `baseUrl` is gone. The
          first pass skipped the "./" prefix wherever baseUrl pointed at
          the config's own directory, reasoning it was semantically
          equivalent. It is not — without baseUrl a non-relative target
          is rejected outright, by 5.9 as well as 7.

  TS5110  `moduleResolution: node16` requires `module: node16`. The first
          pass mapped commonjs projects to node16 resolution alone, which
          BROKE those configs for the current toolchain. Both are now set.

  TS5102  `downlevelIteration` is also removed in TS7; it was missing from
          the dead-flag list.

Verified: repos that tsc 7 previously refused (base-studio, js-sdk, kv-js)
now report zero config errors on tsc 7 AND tsc 5.9.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-27 20:35:57 -07:00
..

offchain

API to access DAO information, proposals, comments, temperature checks, and SIWE authentication.

Prerequisites

  • Install bun

    curl -fsSL https://bun.sh/install | bash
    
  • Install PostgreSQL

Setup

Database

[macOS] Start the database

brew services start postgresql@16

Configure postgresql in PATH (if you are using zsh shell)

echo 'export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Create a database

createdb dao

The API depends on data from ponder. In order to speed up development, seed the database from the backup file in data repo release. Download the file and save it to packages/offchain/database/db.sql.

Restore the database from the backup file

bash scripts/database/restore.sh

OPTIONAL: See ponder to run it locally. Not required to run the API if you use the restored database.

Environment Variables

Add your RPC URLs and database URL to .env. Leave DATABASE_URL blank to use the local database.

cp example.env .env

Install Dependencies

bun install

Running

bun run dev

API

see live API docs

Websocket

Local testing: Connect to ws://localhost:81/ws