A web application that integrates chip-parser and provides a user-friendly interface for working with CHIP notation and querying GPT for poker advice.
- CHIP Notation Reference: Collapsible cheat sheet with official CHIP notation reference
- Live Parsing: Real-time CHIP notation parsing with graceful error handling
- GPT Integration: Get AI-powered poker recommendations based on parsed hand history
- Two-Column Layout: Clean separation between CHIP input and GPT interaction
- Responsive Design: Works on desktop and mobile devices
chip-web/
├── api/ # Vercel serverless functions
│ ├── parse-chip.js # CHIP notation parsing endpoint
│ ├── ask-gpt.js # OpenAI GPT integration endpoint
│ └── health.js # Health check endpoint
├── src/
│ ├── components/
│ │ ├── ChipReference.tsx # CHIP notation cheat sheet
│ │ ├── ChipInput.tsx # CHIP input with live parsing
│ │ └── GptInteraction.tsx # GPT API integration
│ ├── App.tsx # Main application component
│ └── main.tsx # React entry point
├── package.json # All dependencies
└── vite.config.ts # Vite configuration
- Node.js (v16 or higher)
- npm or yarn
- OpenAI API key
- Install dependencies:
npm install
Development:
npm run devThis will start the Vite development server on http://localhost:3000
Production build:
npm run buildPreview production build:
npm run preview-
Open your browser to
http://localhost:3000 -
Review the CHIP Reference (collapsible cheat sheet at the top)
-
Enter CHIP Notation in the left column textarea. Examples:
UTG: AhKh preflop: r100 BTN: c flop: AhKcQd UTG: b50 -
View Parsed Output - automatically updates as you type
-
Enter your OpenAI API Key in the right column (stored in memory only)
-
Customize the System Prompt if needed
-
Click "Ask GPT" to get AI-powered poker advice
-
POST /api/parse-chip- Parse CHIP notation{ "chipNotation": "25 50 10 6 6\n12.5k 25k 10k 25k 25k 15k\nf f 150 f c c" } -
POST /api/ask-gpt- Get GPT recommendations{ "apiKey": "sk-...", "systemPrompt": "You are a poker assistant...", "parsedChip": { /* parsed hand data */ } } -
GET /api/health- Health check
- API Key Storage: OpenAI API keys are never persisted or logged - they're stored in memory only during the session
- CORS: Backend is configured to accept requests from the frontend only
- Input Validation: All API endpoints validate input parameters
cd frontend
npm run devcd backend
npm run dev # Uses nodemon for auto-reloadnpm run build # Builds frontend onlyexpress- Web frameworkcors- CORS middlewarechip-parser- CHIP notation parsingopenai- OpenAI API clientdotenv- Environment variables
react- UI frameworktypescript- Type safetytailwindcss- CSS frameworkaxios- HTTP clientvite- Build tool
-
"chip-parser not found"
- Make sure you've installed backend dependencies:
cd backend && npm install
- Make sure you've installed backend dependencies:
-
"API connection failed"
- Ensure backend is running on port 3001
- Check that frontend proxy is configured correctly in
vite.config.ts
-
"Invalid API key"
- Verify your OpenAI API key starts with
sk- - Check your OpenAI account has sufficient credits
- Verify your OpenAI API key starts with
-
Parse errors
- CHIP notation is case-sensitive
- Refer to the built-in reference guide for correct syntax
- Use browser dev tools to monitor network requests
- Backend logs are shown in the terminal running the server
- Frontend errors appear in browser console
MIT License