Skip to content

sujan-karmakar/Play.exe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

31 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Play.exe ๐ŸŽฎ

A full-stack web development project featuring a web-based gaming platform where users can play multiple browser games in one place. The project focuses on providing a simple, fast, and interactive experience for casual gaming directly in the browser.

๐ŸŒ Deployment

Play.exe

๐Ÿš€ Features

  • Multiple Games: Play Rock Paper Scissors, Simon Game, Guessing Game, and Tic Tac Toe
  • User Authentication: Secure signup/login with Passport-based authentication
  • Profile Management: Update username, email, and profile pictures
  • Leaderboards: Global and game-specific leaderboards with rankings
  • Responsive Design: Dark-themed UI that works on all devices
  • Real-time Scoring: Track and display user scores across all games
  • Cloud Storage: Profile pictures uploaded to Cloudinary

๐Ÿ› ๏ธ Tech Stack

Backend

  • Node.js - Runtime environment
  • Express.js - Web framework
  • MongoDB - NoSQL database
  • Mongoose - MongoDB object modeling
  • Passport.js - Authentication middleware
  • Multer - File upload handling
  • Cloudinary - Cloud storage for images

Frontend

  • EJS - Templating engine
  • Bootstrap - CSS framework
  • Vanilla JavaScript - Client-side interactions
  • CSS3 - Custom styling with dark theme

DevOps & Tools

  • Git - Version control
  • Nodemon - Development server auto-restart
  • Connect-Mongo - Session storage
  • Express-Session - Session management

๐Ÿ“ Project Structure

Play.exe/
โ”œโ”€โ”€ controllers/          # Route handlers
โ”‚   โ”œโ”€โ”€ authController.js # Authentication logic
โ”‚   โ”œโ”€โ”€ games.js         # Game routes
โ”‚   โ””โ”€โ”€ user.js          # User profile management
โ”œโ”€โ”€ models/              # Database models
โ”‚   โ””โ”€โ”€ user.js         # User model
โ”œโ”€โ”€ routes/              # Express routes
โ”‚   โ”œโ”€โ”€ games.js        # Game routes
โ”‚   โ””โ”€โ”€ user.js         # User routes
โ”œโ”€โ”€ utils/               # Utility functions
โ”‚   โ”œโ”€โ”€ profileService.js# Profile data calculations
โ”‚   โ”œโ”€โ”€ ExpressError.js # Error handling
โ”‚   โ””โ”€โ”€ wrapAsync.js    # Async error wrapper
โ”œโ”€โ”€ views/               # EJS templates
โ”‚   โ”œโ”€โ”€ layouts/        # Base layouts
โ”‚   โ”œโ”€โ”€ users/          # User-related pages
โ”‚   โ”œโ”€โ”€ games/          # Game pages
โ”‚   โ””โ”€โ”€ includes/       # Partial templates
โ”œโ”€โ”€ public/              # Static assets
โ”‚   โ”œโ”€โ”€ css/            # Stylesheets
โ”‚   โ””โ”€โ”€ js/             # Client-side scripts
โ”œโ”€โ”€ middleware.js        # Custom middleware
โ”œโ”€โ”€ cloudConfig.js       # Cloudinary configuration
โ”œโ”€โ”€ app.js              # Main application file
โ””โ”€โ”€ package.json        # Dependencies and scripts

๐Ÿƒโ€โ™‚๏ธ Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB (local or Atlas)
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/sujan-karmakar/Play.exe.git
    cd Play.exe
  2. Install dependencies

    npm install
  3. Set up environment variables Create a .env file in the root directory with:

    ATLASDB_URL=your_mongodb_connection_string
    SECRET=your_session_secret
    CLOUD_NAME=your_cloudinary_cloud_name
    CLOUD_API_KEY=your_cloudinary_api_key
    CLOUD_API_SECRET=your_cloudinary_api_secret
  4. Start the development server

    npm start
    # or for development with auto-restart
    nodemon app.js
  5. Open your browser Navigate to http://localhost:8080

๐ŸŽฏ Usage

  1. Sign Up: Create an account and start playing immediately
  2. Play Games: Choose from multiple browser-based games
  3. Track Scores: View your performance on leaderboards
  4. Customize Profile: Update your information and upload a profile picture
  5. Compete: Climb the global and game-specific leaderboards

๐ŸŽฎ Games Included

  • Rock Paper Scissors: Classic hand game with computer AI
  • Simon Game: Memory challenge with increasing difficulty
  • Guessing Game: Number guessing with efficiency scoring
  • Tic Tac Toe: Strategic 3x3 grid game

๐Ÿ‘จโ€๐Ÿ’ป Author

Sujan Karmakar

About

๐ŸŽฎ A web-based gaming platform where users can play multiple browser games in one place. The project focuses on providing a simple, fast, and interactive experience for casual gaming directly in the browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors