PrimeHacks is a production-style hackathon platform frontend built with Next.js App Router. It is designed to help teams discover hackathons, submit projects, apply as organizers, manage events, upgrade to premium plans, and administer platform users from a polished dashboard experience.
This repository currently contains the client application. It depends on a separate backend API for authentication, hackathon data, submissions, payments, organizer applications, and admin operations.
- Production-oriented Next.js 16 frontend with App Router and TypeScript
- Role-aware experience for users, organizers, and admins
- Email/password authentication with email OTP verification
- Google social sign-in through
better-auth - Public hackathon discovery flow with detailed event pages
- Project submission workflow for authenticated participants
- Organizer application flow with review status tracking
- Organizer hackathon creation, editing, listing, and deletion
- Premium subscription checkout flow with payment verification
- Admin user management with role and status updates
- TanStack Query SSR hydration for smoother data loading
- Tailwind CSS 4 + DaisyUI based UI system with dark/light theme toggle
| Area | Status | Notes |
|---|---|---|
| Landing page and branded marketing UI | Ready | Home page, navbar, footer, themed sections, testimonials-style content |
| Authentication | Ready | Login, registration, Google sign-in, OTP email verification |
| GitHub social login | Partial | Button exists in UI, but action is currently disabled |
| Hackathon discovery | Ready | Listing page, hero section, cards, details page, sidebar metadata |
| Hackathon details access | Ready with constraint | /hackathons/details/[id] is currently protected and requires authentication |
| Project submissions | Ready | Submission modal/form and "My Submissions" dashboard page |
| Organizer application | Ready | Apply flow plus dashboard status/history view |
| Organizer event management | Partial | Create, edit, list, and delete are present; some organizer dashboard pages are placeholders |
| Premium subscription | Ready | Checkout session creation and success-page verification flow |
| Admin dashboard | Partial | User management is implemented; other admin analytics routes are scaffolded in navigation only |
| Profile and account UI | Partial | Profile page is functional; change password screen is UI-only right now |
| Blog/resources/secondary pages | Partial | Some nav/footer destinations are placeholders or not implemented yet |
| Automated testing | Not set up yet | No unit/integration test suite is configured in this repo |
| Layer | Technology |
|---|---|
| Framework | Next.js 16.1.7 |
| UI | React 19, Tailwind CSS 4, DaisyUI, Lucide React, Framer Motion |
| Language | TypeScript |
| State/Data | TanStack Query, TanStack Form |
| HTTP | Axios |
| Auth client | better-auth/react |
| Validation | Zod |
| 3D/visual extras | Three.js, @react-three/fiber, @react-three/drei |
| Package/runtime | pnpm workspace, Bun used by current dev script |
- App Router based route groups split into public/common pages and dashboard pages
- Server-side prefetching with
QueryClient,dehydrate, andHydrationBoundary - Client-side mutations and cache invalidation handled with TanStack Query
- Form state handled with TanStack Form plus Zod/manual validation
- Client requests are sent to relative paths under
/api/v1 - Auth requests are sent to
/api/auth next.config.tsrewrites both route groups to the configured backend origin- Server-side data fetching uses the backend origin directly through
getServerApiBaseUrl()
- Session-related cookies are checked in
src/proxy.ts - Protected route groups currently include
/dashboard,/profile,/premium,/change-password, and/hackathons/details/[id] - Registration stores pending verification state and redirects users to
/verify-email
authhackathonssubmissionpaymentsorganizerApplicationadmins/users
//hackathons/login/register/verify-email/become-organizer/blog
/hackathons/details/[id]/profile/premium/change-password/dashboard/dashboard/my-submissions/dashboard/organizer-application
/dashboard/organizer/dashboard/organizer/hackathons/create/dashboard/organizer/hackathons/my-hackathons/dashboard/organizer/hackathons/[id]/edit/dashboard/organizer/manage-rewards
/dashboard/admin/all-users
- Node.js 20+
- pnpm 9+ or newer
- Bun 1+ if you want to use the current
pnpm devscript unchanged - A running backend API compatible with the service layer used in this repo
pnpm installCopy .env.example to .env and update the values for your environment.
cp .env.example .envIf you are on Windows PowerShell:
Copy-Item .env.example .envpnpm devImportant: the current dev script runs bunx next dev, so Bun must be installed. If you want a Node-only workflow, update the script to next dev first.
Visit http://localhost:3000.
The backend origin is resolved in this order:
NEXT_PUBLIC_API_BACKEND_URLNEXT_PUBLIC_API_BASE_URLNEXT_PUBLIC_API_BASE_URL_AUTH
For the least surprise, keep all three backend-related variables set as shown in .env.example.
| Variable | Required | Purpose | Example |
|---|---|---|---|
NEXT_PUBLIC_API_BACKEND_URL |
Recommended | Base backend origin used by rewrites and server-side fetches | http://localhost:5000 |
NEXT_PUBLIC_API_BASE_URL |
Recommended | Explicit API v1 base URL used as a compatibility fallback | http://localhost:5000/api/v1 |
NEXT_PUBLIC_API_BASE_URL_AUTH |
Recommended | Explicit auth API base URL used as a compatibility fallback | http://localhost:5000/api/auth |
NEXT_PUBLIC_APP_URL |
Recommended | Frontend origin used by better-auth callback resolution |
http://localhost:3000 |
NEXT_PUBLIC_SITE_URL |
Optional | Alternate fallback for frontend origin | http://localhost:3000 |
NEXT_DIST_DIR |
Optional | Custom Next.js build directory | .next |
| Command | Description |
|---|---|
pnpm dev |
Starts the local development server through Bun |
pnpm build |
Builds the production bundle |
pnpm start |
Starts the production server |
pnpm lint |
Runs ESLint |
.
|- docs/
|- public/
|- src/
| |- app/ # App Router pages and route groups
| |- components/ # Shared UI and page-level components
| |- hooks/ # Query hooks and session helpers
| |- lib/ # Axios client, config, auth helpers, utilities
| |- modules/ # Domain modules (organizer application, etc.)
| |- providers/ # Query provider and app-level providers
| |- services/ # API service layer
| |- types/ # Shared TypeScript domain types
| |- validations/ # Submission validation helpers
| |- Zod/ # Auth/submission schemas
| |- proxy.ts # Route protection and redirect logic
|- next.config.ts # Rewrites and Next.js config
|- package.json
- User registers with email and password
- Tokens are stored in cookies
- Pending verification cookie is set
- User is redirected to
/verify-email - After OTP verification, the user logs in and gains access to protected routes
- User signs in
- User explores the hackathon catalog
- User opens
/hackathons/details/[id] - User submits project details through the submission form
- User tracks submissions in
/dashboard/my-submissions
- User applies through
/become-organizer - Admin reviews the organizer application
- Approved organizer manages hackathons from the dashboard
- Organizer creates, edits, and deletes owned hackathons
- User opens
/premium - Client requests a checkout session from the backend
- User is redirected to the payment provider
- Payment success page verifies the returned session
- User profile/dashboard can then reflect premium access
- This app is well suited for Vercel deployment, but it can run on any host that supports Next.js
- The backend must be deployed separately and exposed through the configured environment variables
- Rewrites in
next.config.tsassume the backend serves:/api/v1/*/api/auth/*
- If you use remote images outside the current allowlist, update
images.remotePatterns
- Connect the disabled GitHub social login flow
- Replace placeholder pages such as root dashboard screens, blog page, and organizer rewards screen
- Add missing routes referenced in navigation and footer sections
- Wire the change-password UI to a real backend endpoint
- Add automated tests for auth, hackathon flows, and dashboard mutations
- Add a proper
.env.productionstrategy and deployment checklist - Add monitoring, analytics, and error tracking before production launch
This frontend assumes a backend that supports:
- Cookie-based authentication
- Email OTP verification
- Google social auth
- CRUD operations for hackathons
- Project submission endpoints
- Organizer application endpoints
- Payment checkout and session verification
- Admin user role/status management
If you publish this repository on GitHub, it is a good idea to link the backend repository here once it is available.
If you are continuing development on this project:
- Keep service contracts in sync with the backend
- Document new environment variables in
.env.example - Update this README when routes or flows change
- Add tests for every critical user-facing flow you finish
No license file is included yet. Add a license before publishing publicly if you want others to reuse the code.