HackTrack is a personal hackathon portfolio and admin workspace. Visitors can explore published events, projects, journals, achievements, and useful platforms. The administrator signs in to create, update, publish, and remove records.
v0: https://github.com/gopal092003/HackDir
- Dashboard with participation counts, a monthly calendar, and recent achievements.
- Upcoming and live hackathon summaries, searchable listings, and card/table views.
- Ended hackathons ranked by recorded achievements, plus a searchable participation history.
- Hackathon detail pages for event dates, project links, tech stack, public journal entries, and achievements.
- Achievement and platform directories.
- Admin-only create, edit, delete, and publish controls. Destructive actions require confirmation.
- Dark and light themes, with dark mode as the default, an animated network background, and a custom cursor.
- Responsive layouts and Supabase Row Level Security (RLS) for database-side access control.
| Route | Purpose |
|---|---|
/ |
Public dashboard |
/hackathons |
Upcoming and live hackathons |
/hackathons/ended |
Completed hackathons |
/hackathons/[slug] |
Event, project, journal, and achievement details |
/participation-history |
Participation history |
/achievements |
Achievement portfolio |
/sites |
Hackathon platforms and resources |
/login |
Administrator sign-in; there is no public sign-up page |
- Next.js 15 App Router, React 19, and TypeScript
- Supabase Auth and PostgreSQL with RLS
- Upstash Redis REST API for shared production rate limits
- Three.js for the animated network background
- Vercel deployment
Create or select a Supabase project. The SQL migrations in this repository extend the existing HackTrack base schema; they expect the original hackathons and sites tables to exist. If you are starting with an empty database, create those base tables first. See database and deployment security for the migration order and access setup.
Copy the project URL and anon/public key from Supabase into .env.local:
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
APP_ORIGIN=http://localhost:3000Do not add a Supabase service-role key to the app. Keep .env.local private; it is ignored by Git.
npm install
npm run devOpen http://localhost:3000.
Disable public sign-ups in Supabase Auth. Assign the trusted app_metadata.role = "admin" claim to the administrator account as described in the security guide, then sign out and back in to refresh the session.
For an existing legacy HackTrack database, apply db/supabase-migration-v2.sql, db/supabase-migration-v3.sql, then db/supabase-migration-v6.sql in the Supabase SQL editor. Migration v3 adds the portfolio tables and RLS policies; v6 tightens table grants and ensures the admin check uses trusted Auth metadata. Migrations v4 and v5 are retained in db/ for historical upgrade paths; v6 includes the current admin-function and grant hardening.
The dashboard derives participation from event dates because the schema has no separate participation flag: live and completed events count as participated; upcoming events count as planned.
npm testThe tests cover admin-role checks, login flow behavior, same-origin validation, request-size handling, search-filter escaping, and the shared rate limiter. They do not connect to a live Supabase or Redis instance.
- Security and deployment guide: migrations, admin authorization, rate limits, production environment variables, and host-level controls.
Issues, suggestions, and pull requests are welcome. Before opening a pull request, run npm test and describe any database migration required by the change.
Created by Gopal Gupta.