Skip to content

K007-K/DEB8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฏ DEB8

The Ultimate Real-Time Debate & Polling Platform

Transform discussions into structured debates with live participation, team collaboration, and instant polling

Live Demo GitHub Stars License

Features โ€ข Demo โ€ข Quick Start โ€ข Tech Stack โ€ข Documentation


๐Ÿ“– About DEB8

DEB8 is a cutting-edge platform that revolutionizes online debates and discussions. Whether you're hosting a structured 2v2 debate, organizing a free-for-all discussion, or conducting live polls, DEB8 provides the tools to make every voice heard in real-time.

Perfect for educators, debate clubs, community organizers, and anyone who wants to facilitate meaningful conversations online.


โœจ Key Features

๐ŸŽญ Multiple Debate Formats

  • 2v2 Team Debates - Structured debates with two teams arguing opposing viewpoints
  • Free-for-All Rooms - Open discussions where everyone can participate
  • Role-Based Participation - Join as debater or audience member
  • Private Rooms - Password-protected debates for exclusive discussions

๐Ÿ“Š Live Polling System

  • Create custom polls with multiple options
  • Real-time vote tracking and results visualization
  • Category-based poll organization
  • Time-limited polls with countdown timers
  • User vote history and participation tracking

๐Ÿ’ฌ Real-Time Communication

  • Instant message delivery with WebSocket technology
  • Team-specific chat channels in 2v2 debates
  • Message history preservation
  • Typing indicators and online status

๐Ÿ‘ค User Management

  • Secure JWT-based authentication
  • User profiles with activity statistics
  • Personal debate and poll history
  • Password recovery and account management

๐ŸŽจ Beautiful UI/UX

  • Modern, responsive design with Tailwind CSS
  • Smooth animations with Framer Motion
  • Material-UI components for consistency
  • Dark mode support (coming soon)

๐Ÿš€ Live Demo

Experience DEB8 in action: https://mydeb8.netlify.app

Try It Out:

  1. Create a free account in seconds
  2. Browse trending debates and active polls
  3. Join a public debate or create your own
  4. Cast your vote in live polls
  5. Track your participation in your profile

๐Ÿ› ๏ธ Tech Stack

Frontend

React Vite TailwindCSS Material-UI

Backend

Node.js Express MongoDB Socket.io

Complete Technology List

Frontend:

  • โš›๏ธ React 18 - Component-based UI framework
  • โšก Vite - Lightning-fast build tool and dev server
  • ๐ŸŽจ Tailwind CSS - Utility-first CSS framework
  • ๐Ÿงฉ Material-UI - Pre-built React components
  • ๐ŸŽฌ Framer Motion - Animation library for smooth transitions
  • ๐Ÿ—บ๏ธ React Router - Client-side routing
  • ๐Ÿ”Œ Socket.io Client - Real-time WebSocket communication
  • ๐ŸŒ Axios - HTTP client for API requests

Backend:

  • ๐Ÿš‚ Express.js - Fast, unopinionated web framework
  • ๐Ÿ—„๏ธ MongoDB - NoSQL database for flexible data storage
  • ๐Ÿ“ฆ Mongoose - Elegant MongoDB object modeling
  • ๐Ÿ”Œ Socket.io - Real-time bidirectional event-based communication
  • ๐Ÿ” JWT - Secure authentication tokens
  • ๐Ÿ”’ bcrypt.js - Password hashing for security
  • ๐ŸŒ CORS - Cross-origin resource sharing
  • ๐Ÿ“ dotenv - Environment variable management

๐Ÿš€ Quick Start

Prerequisites

Before you begin, ensure you have the following installed:

  • ๐Ÿ“ฆ Node.js (v16 or higher) - Download
  • ๐Ÿ—„๏ธ MongoDB (v5 or higher) - Download
  • ๐Ÿ“ npm or yarn - Comes with Node.js

Installation

1๏ธโƒฃ Clone the Repository

git clone https://github.com/K007-K/DEB8.git
cd DEB8

