Skip to content

Latest commit

 

History

470 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codeblooded Events Platform

Project repo for the Codeblooded Events Platform (Backend + Frontend).

Quick summary:

  • Backend: Node.js + Express, MongoDB, Redis, authentication, Stripe payments, email notifications.
  • Frontend: Next.js (app directory), React, Stripe client, Tailwind/CSS components.

This README covers: setup, running the project, required environment variables, how the features map to the supplied requirements, and troubleshooting tips.


🛠️ Prerequisites

  • Node.js (v18+ recommended) and npm installed
  • MongoDB Atlas cluster (or MongoDB connection string)
  • Redis instance (if used in config)
  • Stripe account for payments (publishable & secret keys)

🚀 Getting Started

  1. Clone the repo and open workspace:

   cd /path/to/Codeblooded

  1. Install dependencies

   Backend:

   powershell    cd Backend    npm install    

   Frontend:

   powershell    cd ../Frontend    npm install    

  1. Configure environment variables
  • Backend: copy Backend/config.env or create it in the Backend folder. Required variables (examples):

  ```dotenv   DATABASE=mongodb+srv://:@/?retryWrites=true&w=majority   DATABASE_USERNAME=adhamlotfy539_db_user   DATABASE_PASSWORD=YOUR_DB_PASSWORD

  JWT_VERIFICATION_SECRET=... (long hex secret)   ACCESS_TOKEN_SECRET=... (long hex secret)

  REDIS_URL=your.redis.host   REDIS_PORT=10219   REDIS_PASSWORD=your_redis_password

  EMAIL_USER=your@email.com   EMAIL_PASSWORD=your_email_app_password

  STRIPE_SECRET_KEY=sk_test_...   ```

  • Frontend: in the Frontend folder copy .env.local.example to .env.local and set values:

  bash   NEXT_PUBLIC_STRIPE_PUBLIC_KEY=pk_test_...   NEXT_PUBLIC_API_URL=http://localhost:4999   NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000  

Running the App Locally

  • Start Backend (from Backend):

  powershell   cd Backend   npm run start   # or for development with nodemon   npm run dev  

  • Start Frontend (from Frontend):

  powershell   cd Frontend   npm run dev  

Important Pages & Endpoints

  • Backend API base: process.env.NEXT_PUBLIC_API_URL (set in frontend env)
  • Sales report endpoint: GET /sales/report (protected: Admin/Events_Office)
  • Attendees summary endpoint: GET /events/stats/workshop-trip-attendees
  • Workshop participants: GET /workshops/participants/:workshopId

✨ Full Feature List

1. 🔑 User Management & Authentication

  • Sign-Up/Login:
    • Student/Staff/TA/Professor sign up using GUC email, password, name, and ID.
    • Vendor sign up with email, password, and company name.
    • Admins/Events Office accounts are created by other Admins.
  • Verification & Roles:
    • Student receives email verification link upon sign-up.
    • Vendor must upload tax card and logo for company validity check.
    • Admin inserts and verifies roles (Staff/TA/Professor) and sends a verification email.
    • Admin can create/delete other Admin/Events Office accounts.
  • Profile:
    • Users can log in/out.

2. 🗓️ Events: Discovery & Management

  • CRUD (Create/Edit/Delete):
    • Professor creates/edits Workshops (requires Events Office approval).
    • Events Office creates/edits Bazaars, Trips, and Conferences.
    • Events Office archives passed events.
    • Events Office/Admin can delete events (only if no one has registered).
  • Discovery:
    • View all available events (Workshops, Trips, Bazaars, Booths, Conferences).
    • Search events by name (Professor/Event) or type.
    • Filter events by name, location, type, or date.
    • Sort events by date.
  • Engagement:
    • Users can rate and comment on attended events.
    • Users can add/view events in their favorites list.

3. 💳 Registration, Payments, & Refunds

  • Registration:
    • Students/Staff/TA/Professor can register for workshops/trips using name, mail, and ID.
    • Events Office can restrict events to specific user types.
  • Payments:
    • Pay using credit card/debit card (Stripe) or from the user's wallet.
    • Receive a payment receipt via email.
  • Post-Registration:
    • View a list of registered events (upcoming and past).
    • Receive a certificate of attendance for finished workshops via email.
    • Cancellation: Cancel registration and refund the amount to the user's wallet (cancellation only accepted if >2 weeks before event).
    • View refunded amount in wallet.

4. 💼 Vendor & Loyalty Program

  • Bazaar/Booth Applications:
    • Vendor views list of upcoming bazaars.
    • Vendor applies to join a Bazaar (names of attendees, booth size 2x2 or 4x4).
    • Vendor applies for a Booth (names of attendees, duration 1-4 weeks, location via map, size 2x2 or 4x4).
    • Vendor uploads IDs of attending individuals.
  • Verification & Payment:
    • Vendor receives email notification of acceptance/rejection.
    • Vendor pays participation fees upon acceptance (deadline: 3 days).
    • Vendor can cancel participation request before payment is made.
    • Vendor receives payment receipt and QR codes for registered visitors via email.
  • Loyalty Program:
    • Vendor applies for GUC Loyalty Program (discount rate, promo code, T&Cs).
    • Users view list of GUC Loyalty partners.

