Skip to content

Repository files navigation

Arbitrum Proposal Dashboard

Requirements

Environment Variables

Create a .env.local file in packages/nextjs/ with the following variables:

# Tally API key for fetching proposals
# Get your API key from https://www.tally.xyz/
TALLY_API_KEY=your_tally_api_key_here

# Secret for protecting import endpoints (used by cron jobs)
# Set a secure random string for production
CRON_SECRET=your_cron_secret_here

**Note:** The `.env.local` file is gitignored and should not be committed to version control.

## Quickstart

1. Clone the repo

2. Install dependencies:

```bash
cd arbitrum-dashboard
yarn install
  1. Spin up the Postgres database service
docker compose up -d
# sync database
yarn drizzle-kit push
# import data
yarn db:seed
# if you want to wipe the database
yarn db:wipe

Note: If you get any issues with the database, you can restart by:

docker compose down
rm -rf data/
docker compose up -d
  1. Start your NextJS app:
yarn start

Visit your app on: http://localhost:3000.

  1. You can explore the database with:
yarn drizzle-kit studio

Database (dev info)

To iterate fast on the database locally:

  • Tweak the schema in schema.ts
  • Run yarn drizzle-kit push to apply the changes.
  • Copy seed.data.example.ts to seed.data.ts, tweak as needed and run yarn db:seed (will delete existing data)

We'd switch to a migration model when ready (site live).

Imports

You can locally call the import routes like:

Forum posts:

curl -X POST http://localhost:3000/api/import-forum-posts \
  -H "Authorization: Bearer my-cron-secret"

Snapshot proposals:

curl -X POST http://localhost:3000/api/import-snapshot-proposals \
  -H "Authorization: Bearer my-cron-secret"

Tally proposals:

curl -X POST http://localhost:3000/api/import-tally-proposals \
  -H "Authorization: Bearer my-cron-secret"

Releases

No releases published

Packages

 
 
 

Contributors

Languages