Skip to content

Repository files navigation

EventsHub β€” Frontend

Find your people for events & activities. A modern platform to discover local events, join activities, host gatherings, and manage everything from a clean, role-aware dashboard.

Next.js React TypeScript Tailwind CSS

Live Demo Β· Backend API Β· Dashboard Docs


Overview

EventsHub connects people through shared experiences β€” concerts, hikes, game nights, workshops and more. This repository is the Next.js frontend; it talks to a separate Express + Prisma REST API over JWT (HTTP-only cookie) auth.

It ships three coordinated surfaces:

  • Public site β€” landing page, event discovery, event details, authentication.
  • Admin dashboard β€” a "Clean Light Pro" control center for managing users, hosts, events, participants, payments, reports, revenue analytics, and notifications.
  • Host tools β€” a per-event "Manage" workspace for analytics, invitations, check-in/attendance, and co-hosts.

Features

Public

  • πŸ”Ž Browse & search events with filters (category, status, location)
  • πŸ“… Event detail pages with host info, capacity, pricing, and ratings
  • πŸ” Authentication β€” register, login, forgot/reset password (JWT via HTTP-only cookies)
  • ⚑ Quick demo login β€” one-click sign-in as User / Host / Admin

Admin Dashboard (/admin/dashboard)

  • πŸ“Š Overview β€” KPIs + bespoke SVG charts (revenue, signups, events, status mix)
  • πŸ‘₯ Users β€” search/filter, block/unblock, delete
  • πŸ›‘οΈ Admins β€” role promote/demote (SUPER_ADMIN-gated)
  • ✨ Hosts β€” verify toggle + per-host stats
  • 🎟️ Events β€” browse, inspect, force-cancel (moderation)
  • 🧾 Participants β€” every join request, filterable & removable
  • πŸ’³ Payments β€” transactions + refunds
  • 🚩 Reports β€” resolve / dismiss content reports
  • πŸ“ˆ Revenue β€” monthly trend + top events/hosts
  • πŸ”” Notifications β€” topbar bell + full center
  • πŸŒ— Light/Dark theme toggle (light-first)

Host Tools (/manage-events)

  • πŸ“‰ Per-event analytics (views, capacity, revenue, attendance)
  • βœ‰οΈ Invitations (send / list / revoke + invitee accept-decline)
  • βœ… Check-in & attendance (token-based)
  • 🀝 Co-host management

Tech Stack

Area Technology
Framework Next.js 16 (App Router, Server Actions, React Server Components)
Language TypeScript 5
UI React 19, Tailwind CSS v4, shadcn/ui (Radix primitives)
Charts Bespoke lightweight SVG components (no charting dependency)
Forms & Validation react-hook-form, zod
Motion framer-motion
Notifications sonner
Icons lucide-react
Fonts Sora Β· Onest Β· JetBrains Mono (dashboard) Β· Geist (public) via next/font

Project Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (authentication)/      # login, register, forgot/reset password
β”‚   β”œβ”€β”€ (commonLayout)/        # public site (home, events, profile, invite accept)
β”‚   └── (dashboardLayout)/
β”‚       β”œβ”€β”€ admin/dashboard/   # admin management pages
β”‚       └── (commonDashboard)/ # my-events + host "manage-event" tools
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/                    # shadcn/ui primitives
β”‚   β”œβ”€β”€ dashboard/             # reusable dashboard primitives (StatCard, PageHeader, …)
β”‚   β”œβ”€β”€ modules/               # feature components grouped by domain
β”‚   └── shared/                # navbar, footer, table, cells, dialogs
β”œβ”€β”€ services/                  # server actions per domain (auth, events, payment, …)
β”œβ”€β”€ types/                     # shared TypeScript interfaces
β”œβ”€β”€ lib/                       # utils, server-fetch, formatters, theme controller
└── zod/                       # validation schemas
docs/                          # per-feature dashboard documentation
plan.md                        # dashboard reconstruction plan & changelog

Getting Started

Prerequisites

1. Clone & install

git clone https://github.com/repon001/EventsActivities-frontend.git
cd EventsActivities-frontend
pnpm install      # or: npm install

2. Configure environment

Create a .env file in the project root:

# Base URL of the backend REST API
NEXT_PUBLIC_BASE_API_URL=http://localhost:5000/api/v1

3. Run the dev server

pnpm dev          # or: npm run dev

Open http://localhost:3000.

ℹ️ The frontend needs the backend running (default http://localhost:5000) for auth and data.


Demo Accounts

The login screen includes Quick demo login buttons. Seed them in the backend with node prisma/seed-demo.js, then sign in instantly:

Role Email Password
User user@eventshub.test Demo@1234
Host host@eventshub.test Demo@1234
Admin admin@eventshub.test Demo@1234

Scripts

Command Description
pnpm dev Start the development server
pnpm build Create a production build
pnpm start Run the production build
pnpm lint Lint with ESLint

Architecture Notes

  • Auth β€” JWT access/refresh tokens stored as HTTP-only cookies; lib/server-fetch.ts forwards them on server-side requests, and loginUser sets them via Server Actions.
  • Data fetching β€” pages are React Server Components that call typed Server Actions in src/services/*; lists/filters/pagination are driven entirely by URL query params.
  • Dashboard theming β€” a token-scoped design system (.aurora / .aurora-light in globals.css) re-skins every dashboard page from one place; light is the default with an optional dark toggle. The public site is unaffected.
  • Reusable primitives β€” PageHeader, StatCard, StatusBadge, GlassCard, EmptyState, SelectFilter, ConfirmActionDialog, and an enhanced ManagementTable (sortable + generic row actions) power all management pages.
  • Docs β€” each dashboard feature has a write-up in docs/; the overall plan and changelog live in plan.md.

Deployment

Optimized for Vercel. Set NEXT_PUBLIC_BASE_API_URL to your deployed backend URL in the project's environment variables, then deploy from the Git repository. Any Node-compatible host that supports Next.js 16 also works.


License

This project is for educational and portfolio purposes.

Built with Next.js Β· Made by Repon

About

🎟️ Event Discovery Platform – A full-stack event management app built with Next.js, Node.js, PostgreSQL, Prisma, and TypeScript featuring SSR, advanced search, and SSLCommerz payment integration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages