Skip to content

SSNACM/CatchMe

 
 

Repository files navigation

CatchMe - Interactive Game

A web-based interactive game where teams solve puzzles through chat interactions.

Prerequisites

  • Python 3.7+
  • Node.js 16+
  • npm

Setup

1. Clone and Navigate

git clone <repository-url>
cd CatchMe

2. Backend Setup

# Install Python dependencies
pip install -r requirements.txt

# Create environment file
copy .env.example .env
# Edit .env with your configuration

3. Frontend Setup

cd client
npm install
cd ..

Running the Application

Start Backend (Terminal 1)

python app.py

Backend runs on: http://localhost:5000

Start Frontend (Terminal 2)

cd client
npm run dev

Frontend runs on: http://localhost:5173

Environment Variables

Create .env file in root directory:

MONGODB_URI="your-mongodb-connection-string" but as of now in json for testing
MONGODB_DB_NAME="catch_me" should change it to supabase
GROQ_API_KEY="your-groq-api-key" 
FLASK_ENV="development"

Project Structure

CatchMe/
├── app.py              # Flask backend
├── db.py               # Database connection
├── game_logic.py       # Game logic
├── requirements.txt    # Python dependencies
├── .env               # Environment variables
├── client/            # React frontend
│   ├── src/
│   ├── package.json
│   └── vite.config.js
└── teams_data.json    # Local database file

API Endpoints

  • POST /api/start - Start new game
  • GET /api/status/<team_id> - Get team status
  • POST /api/chat - Send chat message

Development

  • Backend: Flask with CORS enabled
  • Frontend: React with Vite
  • Database: JSON file-based storage
  • Hot reload enabled for both frontend and backend

Troubleshooting

  1. Port conflicts: Change ports in app.py (backend) or vite.config.js (frontend)
  2. CORS issues: Ensure both servers are running on specified ports
  3. Database errors: Check teams_data.json file permissions

About

hour of AI - Jailbreaker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 36.1%
  • JavaScript 35.3%
  • CSS 22.4%
  • HTML 6.2%