diff --git a/code/websites/pokedex.online/README.md b/code/websites/pokedex.online/README.md index 959e531..a0d62cc 100644 --- a/code/websites/pokedex.online/README.md +++ b/code/websites/pokedex.online/README.md @@ -21,83 +21,46 @@ See [PROGRESS.md](PROGRESS.md) for detailed development status. - **Fast Performance** - Lazy loading, code splitting, and efficient caching - **Accessible** - WCAG 2.1 Level AA compliance, keyboard navigation -## 🚀 Local Development +## 🚀 Quick Start ### Prerequisites -- Node.js 20+ -- npm or yarn -- Challonge API key (get from https://challonge.com/settings/developer) +- Node.js 18+ +- npm -### Environment Setup - -1. **Copy environment template**: - ```bash - cp .env.example .env - ``` - -2. **Configure your API keys** in `.env`: - ```bash - # Required: Get your API key from Challonge - VITE_CHALLONGE_API_KEY=your_actual_api_key_here - - # Optional: Set default tournament for testing - VITE_DEFAULT_TOURNAMENT_ID=your_tournament_url - ``` - -3. **Keep your `.env` file secure**: - - Never commit `.env` to git (already in `.gitignore`) - - Use `.env.example` for documentation - - Share API keys only through secure channels - -### Quick Start +### Installation ```bash # Install dependencies npm install -# Start development server WITH backend API: -npm run dev:full - -# Or start just the frontend (no backend): +# Start development server npm run dev # Open browser to http://localhost:5173 ``` -**Backend Server**: When running `npm run dev:full`, the OAuth proxy and Gamemaster API start automatically on port 3001. +### Development Commands -### Gamemaster API +```bash +# Development with hot reload +npm run dev -The Gamemaster API provides access to Pokemon GO gamemaster data from PokeMiners: +# Production build +npm run build -```javascript -import { gamemasterClient } from './gamemaster-client.js'; +# Preview production build +npm preview -// Get filtered pokemon (base forms + regional variants) -const pokemon = await gamemasterClient.getPokemon(); +# Run tests +npm test -// Get all forms including costumes and variants -const allForms = await gamemasterClient.getAllForms(); +# Run tests with UI +npm run test:ui -// Get all moves -const moves = await gamemasterClient.getMoves(); - -// Check what's available -const status = await gamemasterClient.getStatus(); +# Generate coverage report +npm run test:coverage ``` - -**Workflow**: -1. Open the **Gamemaster Manager** at `/gamemaster` -2. Click "Fetch from PokeMiners" to download latest data -3. Click "Process & Break Up Data" to categorize -4. Click "Save All Files to Server" to make available to all apps -5. Other apps can now access via the GamemasterClient - -See [GAMEMASTER_API.md](GAMEMASTER_API.md) for full documentation and examples. - -**API Key Setup** (two options): -1. **Option 1: UI-based (Recommended)** - Use the API Key Manager tool at `/api-key-manager` to store your key locally in the browser 2. **Option 2: Environment-based** - Create `.env` file (see Environment Setup section below) for CI/CD or shared development ### Environment Setup (Optional)