This starter kit provides a fully working hackathon website that you can use to run your own hackathon. It's built with Scaffold-ETH 2.
Before you begin, you need to install the following tools:
- Node (>= v18.17)
- Yarn (v1 or v2+)
- Git
- Docker Engine
- Install dependencies
yarn install
- Spin up the Postgres database service + create database + seed
docker-compose up -d
yarn drizzle-kit push
yarn seed
See more info about the database in the section below
- Start your NextJS app:
yarn start
Visit your app on: http://localhost:3000
.
Submission and Voting processes are disabled by default.
To enable the features, you need to set the following environment variables:
NEXT_PUBLIC_SUBMISSIONS_ENABLED
: Set totrue
to enable submissionsNEXT_PUBLIC_VOTING_ENABLED
: Set totrue
to enable voting
You can set these variables in your .env.local
file for local development:
NEXT_PUBLIC_SUBMISSIONS_ENABLED=true
NEXT_PUBLIC_VOTING_ENABLED=true
For production, set these variables in your hosting provider's environment configuration.
If you want to change this default behavior, you can modify the logic in your scaffold config file located at packages/nextjs/scaffold.config.ts
. Look for the submissionsEnabled
and votingEnabled
properties in the scaffoldConfig
object.
We are using Drizzle with Postgres. You can run drizzle-kit
from the root with yarn drizzle-kit
- To sync your database run
yarn drizzle-kit migrate
- Tweak
seed.js
if needed + runyarn seed
(will delete existing data)
To iterate on the database:
- Tweak the schema in
schema.ts
yarn drizzle-kit generate
to create migration files (or useyarn drizzle-kit push
if you are just tinkering)
You can explore the database with yarn drizzle-kit studio