Welcome Contributors!
Thank you for your interest in contributing to OdontologyApp! This guide will help you get started with the development workflow and best practices.Code of Conduct
By participating in this project, you agree to maintain a professional and respectful environment for all contributors.Getting Started
Before contributing, make sure you have:- Set up your development environment - Follow the Setup Guide
- Familiarized yourself with the codebase - Browse the Architecture documentation
- Checked existing issues - See if your idea or bug is already being discussed
Development Workflow
Create a Feature Branch
Create a new branch for your feature or fix:Branch naming conventions:
feature/- New featuresfix/- Bug fixesrefactor/- Code refactoringdocs/- Documentation updatestest/- Test additions or modifications
Make Your Changes
Implement your changes following the code style guidelines below. Test thoroughly before committing.
Commit Your Changes
Write clear, descriptive commit messages:Commit message format:
feat:- New featurefix:- Bug fixrefactor:- Code refactoringdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)test:- Adding or updating testschore:- Maintenance tasks
Code Style and Conventions
JavaScript/Svelte Style
General Guidelines
General Guidelines
- Use JSDoc for type annotations
- Follow camelCase for variables and functions
- Use PascalCase for Svelte components
- Prefer
constoverletwhen possible - Use template literals for string interpolation
- Keep functions small and focused
Svelte Components
Svelte Components
API Routes
API Routes
- Use proper HTTP methods (GET, POST, PUT, DELETE)
- Return consistent JSON responses
- Include proper error handling
- Validate input with Zod schemas
Database Queries
Database Queries
- Always use parameterized queries to prevent SQL injection
- Use the connection pool from
$lib/server/db - Handle errors appropriately
- Close connections properly (pool handles this automatically)
Permission Checking
Always check user permissions before allowing access to sensitive operations:src/lib/permissions.js.
Testing Requirements
Before submitting your pull request: See the Testing Guide for more details on testing approaches.Pull Request Process
Self-Review
Review your own changes before submitting:
- Check for console.log statements to remove
- Verify code formatting is consistent
- Ensure no unnecessary files are included
Update Documentation
If your changes affect:
- API endpoints - Update API documentation
- User features - Update user guides
- Developer setup - Update this contributing guide
Code Review
- Respond to feedback promptly
- Make requested changes
- Push updates to the same branch
- Be open to suggestions and discussions
Areas for Contribution
Here are some areas where contributions are especially welcome:Bug Fixes
Help identify and fix bugs in the application
Features
Implement new features from the roadmap
Testing
Add unit tests and integration tests
Documentation
Improve or add to the documentation
Performance
Optimize queries and improve load times
Accessibility
Improve accessibility for all users
Security
Identify and fix security vulnerabilities
UI/UX
Enhance the user interface and experience
Questions?
If you have questions about contributing:- Check the Architecture Documentation
- Review existing issues
- Ask in pull request discussions
- Contact the maintainers
