This project is a containerized version of the classic Space Invaders arcade game, featuring a persistent scoreboard powered by Google Firebase Firestore.
The application is built using a modern JavaScript/Node.js stack, designed for easy deployment via Docker.
- Game Logic: HTML5 Canvas / JavaScript
- Backend/Server: Node.js (
server.js) - Database: Firebase Firestore (for Scoreboard persistence)
- Deployment: Docker
- Classic Gameplay: Smooth, responsive Space Invaders action.
- Real-Time Scoreboard: High scores are tracked and displayed using a real-time listener from Firebase Firestore.
- Containerized: Easy to run and scale using Docker.
You must have the following installed:
-
Create a Firebase Project: Set up a new project in the Google Firebase Console.
-
Enable Firestore: Initialize the Firestore Database for your project.
-
Get Configuration: Retrieve your Firebase configuration object (API Key, Project ID, etc.).
-
Update
.env: Create a.envfile in the root of the project to hold your configuration:# Example .env file FIREBASE_API_KEY="AIzaSy..." FIREBASE_PROJECT_ID="your-project-id" # ... add other Firebase configuration fields PORT=3004(Note: This file is excluded by
.gitignorefor security)
-
Build the Docker Image:
docker build -t space-invaders . -
Run the Container:
docker run -d --name space-invaders -p 3004:3004 space-invaders
The game will be accessible in your web browser at http://localhost:3004.
This image is available publicly on Docker Hub under the deewhy namespace:
docker pull deewhy/space-invaders:latest