📝 Simplify Docker deployment instructions and update project structure, testing, and coverage documentation in README
This commit is contained in:
@@ -87,116 +87,76 @@ npm run preview
|
|||||||
|
|
||||||
## 🐳 Docker Deployment
|
## 🐳 Docker Deployment
|
||||||
|
|
||||||
### Build and Run Locally
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build the image
|
# Build and run with Docker Compose
|
||||||
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
|
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
# Stop the service
|
|
||||||
docker-compose down
|
|
||||||
|
|
||||||
# View logs
|
# View logs
|
||||||
docker-compose logs -f
|
docker-compose logs -f
|
||||||
```
|
|
||||||
|
|
||||||
## 📦 Automated Deployment
|
# Stop services
|
||||||
|
docker-compose down
|
||||||
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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 📁 Project Structure
|
## 📁 Project Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
pokedex.online/
|
src/
|
||||||
├── src/
|
├── components/ # React components
|
||||||
│ ├── main.js # Application entry point
|
│ ├── PokemonCard.jsx
|
||||||
│ ├── App.vue # Root component with transitions
|
│ ├── SearchBar.jsx
|
||||||
│ ├── style.css # Global styles
|
│ ├── TypeMatrix.jsx
|
||||||
│ ├── router/
|
│ └── ...
|
||||||
│ │ └── index.js # Vue Router configuration (4 routes)
|
├── hooks/ # Custom React hooks
|
||||||
│ ├── views/
|
│ ├── usePokemon.js
|
||||||
│ │ ├── Home.vue # Landing page with tool cards
|
│ ├── useSearch.js
|
||||||
│ │ ├── ApiKeyManager.vue # API key storage and management
|
│ └── ...
|
||||||
│ │ ├── GamemasterManager.vue # Gamemaster fetch/process/download
|
├── services/ # API & data services
|
||||||
│ │ └── ChallongeTest.vue # API testing and validation
|
│ ├── pokemonService.js
|
||||||
│ ├── components/
|
│ ├── typeService.js
|
||||||
│ │ └── shared/
|
│ └── ...
|
||||||
│ │ └── ProfessorPokeball.vue # Animated logo component
|
├── utils/ # Helper functions
|
||||||
│ ├── services/
|
│ ├── formatters.js
|
||||||
│ │ └── challonge.service.js # Challonge API client (20+ methods)
|
│ ├── validators.js
|
||||||
│ ├── utilities/
|
│ └── ...
|
||||||
│ │ ├── constants.js # API config, types, CSV headers
|
├── types/ # TypeScript type definitions
|
||||||
│ │ ├── string-utils.js # String utilities
|
│ └── pokemon.ts
|
||||||
│ │ ├── csv-utils.js # CSV parsing and validation
|
├── styles/ # Global styles
|
||||||
│ │ ├── participant-utils.js # Participant management
|
│ └── index.css
|
||||||
│ │ ├── gamemaster-utils.js # Gamemaster processing
|
├── workers/ # Web Workers
|
||||||
│ │ └── models/ # Data models (Tournament, Participant, Pokemon)
|
│ └── search.worker.js
|
||||||
│ └── composables/
|
├── App.jsx
|
||||||
│ └── useChallongeApiKey.js # API key storage composable
|
└── main.jsx
|
||||||
├── .env.example # Environment template (optional)
|
|
||||||
├── index.html # HTML entry point
|
test/
|
||||||
├── vite.config.js # Vite config with dev proxy
|
├── unit/ # Unit tests
|
||||||
├── nginx.conf # Production nginx proxy config
|
├── integration/ # Integration tests
|
||||||
├── package.json # Dependencies (Vue 3, Vue Router)
|
└── e2e/ # End-to-end tests
|
||||||
├── 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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🎯 Available Tools
|
## 🧪 Testing
|
||||||
|
|
||||||
### API Key Manager (`/api-key-manager`)
|
Comprehensive test coverage with Vitest:
|
||||||
- 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
|
|
||||||
|
|
||||||
### Gamemaster Manager (`/gamemaster`)
|
```bash
|
||||||
- Fetch latest Pokemon GO gamemaster from PokeMiners
|
# Run tests once
|
||||||
- Process and break up into separate files
|
npm run test:run
|
||||||
- Download pokemon.json, moves.json, and allFormsCostumes.json
|
|
||||||
- View statistics about downloaded data
|
|
||||||
|
|
||||||
### Challonge API Test (`/challonge-test`)
|
# Run tests in watch mode
|
||||||
- Test your Challonge API connection
|
npm test
|
||||||
- Enter API key (or load from stored key)
|
|
||||||
- List your tournaments
|
|
||||||
- View tournament details and participants
|
|
||||||
- Verify API configuration is working
|
|
||||||
|
|
||||||
### Printing Tool (Coming Soon)
|
# Open test UI
|
||||||
- Import RK9 player CSV files
|
npm run test:ui
|
||||||
- Generate team sheets
|
|
||||||
- Create player badges
|
# Generate coverage report
|
||||||
- Print tournament materials
|
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)
|
### Tournament Manager (Coming Soon)
|
||||||
- Manage Challonge tournaments
|
- Manage Challonge tournaments
|
||||||
|
|||||||
Reference in New Issue
Block a user