GarlicText is a fun multiplayer web game where players:
- Draw images based on prompts
- Caption other players' drawings
- Vote on the best captions to score points
The project consists of:
- Frontend: React with TypeScript and Tailwind CSS
- Database Backend: Node.js/Express server with PostgreSQL
- Python Backend: Currently unused - exists for future AI integration
Before setting up the project, ensure you have:
- Node.js (v16 or higher)
- npm (comes with Node.js)
- PostgreSQL (v12 or higher)
git clone https://github.com/justinl66/garlictext.git
cd garlictextSet up the required environment variables for the backend:
Copy and configure the backend environment file:
cd database_backend
copy .env.example .envEdit the .env file with your PostgreSQL configuration:
# Database Backend Environment Variables
NODE_ENV=development
PORT=5001
# PostgreSQL Configuration
PGHOST=localhost
PGUSER=postgres
PGDATABASE=garlictext
PGPASSWORD=your_postgres_password
PGPORT=5432Firebase Configuration: The application uses Firebase for authentication and requires both client-side and server-side credentials:
- Client-side (Frontend): Add Firebase config to
frontend/.env.development:# Firebase Client Configuration VITE_API_KEY="AIzaSyDf_dA9Yc-lZpkdd46Uf6LIBeJH2xB9OLM" VITE_AUTH_DOMAIN="garlic-text.firebaseapp.com" VITE_PROJECT_ID="garlic-text" VITE_STORAGE_BUCKET="garlic-text.firebasestorage.app" VITE_MESSAGING_SENDER_ID="734733266033" VITE_APP_ID="1:734733266033:web:f26afa8be82faa09e6ffd0" VITE_MEASUREMENT_ID="G-0F1K50L53J"
Note: The frontend already has the correct environment files (.env.development and firebase-credentials.json) configured for local development.
First, install PostgreSQL if you haven't already, then set up the database:
On Windows:
cd database_backend
npm install
setup_db.batOn macOS/Linux:
cd database_backend
npm install
chmod +x setup_db.sh
./setup_db.shThis script will:
- Create the
garlictextdatabase - Set up all required tables
- Configure the database schema
Install dependencies and start the database server:
cd database_backend
npm install
npm run devThe backend server will start on http://localhost:5001
In a new terminal window:
cd frontend
npm install
npm run devThe frontend will start on http://localhost:5173
-
Open your browser and navigate to http://localhost:5173
-
Create or join a game and start playing!
Play fair. IRLOYOGQKEGVHLGTDTNRKLKEXOTNSUMHNPGTGKBMAPBRPOLIGEPGQHCV