Skip to content

Repository files navigation

πŸ“… DevEvent β€” Next-Gen Developer Event Platform

Next.js React MongoDB Tailwind CSS PostHog

DevEvent is a high-performance, visually stunning event management and discovery platform built from the ground up for developers. It serves as a unified catalog for hackathons, technical meetups, and conferences, allowing users to discover events, RSVP instantly, and enable organizers to publish new events with cloud media integration.


Preview


🌟 Overview

The Problem It Solves

Technological events, hackathons, and developer meetups are typically scattered across disparate websites (e.g., Meetup, Eventbrite, Devpost, Discord channels). This fragmentation makes it hard for developers to find relevant learning and networking opportunities, and equally challenging for event hosts to reach their target technical audience.

The Solution

DevEvent centralizes developer-focused events in a single, blazing-fast web portal. Organizers can seamlessly create events complete with custom poster banners, detailed agendas, and target audience segments. Developers can explore these events in a highly immersive UI, check schedules, and RSVP with a simple, secure one-click booking workflow.

Target Audience

  • Software Developers & Engineers searching for hackathons and tech meetups.
  • Tech Event Organizers seeking to host, manage, and promote conferences or local developer groups.
  • Sponsors and Recruiters looking to connect with technical talent at localized events.

✨ Features

  • 🎨 Immersive Canvas Shaders: Premium WebGL-rendered background glow using LightRays shader canvas elements via the OGL library for an interactive, modern user experience.
  • πŸ“… Dynamic Event Directory: Real-time listing of events with search capabilities, tags, event modes (online, offline, hybrid), and timing details.
  • ⚑ One-Click Instant booking: Quick RSVP validation ensuring each developer (unique email address) can claim only one ticket per event, complete with instant server-side double-booking protection.
  • πŸ“€ Cloud-Integrated Creator Hub: Fully controlled creation form allowing organizers to upload banner images directly to Cloudinary and structure event agendas on a modular timeline.
  • πŸ“ˆ Privacy-First Event Telemetry: Integrated PostHog tracking configured through a local server-side reverse proxy (/ingest) to route events safely without adblocker interference.
  • πŸ“± Responsive Layout & Micro-Animations: Built with mobile-first layout design using React 19, Tailwind CSS v4, custom-compiled component hooks, and smooth animation transitions.

πŸ› οΈ Tech Stack

Frontend & Core Layout

Backend & Database

Telemetry & Analytics

  • Analytics Platform: PostHog JS integrated client-side via Next.js instrumentation and custom rewrites.

πŸ“ Architecture & Workflow

The architecture leverages Next.js App Router hybrid rendering strategies combined with serverless MongoDB configurations.

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚     Next.js Client     β”‚
                    β”‚   (React 19 Frontend)  β”‚
                    β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
                          β”‚            β”‚
             (Server Actions)         (API Endpoints)
             createBooking()          GET/POST /api/events
                          β”‚            β”‚
                          β–Ό            β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚      Next.js Server    β”‚
                    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                    β”‚ Cloudinary β”‚ PostHog   β”‚
                    β”‚ Media API  β”‚ Ingest px β”‚
                    β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
                          β”‚            β”‚
                   (Media Storage) (Analytics Ingestion)
                          β”‚            β”‚
                          β–Ό            β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚        Database        β”‚
                    β”‚    (MongoDB Atlas)     β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Flow Highlight: Event Registration (RSVP)

  1. User RSVP Form: The user submits their email on an event detail card.
  2. Server Action Validation: The server invokes createBooking() which automatically connects to the database via Mongoose.
  3. Database Guardrails: A compound index constraints (eventId + email) prevents duplicate registration.
  4. Analytics Funnel: On successful booking, PostHog logs event_card_clicked with payload tags to build user conversion stats.

βš™οΈ Installation

Prerequisites

  • Node.js v20.x or above
  • npm, yarn, or pnpm installed
  • A running MongoDB instance (or free MongoDB Atlas cluster)
  • A Cloudinary Account for media hosting
  • A PostHog Project for behavioral analytics

Setup Steps

  1. Clone the Repository

    git clone https://github.com/Pranjal-Sahu21/nextjs-project.git
    cd nextjs-project
  2. Install Dependencies

    npm install
  3. Configure Environment Variables Create a .env.local file in the root directory. Copy the structure from below and fill in your credentials.


πŸ”‘ Environment Variables

To run the application, define these environment variables in your .env.local file:

# Database Connection String
MONGODB_URI=mongodb+srv://<db_user>:<db_password>@<cluster_address>/?retryWrites=true&w=majority

# Cloudinary Credentials for Banner Uploads
CLOUDINARY_URL=cloudinary://<api_key>:<api_secret>@<cloud_name>

# Application URL configurations
NEXT_PUBLIC_BASE_URL=http://localhost:3000

# PostHog Analytics Configurations
NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN=phc_your_posthog_project_token_here
NEXT_PUBLIC_POSTHOG_HOST=https://eu.i.posthog.com

Note

The CLOUDINARY_URL is parsed by the Cloudinary SDK directly. Do not expose your private secret keys to client-side bundles (do not prefix with NEXT_PUBLIC_).


πŸš€ Running the Project

Run these commands inside your project root directory:

Script Command Purpose
Development npm run dev Runs the app on http://localhost:3000 with hot-reloading
Production Build npm run build Compiles and optimizes the project for production
Start Production npm run start Runs the compiled build in server mode
Linting npm run lint Checks typescript, eslint rules, and code styles

πŸ’» Usage Examples

1. Booking an Event (Server Action)

import { createBooking } from "@/lib/actions/booking.actions";

