Skip to content

jcubby86/games

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

521 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Party Games 🎮

A web-based multiplayer party games platform inspired by Jackbox Games. Create and join games with friends using simple room codes.

Table of Contents

Features

  • 🎯 Multiple Party Games - Currently includes "The Name Game" and "He Said She Said"
  • 🔗 Easy Pairing - Join games using a simple four-letter code
  • 🌐 Fully Self-Hostable - Run your own instance with Docker
  • 📱 Responsive Design - Works great on mobile and desktop
  • Real-time Updates - WebSocket-powered live game updates

Games

The Name Game

Everyone secretly enters the name of a person (real or fictional) that others would know. Players then take turns guessing each other's names until only one remains!

He Said She Said

Each player answers the same six prompts. Stories are then built randomly using different players' answers for each prompt, creating hilarious combinations.

Tech Stack

Frontend:

  • React 19 with TypeScript
  • Vite for build tooling
  • React Router for navigation
  • TanStack Query for server state management
  • Socket.io for real-time communication
  • Bootstrap 5 & Sass for styling

Backend:

  • NestJS with TypeScript
  • Prisma ORM with PostgreSQL
  • Socket.io Gateway for WebSockets
  • OpenAI API for suggestions
  • JWT authentication

Infrastructure:

  • Docker & Docker Compose
  • Nginx for serving frontend
  • PostgreSQL database

Getting Started

Prerequisites

  • For Docker: Docker and Docker Compose
  • For Local Development:
    • Node.js 18+ and npm
    • PostgreSQL 14+

Quick Start with Docker

  1. Clone the repository:
git clone https://github.com/jcubby86/games.git
cd games
  1. Create a .env file with required variables (see Environment Variables)

  2. Start the application:

docker-compose up -d
  1. Access the app at http://localhost (or your configured port)

Local Development

Backend Setup

  1. Navigate to the backend directory:
cd nest
  1. Install dependencies:
npm install
  1. Set up your environment variables in a .env file:
DATABASE_URL="postgresql://postgres:password@localhost:5432/games"
NODE_ENV=development
NODE_PORT=3000
JWT_SECRET=your_secret_key
  1. Run database migrations:
npx prisma migrate dev
  1. Start the development server:
npm run start:dev

Frontend Setup

  1. Navigate to the frontend directory:
cd app
  1. Install dependencies:
npm install
  1. Create a .env file:
VITE_API_URL=http://localhost:3000
  1. Start the development server:
npm run start:dev
  1. Access the app at http://localhost:5173

Environment Variables

Backend (nest/.env)

Variable Description Required Default
DATABASE_URL PostgreSQL connection string Yes -
NODE_ENV Environment (development/production) No development
NODE_PORT Backend server port No 3000
JWT_SECRET Secret for JWT token signing Yes -

Frontend (app/.env)

Variable Description Required Default
VITE_API_URL Backend API URL No /api (relative)

Docker Compose (.env)

Variable Description Required Default
POSTGRES_PASSWORD PostgreSQL database password Yes -
JWT_SECRET Secret for JWT token signing Yes -

Deployment

Using Docker Compose

See compose.yml for the complete configuration.

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors