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:
yarn install
docker-compose up -d
yarn drizzle-kit push
yarn seed
See more info about the database in the section below
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 to true
to enable submissionsNEXT_PUBLIC_VOTING_ENABLED
: Set to true
to enable votingYou 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
yarn drizzle-kit migrate
seed.js
if needed + run yarn seed
(will delete existing data)To iterate on the database:
schema.ts
yarn drizzle-kit generate
to create migration files (or use yarn drizzle-kit push
if you are just tinkering)You can explore the database with yarn drizzle-kit studio