NKM Frontend is a web interface for querying and debugging the NKM game backend. Built with React and TypeScript, it provides tools for backend interaction, game state inspection, and includes an experimental Unity WebGL embed for testing the actual game. This is primarily a development and debugging tool rather than the main game client.
Before you begin, ensure you have the following installed:
- Node.js 16+ (Download)
- Yarn 1.22+ (Install Guide)
- Git 2.40+ (Download)
# Clone the repository
git clone https://github.com/nkm-game/nkm-front.git
cd nkm-front
# Install dependencies
yarn install
# Start the development server
yarn startThe application will be available at http://localhost:3000
# Build and run with Docker
docker-compose up -d
# Check if services are running
docker-compose ps- ๐ฎ Ensure the NKM Server is running
- ๐ Open your browser to
http://localhost:3000 - ๐ง Use the admin panel and debugging tools to interact with the backend
- ๐ฏ Try the experimental Unity WebGL game embed for actual gameplay
- ๐ Check the Game Rules to understand gameplay mechanics
- Frontend Framework: React 17 + TypeScript
- UI Library: Material-UI (MUI) v5
- State Management: Redux Toolkit
- WebSocket: react-use-websocket for backend communication
- Game Engine: Experimental Unity WebGL embed
- Build Tool: Create React App
- Infrastructure: Docker + Nginx
# Start development server
yarn start
# Start with local backend
yarn run "start local"
# Build for production
yarn build
# Run tests
yarn test
# Format code
yarn prettierCreate a .env file in the root directory:
REACT_APP_BACKEND_URL=http://localhost:8080
REACT_APP_LOCAL_BACKEND=falsesrc/
โโโ app/ # Redux store configuration
โโโ components/ # Reusable UI components & debugging tools
โ โโโ admin_panel_view/ # Backend administration interface
โ โโโ game_view/ # Unity WebGL game embed
โ โโโ lobbies_view/ # Lobby management & inspection
โ โโโ status_view/ # Backend status monitoring
โโโ features/ # Feature-specific components
โโโ types/ # TypeScript type definitions
โโโ img/ # Static images and assets
We welcome contributions! Whether you're fixing bugs, adding debugging features, improving the admin interface, or enhancing the Unity integration, we appreciate your help.
- Familiarize yourself with the project: Review the codebase and understand the component architecture.
- Fork the repository and create a feature branch (
git checkout -b my-new-feature). - Implement your changes, following React and TypeScript best practices.
- Test your changes thoroughly in the browser.
- Submit a pull request with a clear description of your work.
- Follow TypeScript strict mode guidelines
- Use functional components with hooks
- Maintain consistent code formatting with Prettier
- Follow Material-UI design principles
- Write descriptive component and prop names
By participating in this project, you agree to abide by our community standards. Please be respectful and constructive in all interactions.
- Issues: GitHub Issues
- Bug Reports: Use our issue templates for bug reports
- Feature Requests: Submit feature requests through GitHub Issues
- Backend Repository: NKM Server