2๏ธโƒฃ Install Dependencies

npm install

3๏ธโƒฃ Set Up Environment Variables

# Copy the example environment file
cp .env.example .env

# Edit .env with your configuration
nano .env  # or use your preferred editor

Required Environment Variables:

# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017/deb8

# Server Configuration
PORT=5000
NODE_ENV=development

# JWT Configuration
JWT_SECRET=your_super_secret_jwt_key_here
JWT_EXPIRE=7d

# Frontend URL (for CORS)
CLIENT_URL=http://localhost:5173

4๏ธโƒฃ Start MongoDB

# macOS/Linux
mongod

# Windows
mongod.exe

5๏ธโƒฃ Run the Application

Option A: Development Mode (Recommended)

# Terminal 1: Start the backend server
npm run server

# Terminal 2: Start the frontend dev server
npm run dev

Option B: Using Concurrently (Coming Soon)

npm run dev:all

6๏ธโƒฃ Access the Application


๐Ÿ—๏ธ System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         CLIENT LAYER                        โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
โ”‚  โ”‚   React UI  โ”‚  โ”‚  WebSocket  โ”‚  โ”‚   Axios     โ”‚        โ”‚
โ”‚  โ”‚  Components โ”‚  โ”‚   Client    โ”‚  โ”‚ HTTP Client โ”‚        โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ†•
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         SERVER LAYER                        โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
โ”‚  โ”‚  Express.js โ”‚  โ”‚  Socket.io  โ”‚  โ”‚   JWT Auth  โ”‚        โ”‚
โ”‚  โ”‚   Routes    โ”‚  โ”‚   Server    โ”‚  โ”‚ Middleware  โ”‚        โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ†•
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        DATABASE LAYER                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
โ”‚  โ”‚    Users    โ”‚  โ”‚    Rooms    โ”‚  โ”‚    Polls    โ”‚        โ”‚
โ”‚  โ”‚  Collection โ”‚  โ”‚ Collection  โ”‚  โ”‚ Collection  โ”‚        โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
โ”‚                      MongoDB Atlas                          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Core Components

  1. ๐Ÿ“ฑ Frontend Layer

    • React-based SPA with modern UI/UX
    • Real-time updates via Socket.io
    • RESTful API integration with Axios
    • Client-side routing with React Router
  2. โš™๏ธ Backend Layer

    • Express.js API server
    • JWT-based authentication
    • WebSocket server for real-time features
    • CORS configuration for secure cross-origin requests
  3. ๐Ÿ—„๏ธ Database Layer

    • MongoDB for flexible data storage
    • Mongoose ODM for data modeling
    • Indexed collections for optimal performance
    • Automatic timestamps and validation

๐Ÿ“ Project Structure

DEB8/
โ”œโ”€โ”€ ๐Ÿ“‚ public/                 # Static assets
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ””โ”€โ”€ _redirects.txt
โ”œโ”€โ”€ ๐Ÿ“‚ server/                 # Backend application
โ”‚   โ”œโ”€โ”€ index.js              # Main server file
โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ models/            # Database models
โ”‚       โ””โ”€โ”€ Room.js           # Room schema
โ”œโ”€โ”€ ๐Ÿ“‚ src/                    # Frontend application
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ api/               # API configuration
โ”‚   โ”‚   โ”œโ”€โ”€ axios.js          # Axios instance with auth
โ”‚   โ”‚   โ””โ”€โ”€ axiosNoAuth.js    # Axios without auth
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ components/        # Reusable components
โ”‚   โ”‚   โ”œโ”€โ”€ Header.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ PollCard.jsx
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ context/           # React context providers
โ”‚   โ”‚   โ””โ”€โ”€ AuthContext.jsx
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ pages/             # Page components
โ”‚   โ”‚   โ”œโ”€โ”€ LandingPage.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ HomePage.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ RoomPage.jsx
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ App.jsx               # Main app component
โ”‚   โ”œโ”€โ”€ main.jsx              # App entry point
โ”‚   โ””โ”€โ”€ index.css             # Global styles
โ”œโ”€โ”€ ๐Ÿ“„ .env.example           # Environment variables template
โ”œโ”€โ”€ ๐Ÿ“„ .gitignore             # Git ignore rules
โ”œโ”€โ”€ ๐Ÿ“„ .gitattributes         # Git attributes
โ”œโ”€โ”€ ๐Ÿ“„ CONTRIBUTING.md        # Contribution guidelines
โ”œโ”€โ”€ ๐Ÿ“„ package.json           # Dependencies and scripts
โ”œโ”€โ”€ ๐Ÿ“„ tailwind.config.js     # Tailwind configuration
โ”œโ”€โ”€ ๐Ÿ“„ vite.config.js         # Vite configuration
โ””โ”€โ”€ ๐Ÿ“„ README.md              # This file

