Go to file
ravigulhane b91dbff911 Delete microsite-v2-templates/crest-novel/assets/fonts/LineIcons.eot?y2l643 2026-07-16 05:01:12 +00:00
microsite-v2-templates Delete microsite-v2-templates/crest-novel/assets/fonts/LineIcons.eot?y2l643 2026-07-16 05:01:12 +00:00
public Add personal information and tourist places support to concierge pipeline 2026-07-01 16:47:27 +05:30
scripts Add org ACL, form grants, and Crest microsite v2 support. 2026-07-13 15:11:21 +05:30
src Add org ACL, form grants, and Crest microsite v2 support. 2026-07-13 15:11:21 +05:30
.env.example Add org ACL, form grants, and Crest microsite v2 support. 2026-07-13 15:11:21 +05:30
.gitignore First Version 2026-04-03 15:19:50 +05:30
.nvmrc Your commit message 2026-07-08 11:57:43 +05:30
README.md Add food recommendation features 2026-06-10 10:38:26 +05:30
bedrock-iam-policy.example.json first commit 2026-06-02 10:43:50 +05:30
package-lock.json Add org ACL, form grants, and Crest microsite v2 support. 2026-07-13 15:11:21 +05:30
package.json Add org ACL, form grants, and Crest microsite v2 support. 2026-07-13 15:11:21 +05:30
server.js First Version 2026-04-03 15:19:50 +05:30

README.md

EventBuzz Backend

Node.js backend for EventBuzz built with Hapi.js and MongoDB (Mongoose), as per FULL_STACK_MIGRATION_PLAN.md.

Stack

  • Runtime: Node.js (v18+)
  • Framework: Hapi.js
  • Database: MongoDB with Mongoose ODM
  • Auth: JWT (hapi-auth-jwt2)
  • Validation: Joi

Setup

  1. Install dependencies

    cd backend && npm install
    
  2. Environment

    • Copy .env.example to .env
    • Set MONGODB_URI (e.g. mongodb://localhost:27017/eventbuzz)
    • Set JWT_SECRET and JWT_REFRESH_SECRET for production
    • Optional Google SSO: set GOOGLE_CLIENT_ID to your OAuth 2.0 Web client ID (same value as the dashboard’s VITE_GOOGLE_CLIENT_ID). Add authorized JavaScript origins for each app URL in Google Cloud Console.
  3. Run

    npm run dev
    

    Server runs at http://localhost:3002 (or PORT from .env).

  4. Multi-tenant backfill (after pulling schema that requires org on forms/speakers)
    Run once against your database before restart if you have legacy rows:

    npm run backfill:tenant-organization
    

API Overview

  • Auth: POST /api/auth/register, POST /api/auth/login, POST /api/auth/google, POST /api/auth/google/register, GET /api/auth/me, etc.
  • Events: GET/POST /api/events, GET/PUT/DELETE /api/events/:id
  • Participants: GET/POST /api/events/:eventId/participants, POST /api/participants/:id/check-in
  • Sessions: GET/POST /api/events/:eventId/sessions, GET/PUT/DELETE /api/sessions/:id
  • Speakers: GET/POST /api/speakers, GET /api/events/:eventId/speakers
  • Questions: GET/POST /api/events/:eventId/questions, POST /api/questions/:id/upvote, POST /api/questions/:id/answer
  • Quiz/Polls: GET/POST /api/events/:eventId/quiz-polls, POST /api/quiz-polls/:quizPollId/responses
  • Campaigns: GET/POST /api/events/:eventId/campaigns, POST /api/campaigns/:id/send
  • Notifications: GET /api/notifications, PUT /api/notifications/:id/read
  • Forms: GET/POST /api/events/:eventId/forms, POST /api/forms/:formId/submit
  • Design templates: GET/POST /api/design-templates, POST /api/design-templates/:id/use/:eventId
  • Reward points: GET/POST /api/events/:eventId/reward-points, GET /api/events/:eventId/leaderboard
  • Event pages: GET/POST /api/events/:eventId/pages, GET /api/pages/public/:eventSlug/:pageSlug
  • Media: GET /api/media, POST /api/media/upload
  • Payment: GET/POST /api/payment/config, POST /api/payment/create-order, POST /api/payment/verify
  • Organization: GET/PUT /api/organization, GET/POST/PUT/DELETE /api/users

Protected routes expect header: Authorization: Bearer <token>.

Project structure

backend/
├── src/
│   ├── config/       # database, constants
│   ├── models/       # Mongoose models (User, Event, Participant, etc.)
│   ├── controllers/  # Route handlers
│   ├── routes/       # Hapi route definitions
│   ├── middleware/   # Auth helpers
│   ├── utils/        # response helpers
│   └── app.js        # Server setup
├── server.js
├── package.json
└── .env.example