const handleRegister = async (email: string, eventId: string, slug: string) => {
  const response = await createBooking({ eventId, slug, email });
  
  if (response.success) {
    console.log("Successfully registered!");
  } else {
    console.error("Booking error:", response.error); // Handles duplicate email validations
  }
};

2. Fetching Similar Events

import { getSimilarEventsBySlug } from "@/lib/actions/event.actions";

// Returns a list of events sharing tags with the current event, excluding itself
const related = await getSimilarEventsBySlug("react-nexus-2026");
console.log(related);

πŸ”Œ API Reference

1. Get All Events

  • Endpoint: GET /api/events
  • Query Parameters:
    • limit (number, optional): Max number of events to return.
  • Success Response (200 OK):
    {
      "message": "Events fetched successfully",
      "events": [
        {
          "_id": "67f81a7b...",
          "title": "React Nexus 2026",
          "slug": "react-nexus-2026",
          "date": "2026-06-15",
          "venue": "Grand Hall, SF",
          "image": "https://res.cloudinary.com/..."
        }
      ]
    }

2. Get Single Event by Slug

  • Endpoint: GET /api/events/[slug]
  • Success Response (200 OK):
    {
      "message": "Event fetched successfully",
      "event": {
        "title": "React Nexus 2026",
        "slug": "react-nexus-2026",
        "description": "Deep dive into React 19 and Next.js 16 compiler features...",
        "overview": "React 19 updates, Server components, compiler diagnostics.",
        "tags": ["react", "frontend", "nextjs"],
        "agenda": ["09:00 AM - Registration", "10:00 AM - React 19 Deep Dive"]
      }
    }

3. Create Event

  • Endpoint: POST /api/events
  • Content-Type: multipart/form-data
  • Payload Structure:
    • image (File, required): Poster banner file.
    • tags (stringified JSON array, required): e.g., ["react", "nextjs"]
    • agenda (stringified JSON array, required): e.g., ["09:00 - Welcome", "10:00 - Keynote"]
    • Extra text fields: title, description, overview, venue, location, date, time, mode, audience, organizer.

πŸ“ Folder Structure

The code follows the standardized Next.js App Router design layout:

β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   └── events/
β”‚   β”‚       β”œβ”€β”€ [slug]/route.ts   # Fetch specific event details
β”‚   β”‚       └── route.ts          # List & create events API endpoints
β”‚   β”œβ”€β”€ create-event/
β”‚   β”‚   β”œβ”€β”€ loading.tsx           # Form loading skeleton state
β”‚   β”‚   └── page.tsx              # Event publishing form
β”‚   β”œβ”€β”€ events/
β”‚   β”‚   β”œβ”€β”€ [slug]/
β”‚   β”‚   β”‚   β”œβ”€β”€ loading.tsx       # Detail page skeletons
β”‚   β”‚   β”‚   └── page.tsx          # Single event visual display
β”‚   β”‚   β”œβ”€β”€ loading.tsx           # Directory loading fallback
β”‚   β”‚   └── page.tsx              # Grid view of all events
β”‚   β”œβ”€β”€ globals.css               # Core styling tokens
β”‚   β”œβ”€β”€ layout.tsx                # Master page templates
β”‚   └── page.tsx                  # Home hero & featured event list
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/                       # Shadcn UI primitives & shaders
β”‚   β”‚   β”œβ”€β”€ LightRays.tsx         # Custom WebGL OGL Canvas shader
β”‚   β”‚   └── LightRays.css         # Canvas specific overlays
β”‚   β”œβ”€β”€ BookEvent.tsx             # RSVP interactive registration
β”‚   β”œβ”€β”€ CreateEventForm.tsx       # Controlled multi-part form
β”‚   β”œβ”€β”€ EventCard.tsx             # Event preview wrapper cards
β”‚   β”œβ”€β”€ EventDetails.tsx          # Full screen view content
β”‚   └── Navbar.tsx & Footer.tsx   # Global site layouts
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ booking.model.ts          # Mongoose Booking schema & hooks
β”‚   β”œβ”€β”€ event.model.ts            # Mongoose Event validation, slugs & dates
β”‚   └── index.ts                  # Unified model exports
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ actions/                  # Next.js Server Actions 
β”‚   β”‚   β”œβ”€β”€ booking.actions.ts    # Database writes for booking events
β”‚   β”‚   └── event.actions.ts      # Query logic for matching events
β”‚   β”œβ”€β”€ mongodb.ts                # Mongoose global connection pooler
β”‚   └── utils.ts                  # Layout utility functions
β”œβ”€β”€ next.config.ts                # Turbopack & rewrite configurations
β”œβ”€β”€ package.json                  # Dependencies configuration
└── tsconfig.json                 # TypeScript strict definitions

🌐 Deployment

Deploying to Vercel

  1. Install Vercel CLI or log in to the Vercel Dashboard.
  2. Link your GitHub repository hosting the code.
  3. In Settings -> Environment Variables, configure your production MongoDB URI and Cloudinary credentials.
  4. Set the Build Command to npm run build and Output Directory to .next.
  5. Deploy! Vercel automatically sets up edge serverless functions to run API routes.

πŸ§ͺ Testing

This project incorporates strict static type enforcement and code quality standards:

Code Audits

To inspect structural code layout, run the automated linting checks:

npm run lint

Database Integration Tests

Ensure database instances are properly verified. You can test your remote MongoDB configuration directly by querying the endpoint:

curl http://localhost:3000/api/events

About

A modern event discovery and management platform for developers, enabling seamless exploration, publishing, and RSVP management for hackathons, meetups, and tech conferences through a sleek, high-performance interface.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages