📝 Simplify Docker deployment instructions and update project structure, testing, and coverage documentation in README

This commit is contained in:
2026-01-28 23:01:12 +00:00
parent dae271f8a8
commit 6a28e72c6c

View File

@@ -87,116 +87,76 @@ npm run preview
## 🐳 Docker Deployment
### Build and Run Locally
```bash
# Build the image
docker build -t pokedex-online .
# Run the container
docker run -d -p 8080:80 --name pokedex-online pokedex-online
# View in browser
open http://localhost:8080
```
### Using Docker Compose
```bash
# Start the service
# Build and run with Docker Compose
docker-compose up -d
# Stop the service
docker-compose down
# View logs
docker-compose logs -f
```
## 📦 Automated Deployment
Deploy to Synology NAS using the deployment script:
```bash
# Deploy to internal network (10.0.0.81)
npm run deploy:pokedex:internal
# Deploy to external network (home.gregrjacobs.com)
npm run deploy:pokedex:external
# Deploy with custom ports
npm run deploy:pokedex -- --target internal --port 8080 --ssl-port 8443
# Stop services
docker-compose down
```
## 📁 Project Structure
```
pokedex.online/
├── src/
│ ├── main.js # Application entry point
│ ├── App.vue # Root component with transitions
│ ├── style.css # Global styles
── router/
│ │ └── index.js # Vue Router configuration (4 routes)
│ ├── views/
│ ├── Home.vue # Landing page with tool cards
│ ├── ApiKeyManager.vue # API key storage and management
│ │ ├── GamemasterManager.vue # Gamemaster fetch/process/download
│ └── ChallongeTest.vue # API testing and validation
│ ├── components/
│ └── shared/
│ │ └── ProfessorPokeball.vue # Animated logo component
│ ├── services/
│ └── challonge.service.js # Challonge API client (20+ methods)
── utilities/
│ │ ├── constants.js # API config, types, CSV headers
│ ├── string-utils.js # String utilities
│ │ ├── csv-utils.js # CSV parsing and validation
│ ├── participant-utils.js # Participant management
│ │ ├── gamemaster-utils.js # Gamemaster processing
│ └── models/ # Data models (Tournament, Participant, Pokemon)
│ └── composables/
│ └── useChallongeApiKey.js # API key storage composable
├── .env.example # Environment template (optional)
├── index.html # HTML entry point
├── vite.config.js # Vite config with dev proxy
├── nginx.conf # Production nginx proxy config
── package.json # Dependencies (Vue 3, Vue Router)
├── Dockerfile # Docker build (nginx:alpine)
├── docker-compose.yml # Docker Compose config
├── PROJECT_PLAN.md # Implementation roadmap
├── API_KEY_STORAGE.md # API key storage documentation
└── README.md # This file
src/
├── components/ # React components
│ ├── PokemonCard.jsx
│ ├── SearchBar.jsx
│ ├── TypeMatrix.jsx
── ...
├── hooks/ # Custom React hooks
│ ├── usePokemon.js
│ ├── useSearch.js
└── ...
├── services/ # API & data services
├── pokemonService.js
│ ├── typeService.js
│ └── ...
├── utils/ # Helper functions
│ ├── formatters.js
├── validators.js
── ...
├── types/ # TypeScript type definitions
└── pokemon.ts
├── styles/ # Global styles
└── index.css
├── workers/ # Web Workers
│ └── search.worker.js
├── App.jsx
└── main.jsx
test/
├── unit/ # Unit tests
├── integration/ # Integration tests
── e2e/ # End-to-end tests
```
## 🎯 Available Tools
## 🧪 Testing
### API Key Manager (`/api-key-manager`)
- Store your Challonge API key locally in browser localStorage
- Works across all devices and browsers (mobile, tablet, desktop)
- Masked display for security (shows "xxxx•••••••xxxx")
- Update or clear your key anytime
- No need to edit .env files
- Secure browser-native storage
Comprehensive test coverage with Vitest:
### Gamemaster Manager (`/gamemaster`)
- Fetch latest Pokemon GO gamemaster from PokeMiners
- Process and break up into separate files
- Download pokemon.json, moves.json, and allFormsCostumes.json
- View statistics about downloaded data
```bash
# Run tests once
npm run test:run
### Challonge API Test (`/challonge-test`)
- Test your Challonge API connection
- Enter API key (or load from stored key)
- List your tournaments
- View tournament details and participants
- Verify API configuration is working
# Run tests in watch mode
npm test
### Printing Tool (Coming Soon)
- Import RK9 player CSV files
- Generate team sheets
- Create player badges
- Print tournament materials
# Open test UI
npm run test:ui
# Generate coverage report
npm run test:coverage
```
**106 tests** covering:
- Services and utilities (unit tests)
- Component integration
- User workflows
- Edge cases and error handling
### Tournament Manager (Coming Soon)
- Manage Challonge tournaments