A browser-based, multiplayer hacking simulation game that is both educational and entertaining, teaching cybersecurity concepts through engaging gameplay.
Hack King is a full-stack web application that simulates hacking scenarios in a multiplayer environment. Players can learn cybersecurity concepts while competing against each other in various hacking challenges.
- Frontend: React.js with TypeScript
- Backend: Node.js with Express
- Database: PostgreSQL with Prisma ORM
- Real-time Communication: Socket.io
- Authentication: JWT
- Containerization: Docker
- CI/CD: GitHub Actions
- Deployment: Nixpacks
- Docker and Docker Compose
- Node.js (for local development outside Docker)
- Git
-
Clone the repository:
git clone https://github.com/yourusername/hack-king.git cd hack-king -
Start the development environment:
docker-compose up
This will start three services:
- Frontend: React application (available at http://localhost:3000)
- Backend: Node.js API (available at http://localhost:5000)
- Database: PostgreSQL instance
-
Development with hot-reloading:
- The application is configured for hot-reloading, so changes to the code will automatically update in the browser.
- Frontend code is in the
clientdirectory - Backend code is in the
serverdirectory
-
Navigate to the server directory:
cd server -
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.envfile based on.env.example - Configure your PostgreSQL connection
- Create a
-
Start the development server:
npm run dev
-
Navigate to the client directory:
cd client -
Install dependencies:
npm install
-
Start the development server:
npm start
hack-king/
├── client/ # Frontend React application
│ ├── public/ # Static assets
│ └── src/ # Source code
├── server/ # Backend Node.js application
│ ├── src/ # Source code
│ └── prisma/ # Prisma ORM
├── .github/ # GitHub configuration
│ └── workflows/ # GitHub Actions workflows
├── docker/ # Docker configuration files
├── docker-compose.yml # Docker Compose configuration
├── nixpacks.toml # Nixpacks configuration
└── README.md # Project overview and setup instructions
- Create a feature branch from
develop - Make your changes
- Submit a pull request to
develop