Logo Lanfrica

Wizard-hash2/jhub_hackathon_site

Domain:

digital infrastructure

Record type:

software
Creator:
Wiz
Host:
This is a reusable hackathon website template designed for JHUB Africa. Feel free to fork and adapt it for your own projects. # JHUB Africa Hackathons Hackathon discovery site for **JHUB Africa × JKUAT**, built with Next.js (App Router), TypeScript, Tailwind CSS v4, Drizzle ORM and PostgreSQL. --- ## 1. Prerequisites | Tool | Version | Check with | | ---------- | ------------------------ | ----------------- | | Node.js | 20.9+ (22 LTS recommended) | `node -v` | | npm | 10+ | `npm -v` | | PostgreSQL | 14+ | `psql --version` | Download Node from nodejs.org and Postgres from postgresql.org. --- ## 2. Open in VS Code ```bash # unzip, then: cd jhub-africa-hackathons code . ``` Or: **VS Code → File → Open Folder…** and pick the unzipped folder. Open the built-in terminal with `` Ctrl+` `` (Windows/Linux) or `` Cmd+` `` (macOS) and run the commands below from there. ### Recommended extensions - **ESLint** (`dbaeumer.vscode-eslint`) - **Tailwind CSS IntelliSense** (`bradlc.vscode-tailwindcss`) - **Prettier** (`esbenp.prettier-vscode`) --- ## 3. Install dependencies `node_modules` is not included in the zip, so install first: ```bash npm install ``` --- ## 4. Start PostgreSQL and create the database **Option A — Docker (easiest):** ```bash docker run --name jhub-pg \ -e POSTGRES_PASSWORD=postgres \ -e POSTGRES_DB=app_db \ -p 5432:5432 -d postgres:16 ``` **Option B — local Postgres install:** ```bash psql -U postgres -c "CREATE DATABASE app_db;" ``` --- ## 5. Configure environment variables Create a `.env` file in the project root (copy from `.env.example`): ```bash cp .env.example .env ``` It should contain: ``` DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:5432/app_db ``` > ⚠️ **Gotcha:** the connection string also lives in `drizzle.config.json`. If you change your > Postgres user, password, port or database name, update **both** `.env` and `drizzle.config.json`. --- ## 6. Create the database tables ```bash npx drizzle-kit push ``` This reads `src/db/s …