Code Style
TypeScript
We use TypeScript in strict mode for all code. The project enforces strict type checking:tsconfig.app.json
Always define explicit types for function parameters and return values. Avoid using
any unless absolutely necessary.File Naming Conventions
Follow these naming patterns observed in the codebase:-
React Components: PascalCase with
.tsxextension- Example:
DashboardPage.tsx,TaskDetail.tsx,KappaProgressSection.tsx
- Example:
-
Utilities and Logic: camelCase with
.tsextension- Example:
unlock.ts,kappaProgress.ts,normalize.ts
- Example:
-
Test Files: Same name as the file being tested with
.test.tsor.test.tsx- Example:
unlock.test.ts,recommendations.test.ts - Place tests in
__tests__directories within their feature folder
- Example:
-
Type Definitions:
types.tswithin each feature directory
Component Organization
Components are organized by feature rather than by type:State Management Patterns
When to Use Zustand
Use Zustand stores for UI state that needs to be shared across components:- View mode toggles (list/flow view)
- Filter selections
- Panel open/closed states
- Active selections
When to Use TanStack Query
Use TanStack Query for server state (API data):- Fetching data from tarkov.dev GraphQL API
- Caching API responses (12-hour TTL)
- Handling loading and error states
When to Use Dexie (IndexedDB)
Use Dexie for persistent user data:- User profile and player level
- Task progress and completion status
- Notes and pins
- Hideout progress
- Settings and preferences
Never store API data in IndexedDB. API data should only be cached in memory via TanStack Query.
Domain Logic
Keep domain logic pure and testable in thesrc/domain/ directory:
- No React dependencies
- No side effects
- Fully unit tested
- Clear input/output contracts
Commit Message Conventions
Write clear, descriptive commit messages that explain why the change was made:Format
Types
feat: New featurefix: Bug fixrefactor: Code restructuring without behavior changetest: Adding or updating testsdocs: Documentation updatesstyle: Code style changes (formatting, missing semicolons, etc.)chore: Build process, dependencies, tooling
Examples
Pull Request Process
Make your changes
- Write clean, tested code
- Follow the coding conventions above
- Add tests for new functionality
- Update documentation if needed
Code Review Expectations
When reviewing or being reviewed:For Authors
- Keep PRs focused and reasonably sized
- Respond to feedback promptly and professionally
- Update your PR based on review comments
- Test your changes thoroughly before requesting review
For Reviewers
- Be respectful and constructive
- Explain the “why” behind suggestions
- Approve when the code meets standards, even if you’d do it differently
- Focus on correctness, maintainability, and adherence to conventions
Documentation Updates
Update documentation when:- Adding new features
- Changing existing behavior
- Adding new configuration options
- Updating dependencies with breaking changes
README.mdfor project overview and setup- Code comments for complex logic
- Type definitions for API contracts
License and Attribution
This project is released under the MIT License:Important: This project is not affiliated with or endorsed by Battlestate Games. Game content and materials are trademarks and copyrights of Battlestate Games.
Questions?
If you have questions about contributing:- Check existing GitHub Issues
- Open a new issue for discussion
- Review merged PRs for examples