- JavaScript 78.5%
- Python 20.6%
- HTML 0.9%
| client | ||
| server | ||
| .example.env | ||
| .gitignore | ||
| README.md | ||
| start.py | ||
VibeTD
This project is the result of me giving Vibe Coding with OpenAI's Codex CLI a shot. All code - except for tiny patches, amounting to ~15 lines of code in total - was written by o4-mini using Codex CLI. Frankly, I didn't even review the code - it just works (sort of). I find that pretty amazing to be honest. By the way, even the docs below were written by AI xD. Overall, I'm pretty amazed by how autonomous these new models are. So, enjoy the game I guess or review the code or whatever you want to do with this.
Tower Defense - Discord Embedded Activity
A simple tower defense game implemented as a Discord embedded activity. This project uses Python for the backend, a Vite-based client, and Cloudflare tunnels for hosting the development environment.
Prerequisites
- Python 3.8 or higher
- Node.js v14 or higher and npm
- cloudflared CLI
- Git
Setup
- Clone the repository and navigate into it:
git clone https://github.com/your/repo.git cd repo - (Optional) Create and activate a Python virtual environment:
python3 -m venv venv source venv/bin/activate - Install backend dependencies:
cd server pip install -r requirements.txt cd .. - Install client dependencies:
cd client npm install cd .. - Create environment variable files from the examples:
cp .example.env .env cp client/.example.env client/.env - Open
.envandclient/.envin your editor and replace placeholder values with your Discord application credentials:- .env:
DISCORD_CLIENT_IDDISCORD_CLIENT_SECRETDISCORD_BOT_TOKEN
- client/.env:
VITE_DISCORD_CLIENT_ID
- .env:
Running the Application
From the project root, start all services using the provided start.py script:
-
Silent mode (minimal logs):
python start.py --silentOr make it executable and run:
chmod +x start.py ./start.py --silent -
Verbose mode (full logs):
python start.py
This will:
- Launch the backend server on port 8000
- Start the client dev server on port 3000
- Open Cloudflare tunnels for both services
- Update client configuration (
vite.config.jsandactivity.manifest.json) with the public Cloudflare host - Display the public URL in your console
To stop all services, press Ctrl+C.