BuidlGuidl / hackathon-starter-kit

https://extensions-hackathon.vercel.app
MIT License
6 stars 1 forks source link

Hackathon Starter Kit

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.

Requirements

Before you begin, you need to install the following tools:

Development Quickstart

  1. Install dependencies
yarn install
  1. 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

  1. Start your NextJS app:
yarn start

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

Enabling Submissions and Voting

Submission and Voting processes are disabled by default.

To enable the features, you need to set the following environment variables:

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.

Database (dev info)

We are using Drizzle with Postgres. You can run drizzle-kit from the root with yarn drizzle-kit

To iterate on the database:

You can explore the database with yarn drizzle-kit studio