Contributing to Sistema de Seguimiento de Solicitudes
Thank you for your interest in contributing! This guide will help you understand our development workflow and best practices.Getting Started
Prerequisites
Before you begin, make sure you have:- Completed the Development Setup
- Read the Project Structure documentation
- Familiarized yourself with the Architecture Overview
Setting Up Your Development Environment
-
Fork the Repository (if applicable)
-
Create a Development Branch
-
Install Dependencies
Development Workflow
Branch Naming Convention
Use descriptive branch names with prefixes:feature/- New features- Example:
feature/add-email-notifications
- Example:
fix/- Bug fixes- Example:
fix/login-validation-error
- Example:
refactor/- Code refactoring- Example:
refactor/expediente-service
- Example:
docs/- Documentation changes- Example:
docs/update-setup-guide
- Example:
test/- Adding or updating tests- Example:
test/expediente-controller
- Example:
Making Changes
1. Code Style and Standards
C# Code Style:- Follow C# Coding Conventions
- Use PascalCase for public members
- Use camelCase for private fields (with
_prefix) - Use meaningful variable and method names
- Add XML documentation comments for public APIs
- Keep component files focused and small
- Separate code-behind when logic is complex
- Use proper @code blocks or code-behind files
- Follow Blazor component lifecycle best practices
2. Database Changes
When modifying entities or DbContext:- Make your changes to the entity classes or DbContext
- Create a migration:
- Review the generated migration file
- Test the migration locally:
- If needed, rollback and refine:
- Use descriptive migration names (e.g.,
AddEmailToUsuario) - Never modify existing migrations that have been deployed
- Always test migrations both up and down
- Include seed data if necessary
- Document breaking changes
3. Adding New Features
Frontend Feature:-
Create DTO in Shared project (if needed)
-
Create Service Interface and Implementation
-
Register Service in Program.cs
-
Create Razor Component
-
Add Component Styles (if needed)
-
Create/Update Entity Model
-
Update DbContext
-
Create Migration
-
Create Controller
-
Test Endpoints
- Use Scalar UI at
/scalar/v1 - Or create requests in
SolicitudesAPI.http
- Use Scalar UI at
4. Testing Your Changes
Manual Testing Checklist:- Frontend compiles without errors
- Backend compiles without errors
- Database migrations apply successfully
- New features work as expected
- Existing features still work (regression testing)
- Authentication/authorization works correctly
- Error handling works properly
- UI is responsive and accessible
- No console errors in browser
- API returns expected status codes
Committing Changes
Commit Message Guidelines
Use clear, descriptive commit messages following this format:feat: New featurefix: Bug fixrefactor: Code refactoringdocs: Documentation changesstyle: Code style changes (formatting, etc.)test: Adding or updating testschore: Maintenance tasks
Committing Best Practices
- Make atomic commits - Each commit should represent one logical change
- Commit often - Small, frequent commits are better than large ones
- Test before committing - Ensure code compiles and works
- Don’t commit secrets - Never commit passwords, API keys, etc.
- Use .gitignore - Ensure build artifacts are ignored
Creating Pull Requests
Before Creating a PR
-
Update your branch with main
-
Run final checks
-
Review your changes
PR Template
When creating a pull request, include:PR Best Practices
- Keep PRs focused - One feature or fix per PR
- Write descriptive titles - Clear, concise summary
- Provide context - Explain why the change is needed
- Include examples - Show before/after for UI changes
- Request specific reviewers - Tag relevant team members
- Respond to feedback - Address review comments promptly
- Keep PRs small - Easier to review and less likely to have issues
Code Review Process
As an Author
- Be open to feedback - Reviews improve code quality
- Respond promptly - Address comments in a timely manner
- Explain your decisions - Help reviewers understand your approach
- Make requested changes - Or discuss why you disagree
- Keep discussions professional - Focus on code, not individuals
As a Reviewer
- Be constructive - Suggest improvements, don’t just criticize
- Explain reasoning - Help authors learn and improve
- Focus on important issues - Don’t be overly pedantic
- Approve when ready - Don’t block on minor style issues
- Test the changes - Pull the branch and verify functionality
Common Tasks
Adding a New API Endpoint
- Create/Update DTO in Shared
- Add Controller Action
- Test with Scalar
- Update Frontend Service
- Use in Component
Adding a New Database Table
-
Create Entity Class
-
Add DbSet to Context
-
Configure Entity (if needed)
-
Create and Apply Migration
Adding a New Page
-
Create Razor Component
-
Add Navigation Link (if needed)
-
Add Authorization (if needed)
Troubleshooting
Common Issues
Merge Conflicts:Getting Help
Resources
Asking Questions
When asking for help, include:- What you’re trying to do
- What you’ve tried
- Error messages (full text)
- Relevant code snippets
- Your environment (OS, .NET version, etc.)
Communication Channels
- Issues - Bug reports and feature requests
- Pull Requests - Code reviews and discussions
- Team Chat - Quick questions and coordination
- Documentation - Reference and guides
Thank You!
Your contributions make this project better for everyone. We appreciate your time and effort!Next Steps
- Development Setup - Get your environment ready
- Project Structure - Understand the codebase
- Architecture Overview - Learn the system design