๐ŸŽฎ Usage Guide

Creating a Debate Room

  1. Navigate to Create Room from the home page
  2. Choose Format: 2v2 Team Debate or Free-for-All
  3. Fill Details:
    • Topic and description
    • Category selection
    • Max participants (for free-for-all)
    • Team names and descriptions (for 2v2)
  4. Privacy Options: Make it public or private with password
  5. Launch and share the room ID with participants

Creating a Poll

  1. Go to Create Poll section
  2. Enter Question that you want to ask
  3. Add Options (minimum 2, maximum unlimited)
  4. Select Category for organization
  5. Set End Date for the poll
  6. Publish and share with your audience

Joining Debates

  • Public Rooms: Browse and join directly
  • Private Rooms: Enter room ID and password
  • Choose Role: Debater or Audience
  • For 2v2: Select your team

๐Ÿ”ง Development

Available Scripts

# Start frontend development server
npm run dev

# Start backend server
npm run server

# Build for production
npm run build

# Preview production build
npm run preview

# Run linter
npm run lint

Environment Setup for Development

  1. Frontend Development: Runs on http://localhost:5173
  2. Backend Development: Runs on http://localhost:5000
  3. MongoDB: Local instance on mongodb://localhost:27017/deb8

API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • GET /api/auth/verify - Verify JWT token

Rooms

  • GET /api/rooms - Get user's rooms
  • GET /api/rooms/debates - Get all debate rooms
  • POST /api/rooms - Create new room
  • GET /api/rooms/:roomId - Get room details
  • POST /api/rooms/:roomId/join - Join a room
  • DELETE /api/rooms/:roomId - Delete room

Polls

  • GET /api/polls - Get all polls
  • GET /api/polls/trending - Get trending polls
  • POST /api/polls - Create new poll
  • POST /api/polls/:pollId/vote - Vote on a poll
  • GET /api/polls/my-polls - Get user's polls

Users

  • GET /api/users/profile - Get user profile
  • GET /api/users/room-history - Get user's room history

๐Ÿš€ Deployment

Frontend (Netlify)

  1. Build the project:
npm run build
  1. Deploy to Netlify:
# Install Netlify CLI
npm install -g netlify-cli

# Deploy
netlify deploy --prod

Backend (Render/Railway/Heroku)

  1. Set environment variables on your hosting platform
  2. Connect your GitHub repository
  3. Set build command: npm install
  4. Set start command: npm run server

Database (MongoDB Atlas)

  1. Create a free cluster at MongoDB Atlas
  2. Get your connection string
  3. Update MONGODB_URI in your environment variables

๐Ÿค Contributing

We love contributions! Please see CONTRIBUTING.md for detailed guidelines.

Quick Contribution Guide

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'feat: add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Built with โค๏ธ by the DEB8 team
  • Inspired by the need for better online debate platforms
  • Special thanks to all our contributors

๐Ÿ“ž Contact & Support


โญ Star us on GitHub โ€” it motivates us a lot!

Made with ๐Ÿ’œ by DEB8 Team

โฌ† Back to Top

About

Real-time debate & polling platform with 2v2 team debates, free-for-all rooms, live polls, and WebSocket communication. Built with React, Express & MongoDB.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages