@roomkit/create
v1.3.2
Published
Create a new RoomKit multiplayer project
Maintainers
Readme
create-roomkit
Scaffolding tool for creating new RoomKit multiplayer projects.
Usage
Create a new RoomKit project with:
npm create roomkit@latestOr with npm 7+:
npm create roomkit@latest my-gameOr with pnpm:
pnpm create roomkit my-gameOr with yarn:
yarn create roomkit my-gameTemplates
Choose from three templates:
Basic
A minimal gateway + worker setup with a simple room. Perfect for learning or starting a custom project.
Chat Room
A fully-featured real-time chat application with:
- User presence
- Typing indicators
- Chat history
- Username customization
Game Room
A turn-based Tic-Tac-Toe game demonstrating:
- Turn-based gameplay
- Win/draw detection
- Game state management
- Player disconnect handling
Options
# Specify project name
npm create roomkit@latest my-project
# Specify template
npm create roomkit@latest my-project -- --template chat-room
# Available templates: basic, chat-room, game-roomAfter Creation
cd my-project
npm install
npm run devMake sure you have Redis running locally, or configure it in the .env file.
Requirements
- Node.js 18+
- Redis server
Project Structure
All templates include:
my-project/
├── src/
│ ├── gateway.ts # Gateway server
│ ├── worker.ts # Worker server
│ └── rooms/ # Your game rooms
├── package.json
├── tsconfig.json
├── .env.example
└── README.mdLearn More
License
MIT
