Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Webgame Enigma (Round 2)

A multiplayer web-based puzzle game where teams collaborate across two roles (Team A and Team B) to solve challenges. Team B (Hawkins Lab) acts as the hint providers for Team A.

Features

  • Team-based Gameplay: Players join rooms as either Team A or Team B.
  • Asymmetric Mechanics: Team A solves the main questions, while Team B can submit hints to guide them.
  • Real-time Leaderboard: Track scores of different rooms and teams on the /leader page.
  • Secure Authentication: JWT-based login and signup using bcrypt for password hashing.
  • Modern Tech Stack: Built with Vite, React 19, Tailwind CSS v4, and Prisma ORM.

Tech Stack

Frontend

  • Framework: React 19
  • Build Tool: Vite
  • Styling: Tailwind CSS v4, Framer Motion (for animations)
  • Routing: React Router DOM
  • Icons: Lucide React

Backend

  • Server: Node.js, Express
  • Database: MongoDB (via Prisma ORM)
  • Authentication: JSON Web Tokens (JWT), bcrypt

Project Structure

This project uses a monorepo-style structure:

  • frontend/: Contains the React/Vite application.
  • backend/: Contains the Express server, Prisma schema, and API routes.

Getting Started

Prerequisites

  • Node.js (v18+ recommended)
  • MongoDB database URL

Backend Setup

  1. Navigate to the backend directory:
    cd backend
  2. Install dependencies:
    npm install
  3. Create a .env file in the backend directory with the following variables:
    DATABASE_URL="your-mongodb-url"
    JWT_SECRET="your-secret-key"
  4. Generate the Prisma client:
    npx prisma generate
  5. Start the backend server:
    npm start
    The backend will run on http://localhost:3000.

Frontend Setup

  1. Navigate to the frontend directory:
    cd frontend
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev
    The frontend will be available at http://localhost:5173.

Gameplay Flow

  1. Login: Users create an account or log in.
  2. Dashboard: Users join a game room as part of a specific team (A or B).
  3. Rounds: Each round presents questions. Team B receives hints/answers that they can selectively communicate to Team A.
  4. Leaderboard: Displays the live points for each room/team.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages