Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to this project.
- Code of Conduct
- Getting Started
- Development Workflow
- Coding Standards
- Submitting Changes
- Reporting Bugs
- Requesting Features
By participating in this project, you agree to maintain a respectful and inclusive environment. Please:
- Be respectful and constructive in discussions
- Welcome newcomers and help them get started
- Focus on what's best for the community
- Show empathy towards other community members
- Node.js (v18 or higher)
- pnpm (recommended) or npm/yarn
- Git
- A code editor (VS Code recommended)
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR-USERNAME/initiative-tracker.git cd initiative-tracker -
Add upstream remote:
git remote add upstream https://github.com/Valforte/initiative-tracker.git
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
-
Open the app at
http://localhost:5173
- Check existing issues to avoid duplicate work
- Create an issue for significant changes to discuss the approach first
- Keep changes focused - one feature/fix per PR
-
Create a new branch from
main:git checkout -b feature/your-feature-name # or git checkout -b fix/bug-description -
Make your changes following the coding standards below
-
Test your changes thoroughly:
- Test in both DM and Player views
- Test with different visibility settings
- Test HP management (damage, healing, temp HP)
- Test condition management
- Test in multiple themes
- Test in all languages
-
Commit your changes:
git add . git commit -m "feat: add new feature description" # or git commit -m "fix: resolve bug description"
Use conventional commit messages:
feat:for new featuresfix:for bug fixesdocs:for documentation changesstyle:for formatting changesrefactor:for code refactoringtest:for adding testschore:for maintenance tasks
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
- Use TypeScript for all new code
- Follow Vue 3 Composition API with
<script setup> - Use strict type checking
- Prefer
constoverlet, avoidvar - Use descriptive variable and function names
<script setup lang="ts">
// 1. Imports (Vue, libraries, local)
// 2. Props and emits definitions
// 3. Composables
// 4. Reactive state
// 5. Computed properties
// 6. Functions
// 7. Lifecycle hooks
</script>
<template>
<!-- Template here -->
</template>
<style scoped>
/* Styles here (prefer Tailwind classes) */
</style>- Use Tailwind CSS utility classes
- Use DaisyUI semantic classes for components
- Keep custom CSS minimal
- Ensure all themes work correctly
- All user-facing text must be localized
- Add translations to
src/lang.tsfor both EN and PT-BR - Use the
useTranslations()composable - Format:
{{ t.section.key }}
Example:
// In lang.ts
export const translations = {
en: {
mySection: {
myText: "Hello World"
}
},
pt_BR: {
mySection: {
myText: "Olá Mundo"
}
}
}
// In component
const { t } = useTranslations()
// Use: {{ t.mySection.myText }}- Remove
console.log()statements before committing - Avoid commented-out code
- Write clear comments for complex logic
- Keep functions small and focused
- Avoid deep nesting
-
Update your branch with latest upstream changes:
git fetch upstream git rebase upstream/main
-
Ensure your PR:
- Has a clear title and description
- References any related issues (e.g., "Fixes #123")
- Includes only relevant changes
- Builds successfully (
pnpm build) - Works in both DM and Player views
- Maintains localization in both languages
-
PR Description Template:
## Description Brief description of what this PR does ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Documentation update ## Testing - [ ] Tested in DM view - [ ] Tested in Player view - [ ] Tested with different visibility settings - [ ] Tested in both languages - [ ] Tested in multiple themes ## Screenshots (if applicable) Add screenshots or GIFs showing the changes ## Related Issues Fixes #(issue number)
-
Respond to feedback promptly and make requested changes
-
Squash commits if requested to maintain a clean history
- Check if the bug has already been reported
- Try to reproduce in the latest version
- Test in different browsers if applicable
**Describe the bug**
A clear description of what the bug is
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '...'
3. See error
**Expected behavior**
What you expected to happen
**Screenshots**
If applicable, add screenshots
**Environment:**
- Browser: [e.g., Chrome 120]
- OS: [e.g., Windows 11]
- Language: [EN/PT-BR]
- Theme: [if relevant]
**Additional context**
Any other relevant information**Is your feature request related to a problem?**
A clear description of the problem
**Describe the solution you'd like**
A clear description of what you want to happen
**Describe alternatives you've considered**
Other solutions or features you've considered
**Additional context**
Mockups, examples, or other relevant information# In browser, add query param:
http://localhost:5173/?view=player// In browser console:
localStorage.clear() // Reset all data
console.log(localStorage) // View stored data- Monsters: Add to
src/db.tsin appropriate array - Conditions: Add to both EN and PT-BR sections in
src/db.ts
App.vue (theme/language controls)
└─ InitiativeManager.vue (state management)
├─ DMView.vue (DM interface)
│ └─ DMTable.vue (combat table with controls)
└─ PlayerView.vue (player interface)
└─ PlayerTable.vue (read-only combat table)
If you have questions:
- Check the README.md for documentation
- Look at existing code for examples
- Open an issue for discussion
- Review closed issues/PRs for similar topics
Your contributions help make this tool better for the entire Pathfinder community. Every bug report, feature request, and pull request is appreciated!
Happy coding, and may your rolls be high!