so I gave vibe coding a shot
  • JavaScript 78.5%
  • Python 20.6%
  • HTML 0.9%
Find a file
2025-04-20 00:03:37 +02:00
client initial commit 2025-04-20 00:03:37 +02:00
server initial commit 2025-04-20 00:03:37 +02:00
.example.env initial commit 2025-04-20 00:03:37 +02:00
.gitignore initial commit 2025-04-20 00:03:37 +02:00
README.md initial commit 2025-04-20 00:03:37 +02:00
start.py initial commit 2025-04-20 00:03:37 +02:00

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

Setup

  1. Clone the repository and navigate into it:
    git clone https://github.com/your/repo.git
    cd repo
    
  2. (Optional) Create and activate a Python virtual environment:
    python3 -m venv venv
    source venv/bin/activate
    
  3. Install backend dependencies:
    cd server
    pip install -r requirements.txt
    cd ..
    
  4. Install client dependencies:
    cd client
    npm install
    cd ..
    
  5. Create environment variable files from the examples:
    cp .example.env .env
    cp client/.example.env client/.env
    
  6. Open .env and client/.env in your editor and replace placeholder values with your Discord application credentials:
    • .env:
      • DISCORD_CLIENT_ID
      • DISCORD_CLIENT_SECRET
      • DISCORD_BOT_TOKEN
    • client/.env:
      • VITE_DISCORD_CLIENT_ID

Running the Application

From the project root, start all services using the provided start.py script:

  • Silent mode (minimal logs):

    python start.py --silent
    

    Or 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.js and activity.manifest.json) with the public Cloudflare host
  • Display the public URL in your console

To stop all services, press Ctrl+C.