AI Adventure Racing Assistant - An MVP web application that helps adventure racers generate and manage packing checklists, assisted by AI (Azure OpenAI).
Aidventure is a React-based web application designed to help adventure racers create, refine, and manage packing checklists for races. Users can manually add checklist items or use AI assistance to generate tailored packing checklists based on race parameters like duration, disciplines, location, weather, and team size.
✅ Implemented:
- Complete type system for checklists and items
- LocalStorage persistence layer with cross-tab synchronization
- Zustand state management with full CRUD operations
- Checklist UI (category grouping, add/edit/delete items, progress, bulk actions) – see
frontend/CHECKLIST_UI.md - Comprehensive test coverage (storage + state management; UI tests upcoming)
- Docker development environment with hot reload
- Complete linting and formatting setup
⏳ In Progress / Planned:
- AI service integration (Azure OpenAI) + backend proxy (secure key usage)
- AI-assisted checklist generation & refinement flow
- Additional Checklist UI interaction & accessibility tests
- Frontend: React 19 + Vite 7 + TypeScript 5.9
- Styling: Tailwind CSS 3.4 (with custom outdoor racing theme)
- State Management: Zustand 5.0
- Storage: localStorage with abstraction layer (future-ready for IndexedDB)
- Testing: Vitest 3.2 + React Testing Library + @testing-library/jest-dom
- Linting: ESLint 9 (flat config) + Prettier 3.6
- Package Manager: npm
- Runtime: Node.js >= 20.0.0
- Containerization: Docker + Docker Compose
aidventure/
├── frontend/
│ ├── src/
│ │ ├── components/ # UI components (Checklist UI implemented)
│ │ │ ├── checklist/ # Production Checklist UI components
│ │ │ └── ChecklistDemo.tsx (legacy demo)
│ │ ├── ai/ # AI service & prompt building (to be created)
│ │ ├── state/ # Global state management (Zustand)
│ │ │ └── checklistStore.ts (complete CRUD operations)
│ │ ├── storage/ # Persistence layer
│ │ │ └── checklistStorage.ts (localStorage implementation)
│ │ ├── types/ # TypeScript type definitions
│ │ │ └── checklist.ts (complete data model)
│ │ └── __tests__/ # Test files
│ │ ├── App.test.tsx
│ │ ├── checklistStorage.test.ts
│ │ ├── checklistStore.test.ts
│ │ └── setup.ts
│ ├── public/ # Static assets
│ ├── Dockerfile # Multi-stage Docker build
│ ├── STORAGE.md # Storage implementation docs
│ └── package.json
├── docker-compose.yml # Docker Compose configuration
├── PRD.md # Product Requirements Document
├── QUICKSTART.md # Developer onboarding guide
└── README.md # This file
-
Docker (recommended): Docker Desktop or Docker Engine + Docker Compose
- Install Docker Desktop
- Or install Docker Engine and Docker Compose separately
-
Without Docker: Node.js >= 20.0.0 and npm
Docker provides a consistent development environment with hot reload support.
git clone https://github.com/robpitcher/aidventure.git
cd aidventurecp .env.example .envdocker compose upThe application will be available at http://localhost:5173
docker compose downdocker compose up --buildgit clone https://github.com/robpitcher/aidventure.git
cd aidventurecd frontend
npm installnpm run devThe application will be available at http://localhost:5173
npm run buildThe production-ready files will be in the dist/ directory.
npm run previewdocker compose up- Start the development environmentdocker compose up --build- Rebuild and start the environmentdocker compose down- Stop the environmentdocker compose logs -f frontend- View frontend logs
In the frontend/ directory, you can run:
npm run dev- Start the development servernpm run build- Build the app for productionnpm run preview- Preview the production buildnpm run lint- Run ESLint to check code qualitynpm run format- Format code with Prettiernpm run format:check- Check if code is formatted correctlynpm run test- Run tests with Vitestnpm run test:ui- Run tests with Vitest UI
- TypeScript for type safety
- ESLint for code quality
- Prettier for consistent formatting
- Tailwind CSS for styling
The application uses Zustand for state management with a complete implementation in src/state/checklistStore.ts:
Implemented Store Actions:
loadChecklists()- Load all checklists from storagecreateChecklist(name)- Create a new checklistupdateChecklist(checklist)- Update an existing checklistdeleteChecklist(id)- Delete a checklistsetCurrentChecklist(id)- Set the active checklistaddItem(checklistId, item)- Add an item to a checklistupdateItem(checklistId, itemId, updates)- Update a checklist itemdeleteItem(checklistId, itemId)- Remove an itemtoggleItemComplete(checklistId, itemId)- Toggle item completion status
Features:
- Automatic cross-tab synchronization
- Error handling and loading states
- Integration with localStorage persistence layer
Use the store for all state operations. Do not access the storage layer directly from components.
The project has comprehensive test coverage for core functionality:
Implemented Tests:
- Storage layer: CRUD operations, timestamps, cross-tab sync, error handling
- State management: All Zustand store actions and state updates
- Component: Basic App component test
Test Commands:
npm test- Run tests in watch modenpm run test:ui- Run tests with Vitest UI- Run tests before committing
Testing Stack:
- Vitest 3.2 with jsdom environment
- React Testing Library for component testing
- @testing-library/jest-dom for enhanced matchers
- @testing-library/user-event for user interaction testing
See src/__tests__/ for examples and STORAGE.md for storage implementation details.
components/checklist/- Production Checklist UI (seeCHECKLIST_UI.md)components/ChecklistDemo.tsx- Legacy demo component (optional)ai/- (Planned) AI service & prompt utilitiesstate/- Global state stores (Zustand)storage/- Persistence layer abstractiontypes/- TypeScript interfaces and domain types
The complete data model is defined in frontend/src/types/checklist.ts. Key types:
Checklist- Main checklist entity with items and metadataItem- Individual checklist item with category, notes, quantity, priorityAIGenerationParams- Parameters for AI-assisted generationAIChecklistResponse- AI response structureCategoryResponse- Category with items from AIItemResponse- Individual item from AI responseGeneratedChecklistMeta- Metadata for AI-generated checklistsChatSession- Chat history for iterative refinement
Storage Implementation:
The storage layer (src/storage/checklistStorage.ts) provides:
ChecklistStorageAPIinterface for abstractionLocalStorageChecklistStorageimplementation- Helper functions:
createEmptyChecklist(),generateChecklistId(),generateItemId() - Automatic timestamp management
- Cross-tab synchronization
- Versioning for future migrations
See STORAGE.md for detailed documentation on the storage system.
The project uses Docker and Docker Compose for a consistent development environment:
- Multi-stage Dockerfile: Optimized for both development and production
- Hot Reload: File changes are automatically reflected in the running container
- Volume Mounts: Source code is mounted for live updates
- Network Isolation: Services communicate via dedicated Docker network
# Start development environment
docker compose up
# Start in detached mode (background)
docker compose up -d
# View logs
docker compose logs -f frontend
# Rebuild containers (after dependency changes)
docker compose up --build
# Stop containers
docker compose down
# Remove containers and volumes
docker compose down -v
# Execute commands in running container
docker compose exec frontend npm run lint
docker compose exec frontend npm test# Build production image
docker build -t aidventure-frontend:latest --target production ./frontend
# Run production container
docker run -p 8080:80 aidventure-frontend:latest"Exit handler never called!" npm warning during build:
- This is a known npm bug in Docker environments
- The warning is benign and doesn't affect container functionality
- Dependencies are still installed correctly
- You can safely ignore this warning
Hot reload not working:
- The Vite config uses polling to detect file changes in Docker
- If changes aren't reflected, restart the container:
docker compose restart frontend
Port already in use:
- Stop the conflicting service or change the port in
docker-compose.yml - Check running containers:
docker ps
Changes to package.json not reflected:
- Rebuild the container:
docker compose up --build - Or rebuild specific service:
docker compose build frontend
Permission errors on Linux:
- Files created by Docker may be owned by root
- Fix with:
sudo chown -R $USER:$USER .
Container fails to start:
- Check logs:
docker compose logs frontend - Ensure Docker Desktop/Engine is running
- Verify port 5173 is not in use:
lsof -i :5173(macOS/Linux) ornetstat -ano | findstr :5173(Windows)
Cannot connect to container:
- Ensure you're accessing
http://localhost:5173(nothttp://0.0.0.0:5173) - Check container is running:
docker compose ps - Verify firewall settings
Build errors:
- Clear build cache:
rm -rf frontend/dist frontend/node_modules - Reinstall dependencies:
cd frontend && npm install
Test failures:
- Ensure all dependencies are installed:
npm install - Clear test cache:
npm test -- --clearCache
Linting errors:
- Auto-fix:
npm run format - Check specific issues:
npm run lint
Planned Features:
- AI service integration with Azure OpenAI (secure backend proxy)
- AI-assisted checklist generation with structured Q&A & iterative refinement
- Zod schema validation + robust error handling for AI responses
- Additional interaction & accessibility test coverage for Checklist UI
Potential Future Additions:
- CI/CD with GitHub Actions
- User authentication and cloud sync
- Cloud deployment (Azure)
- Weather API integration
- Gear optimization recommendations
- Export to PDF/CSV
- Team-specific pack allocation
- Weight tracking
This is an MVP project. When implementing features:
- Follow the existing folder structure
- Add TypeScript types in
types/directory - Write tests for new functionality
- Run lint and format before committing
- Update documentation as needed
MIT License - see LICENSE file for details
- PRD.md - Detailed product requirements and specifications
- QUICKSTART.md - Quick developer onboarding guide
- STORAGE.md - Storage and state management documentation
- Checklist UI Guide - Detailed UI behaviors & UX patterns
- Copilot Instructions - Development guidelines for Copilot agents
For questions or issues, please open an issue on GitHub.