Skip to content

About

Bounty Platform with Native ZEC Payments

Resources

Contributing

Security policy

Stars

7 stars

Watchers

1 watching

Forks

Repository files navigation

ZEC Bounties

ZEC Bounties is ZecHub's bounty platform. Communities post tasks, contributors apply and deliver the work, and payouts go out as shielded ZEC transactions with the transaction ID recorded on the bounty.

Live site: https://bounties.zechub.wiki

Tech stack

  • Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS 4, Radix UI, Playwright (accessibility and pagination tests)
  • Backend: Node.js, Express 5, Prisma (PostgreSQL), Redis, WebSockets (ws), node:test
  • Zcash: Zebrad, Zaino and Zingo-cli for shielded payments

Repository structure

Path Contents
zec-bounties-frontend/ Next.js app, including the in-app docs under app/docs/
zec-bounties-backend/ REST API, Prisma schema (prisma/schema.prisma), payment and wallet code
docs/ Markdown mirrors of the in-app docs (index)

Documentation

User docs live at https://bounties.zechub.wiki/docs, mirrored in this repo:

Contributing

Read CONTRIBUTING.md before you start. In short: open one focused PR against main. To be paid, create a bounty on the platform (before you start for large work, or after the PR is up) and link the PR as the deliverable.

The backend's environment variables are listed by name in zec-bounties-backend/.env.example and summarised in Environment Variables below. Never commit real values.


Zec Bounties - Local Development Setup

Bounty Platform with Native ZEC Payments

The project consists of:

  • Frontend – User interface built with Next.js.
  • Backend – REST API for authentication, bounty management, submissions, and Zcash payments.

Prerequisites

Before getting started, ensure you have the following installed:

  • Node.js
  • npm and/or Yarn
  • PostgreSQL
  • Redis
  • Docker (optional, to run PostgreSQL and Redis; see below)
  • Zebrad, Zaino and Zingo-cli (only for Zcash wallet and payment features; not needed to run the app locally)

For Zcash node setup, see the ZecHub Developer Resources:

https://zechub.wiki/developers


Project Setup

Backend

1. Navigate to the backend directory

cd zec-bounties-backend

2. Install dependencies

npm install

3. Start PostgreSQL and Redis

With Docker:

docker run -d --name zb-postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=zec_bounties -p 5432:5432 postgres:16-alpine
docker run -d --name zb-redis -p 6379:6379 redis:7

4. Create your .env

cp .env.example .env
npx web-push generate-vapid-keys

Paste the generated keys into VAPID_PUBLIC_KEY and VAPID_PRIVATE_KEY, and set JWT_SECRET. See Environment Variables.

5. Create the database tables

npx prisma db push

6. Start the backend

npm run dev

The backend runs at:

http://localhost:9000

Frontend

1. Navigate to the frontend directory

cd zec-bounties-frontend

2. Install dependencies

yarn install

3. Start the development server

yarn dev

The frontend runs at:

http://localhost:3000

Environment Variables

zec-bounties-backend/.env.example lists every variable the backend reads, each with a placeholder and a one-line description, marked [required] or [optional]. Copy it to zec-bounties-backend/.env.

For local development you only need:

  • DATABASE_URL: PostgreSQL connection string (the example matches the Docker command above)
  • JWT_SECRET: any long random string
  • PORT=9000: matches the frontend's development backend URL in zec-bounties-frontend/lib/configENV.ts
  • VAPID_PUBLIC_KEY, VAPID_PRIVATE_KEY, VAPID_EMAIL: the backend won't start without them; generate the keys with npx web-push generate-vapid-keys

Everything else (GitHub and Discord login, email, Pinata uploads, Zcash wallets and payments) can keep its example value or stay blank until you work on that feature.


Development

Start the backend:

cd zec-bounties-backend
npm run dev

Start the frontend:

cd zec-bounties-frontend
yarn dev

Once both services are running, open:

Frontend: http://localhost:3000
Backend:  http://localhost:9000

NOTES & LIMITATIONS

  • Database: PostgreSQL (see the Docker command in the backend setup). Redis is also required.
  • To reset the database: docker rm -f zb-postgres, start it again with the same docker run command, and re-run npx prisma db push.
  • Zcash integration (payments, shielded tx, etc.) requires Zebrad + Zaino running and correctly configured in .env. Without them, bounty creation/submission UI may work but actual ZEC transfers will fail.
  • GitHub login is used for authentication. Set up a GitHub OAuth App at https://github.com/settings/developers and use the Client ID/Secret. For quick testing you can temporarily bypass auth in code if needed.
  • Both parts have their own lockfiles (yarn.lock / package-lock.json). Do not mix package managers.
  • Production deployment uses Vercel for frontend (see https://bounties.zechub.wiki/).
  • For issues or updates, check the subfolder README.md files or open issues on the GitHub repo.
  • This setup guide is derived from repo structure and sub-READMEs (as of July 2026). Always verify commands work in your environment.

TROUBLESHOOTING

  • Prisma errors: Ensure you ran npx prisma generate after any schema changes.
  • Port conflicts: the backend port is PORT in zec-bounties-backend/.env (9000 by default in .env.example); the frontend expects it at the URL in zec-bounties-frontend/lib/configENV.ts. Keep the two in step.
  • Yarn issues: Delete node_modules + yarn.lock and re-run yarn install.
  • Missing env vars: Double-check .env file location (must be in backend root) and restart backend.
  • Zcash RPC connection refused: Confirm Zebrad is running, RPC is enabled on the URL/port in .env, and credentials match.

For the most up-to-date info, visit the GitHub repo: https://github.com/ZecHub/zec-bounties

About

Bounty Platform with Native ZEC Payments

Resources

Contributing

Security policy

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages