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.
- 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
- 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
- EJS - Templating engine
- Bootstrap - CSS framework
- Vanilla JavaScript - Client-side interactions
- CSS3 - Custom styling with dark theme
- Git - Version control
- Nodemon - Development server auto-restart
- Connect-Mongo - Session storage
- Express-Session - Session management
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
- Node.js (v14 or higher)
- MongoDB (local or Atlas)
- Git
-
Clone the repository
git clone https://github.com/sujan-karmakar/Play.exe.git cd Play.exe -
Install dependencies
npm install
-
Set up environment variables Create a
.envfile 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
-
Start the development server
npm start # or for development with auto-restart nodemon app.js -
Open your browser Navigate to
http://localhost:8080
- Sign Up: Create an account and start playing immediately
- Play Games: Choose from multiple browser-based games
- Track Scores: View your performance on leaderboards
- Customize Profile: Update your information and upload a profile picture
- Compete: Climb the global and game-specific leaderboards
- 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
Sujan Karmakar
- GitHub: @sujan-karmakar
- LinkedIn: @sujan-karmakar