A modern, real-time multiplayer gaming platform built with Node.js, React, and Socket.IO. Features multiple games, social features, and a robust backend system.
- Chess - Classic chess with real-time moves
- Pacman - Multiplayer Pacman with ghost interactions
- CodeRacer - Competitive coding challenges
- CodeConquer - Code-based strategy game
- CodeSeek - Code search and find game
- MemoryDuel - Memory matching game
- TurtleArena - Turtle racing game
- PixelFarmTycoon - Farming simulation
- DungeonBuilders - Dungeon building game
- CraftTrade - Crafting and trading game
- AIPetBattlers - AI pet battle system
- ChatDraw - Collaborative drawing game
- Friends System - Add, remove, and manage friends
- Real-time Messaging - Chat with friends and game players
- Game Invites - Send and receive game invitations
- Game Rooms - Create and join multiplayer game sessions
- User Profiles - View and manage user information
- Real-time Communication - Socket.IO for instant updates
- Authentication System - Secure user login and registration
- Database Integration - SQLite with Knex.js ORM
- Responsive Design - Modern UI with Tailwind CSS
- TypeScript - Type-safe frontend development
- Modular Architecture - Clean, maintainable code structure
- Node.js (v16 or higher)
- npm or yarn
-
Clone the repository
git clone https://github.com/seriousCoding/twoot.git cd twoot
-
Install backend dependencies
cd backend npm install
-
Install frontend dependencies
cd ../frontend npm install
-
Set up the database
cd ../backend npm run migrate npm run seed
-
Start the backend server
npm start
-
Start the frontend development server
cd ../frontend npm start
-
Open your browser Navigate to
http://localhost:3000
to access the application.
twoot/
├── backend/ # Node.js/Express server
│ ├── controllers/ # Request handlers
│ ├── games/ # Game logic implementations
│ ├── middleware/ # Authentication middleware
│ ├── migrations/ # Database migrations
│ ├── models/ # Data models
│ ├── routes/ # API routes
│ ├── socket.js # Socket.IO configuration
│ └── app.js # Main server file
├── frontend/ # React/TypeScript application
│ ├── components/ # Reusable UI components
│ ├── contexts/ # React contexts
│ ├── hooks/ # Custom React hooks
│ ├── pages/ # Page components
│ └── src/ # Source files
└── README.md # This file
- Real-time multiplayer chess
- Move validation
- Game state synchronization
- Multiplayer Pacman with ghost interactions
- Power pellets and scoring
- Real-time player movement
- Competitive coding challenges
- Real-time code execution
- Leaderboard system
- Memory matching game
- Multiplayer competition
- Score tracking
- Add and remove friends
- View friend status
- Send friend requests
- Real-time chat with friends
- Game-specific chat rooms
- Message history
- Send invitations to friends
- Accept/decline game invites
- Notification system
cd backend
npm run dev # Start development server
npm run migrate # Run database migrations
npm run seed # Seed database with sample data
cd frontend
npm start # Start development server
npm run build # Build for production
npm test # Run tests
The application uses SQLite with Knex.js for database management:
- Users table - User accounts and authentication
- Friends table - Friend relationships
- Messages table - Chat messages
- Game invites table - Game invitations
- Game rooms table - Active game sessions
Create a .env
file in the backend directory:
PORT=3001
NODE_ENV=development
DB_PATH=./database.sqlite
JWT_SECRET=your-secret-key
The application uses Socket.IO for real-time communication:
join_room
- Join a game roomleave_room
- Leave a game roomgame_move
- Send game moveschat_message
- Send chat messagesfriend_request
- Send friend requests
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Node.js
- Frontend powered by React and TypeScript
- Real-time features with Socket.IO
- Styling with Tailwind CSS
- Database management with Knex.js
If you have any questions or need help, please open an issue on GitHub or contact the development team.
Happy Gaming! 🎮