First off, thank you for considering contributing to InsuranceMate! 🎉
Before creating bug reports, please check existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
Bug Report Template:
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment:**
- Browser: [e.g. Chrome, Safari]
- Version: [e.g. 120]
- Device: [e.g. Desktop, Mobile]Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the steps
- Describe the current behavior and explain the behavior you expected
- Explain why this enhancement would be useful
- Fork the repo and create your branch from
main - Make your changes following our coding standards
- Test your changes thoroughly
- Update documentation if needed
- Submit a pull request
Pull Request Template:
**Description**
Brief description of what this PR does.
**Type of Change**
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
**Testing**
Describe the tests you ran and how to reproduce them.
**Checklist:**
- [ ] My code follows the style guidelines
- [ ] I have performed a self-review
- [ ] I have commented my code where needed
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have tested on multiple browsers- Use ES6+ syntax
- Use const and let instead of var
- Use arrow functions where appropriate
- Use template literals for string concatenation
- Add comments for complex logic
- Keep functions small and focused
Example:
// Good
const calculatePremium = (baseAmount, duration) => {
return baseAmount * duration * 1.05;
};
// Bad
var calculatePremium = function(baseAmount, duration) {
var result = baseAmount * duration * 1.05;
return result;
}- Use CSS variables for colors and spacing
- Follow BEM naming convention where applicable
- Keep selectors specific but not overly nested
- Group related properties together
- Use meaningful class names
Example:
/* Good */
.insurance-card {
background: var(--color-surface);
border-radius: var(--radius-lg);
padding: var(--spacing-md);
}
/* Bad */
.card {
background: #fff;
border-radius: 8px;
padding: 16px;
}- Use semantic HTML5 elements
- Keep attributes ordered: class, id, data-*, other attributes
- Use meaningful IDs and classes
- Add ARIA labels for accessibility
- Indent with 4 spaces
Example:
<!-- Good -->
<article class="insurance-card" id="policy-123" data-type="auto">
<h2 class="card-title">ประกันรถยนต์</h2>
<p class="card-description">กรุงเทพประกันภัย</p>
</article>
<!-- Bad -->
<div class="card" id="123">
<div>ประกันรถยนต์</div>
<div>กรุงเทพประกันภัย</div>
</div>insurance-mate/
├── index.html # Main app page
├── login.html # Login/Register page
├── styles.css # Global styles
├── app.js # Application logic
├── README.md # Project overview
├── CONTRIBUTING.md # This file
├── LICENSE # MIT License
├── CHANGELOG.md # Version history
├── USER_MANUAL_TH.md # Thai user manual
├── BACKEND_README.md # Backend documentation
└── .gitignore # Git ignore rules
Test your changes on:
- ✅ Desktop browsers: Chrome, Firefox, Safari, Edge
- ✅ Mobile browsers: Chrome Mobile, Safari Mobile
- ✅ Different screen sizes: Mobile (375px), Tablet (768px), Desktop (1024px+)
- ✅ Different data scenarios: Empty state, Single item, Multiple items
- All pages load without errors
- Navigation works correctly
- Forms validate input properly
- Buttons perform expected actions
- Modals open and close correctly
- Toast notifications display properly
- Data persists after page refresh
- Logout redirects to login page
- Login redirects to main app
Currently, the app supports Thai language only. If you want to add more languages:
- Create a language file (e.g.,
lang-en.js) - Follow the structure of Thai strings
- Update the language switcher in Settings
- Test all UI elements with new language
- Never commit sensitive data (API keys, passwords)
- Validate all user inputs
- Sanitize data before displaying
- Use HTTPS for production
- Follow OWASP security best practices
When adding new features:
- Update README.md with feature description
- Update USER_MANUAL_TH.md with usage instructions
- Update CHANGELOG.md with version changes
- Add inline comments for complex code
- Create examples if needed
- GitHub Issues: For bugs and feature requests
- Pull Requests: For code contributions
- Discussions: For general questions and ideas
Contributors will be recognized in:
- README.md contributors section
- Release notes
- Project website (when available)
By contributing, you agree that your contributions will be licensed under the MIT License.
- 🔥 Firebase backend integration
- 🔥 Real authentication system
- 🔥 File upload functionality
- 🔥 Responsive design improvements
- 📱 Progressive Web App (PWA)
- 🌍 English language support
- 📊 Advanced analytics
- 🎨 Dark mode theme
- 🎬 Animation improvements
- 🖼️ Custom icons
- 📖 More documentation
- 🧪 Unit tests
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/insurance-mate.git
- Create a branch:
git checkout -b feature/amazing-feature
- Make your changes
- Commit your changes:
git commit -m "Add amazing feature" - Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
Thank you for making InsuranceMate better! 🎉