5. 🧑‍💻 Admin & Events Office Specific

  • User/Content Moderation:
    • Admin views list of all users and status (active/blocked).
    • Admin can block any user.
    • Admin deletes inappropriate comments (sends a warning email to the commenter).
  • Workflow:
    • Events Office receives notifications for workshop requests.
    • Events Office accepts, rejects, or requests edits on workshops.
  • Reporting & Data:
    • Events Office/Admin views report on total attendees (filterable by name/type/date).
    • Events Office/Admin views sales report (filterable by type/date, sortable by revenue).
    • Events Office exports registered names to .xlxs sheet (except conferences).
    • Events Office generates QR codes for external bazaar/career fair visitors.

6. 🤸 Sports & Campus Activities

  • Courts:
    • Student views availability of courts (basketball/tennis/football).
    • Student reserves a court (automatically includes name and GUC ID).
  • Gym Sessions:
    • View monthly gym schedule (yoga, Zumba, etc.).
    • Users register to attend a session.
    • Events Office creates/edits (date, time, duration only)/cancels gym sessions.
    • Users receive email notification if a registered session is cancelled or edited.
  • Polls:
    • Events Office creates polls for vendors requesting to set up booths.
    • Users vote for a preferred vendor from the poll.

7. ✨ Additional Features

  • Hype Badges: Urgency indicators (e.g., "Selling Fast!") to create a psychological hook for users.
  • One-Tap Native Share: Utilizes browser APIs for seamless social sharing to increase virality.
  • One-Click Calendar: Allows users to instantly add events to their calendar to improve retention and attendance.
  • Vendor WhatsApp: Provides a direct chat link to vendors to facilitate immediate connection.
  • Similar Events: Suggests related events to keep users discovering more content on the platform.

Feature Mapping (Requirements)

Below is a concise mapping of the provided requirements to the codebase and current implementation status.

  • Auth & Registration   - Sign up / login for Students/Staff/TA/Professor: Backend routes for auth and verification implemented (requirements 1,4,6,9,10).   - Vendor sign up and document upload: vendor endpoints exist, vendor file uploads are stored in Backend/uploads and validated (requirements 2,3,62).   - Admin flow: creating admin/events office, approving roles and sending verification emails (requirements 5,7,8).

  • Events CRUD & Search/Filter/Sort   - Events types supported: Workshop, Trip, Bazaar, Booth, Conference. Display, search, filter and sort endpoints exist (requirements 11–14).

  • Registration & Payments   - Register for workshops/trips and pay via Stripe (server + client integration) (requirements 24–29, 25–26).   - Receipts via email and wallet refund flows implemented (requirements 26,28,29).

  • Workshops / Professors / Events Office   - Professors create/edit workshops; Events Office approves and publishes (requirements 35–45).   - Events Office can export participants, restrict events, generate QR codes, send certificates (requirements 49–51,30).

  • Vendors   - Vendor applications, accept/reject flows, file uploads and notifications (requirements 59–77).

  • Reports & Stats   - Attendees report & filters: Frontend page created at /events_office/attendees_report that queries /events and aggregates attendees client-side (requirements 52–53).   - Sales report: Frontend page at /events_office/report and backend GET /sales/report implemented with sorting and filtering options (requirements 54–56).

  • Notifications & Reminders   - System notifications and email reminders are available for event creation, registration reminders (requirements 39,44,57,58).

Developer Notes & Tips

  • Environment variables must not be committed. Add them to .gitignore where appropriate.
  • If you see NEXT_PUBLIC_STRIPE_PUBLIC_KEY is not set. Stripe will not be initialized. make sure to set the key in Frontend/.env.local and restart Next.js.
  • If Mongo authentication fails, verify the Atlas user exists and update Backend/config.env with the correct DATABASE_USERNAME and DATABASE_PASSWORD.

Testing

  • Backend tests (jest) are present in Backend/tests. Run from Backend:

  powershell   cd Backend   npm test  

Troubleshooting Common Errors

  • Mongo auth error: MongoServerError: bad auth : authentication failed — re-check credentials in Backend/config.env and ensure Atlas user is active.
  • Next.js server errors about next/headers in client components: move server-only code to server modules, or keep client-safe utilities (we created _lib/dateUtils.js for this reason).
  • Stripe init errors (.match on undefined): ensure NEXT_PUBLIC_STRIPE_PUBLIC_KEY is set in .env.local and restart the dev server.

Next Steps & Contributions

  • Add integration tests for payment and registration flows.
  • Improve vendor document verification workflow (manual admin review flow UI).
  • Add a small admin UI to reset or rotate MongoDB user passwords securely.

Contact & Maintenance

For development questions or access to external services (Stripe/Atlas/Redis), coordinate with the project owner or repository admins.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages