Development Environment Setup
This guide will help you set up the Sistema de Seguimiento de Solicitudes project on your local machine for development.Prerequisites
Required Software
1. .NET SDK 9.0 or later
Download: https://dotnet.microsoft.com/download Verify Installation:2. SQL Server
Options:- SQL Server Express (Free) - Recommended for development
- SQL Server Developer Edition (Free)
- SQL Server LocalDB (Lightweight)
3. IDE or Code Editor
Recommended:- Visual Studio 2022 (Community, Professional, or Enterprise)
- Includes all necessary tools
- Built-in debugging and testing
- Download: https://visualstudio.microsoft.com/
- Visual Studio Code with C# extension
- Lightweight and cross-platform
- Download: https://code.visualstudio.com/
- Install C# Dev Kit extension
- JetBrains Rider (Paid/Trial)
- Excellent for .NET development
- Download: https://www.jetbrains.com/rider/
Optional Tools
SQL Server Management Studio (SSMS)
Purpose: Database management and querying Download: https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssmsAzure Data Studio
Purpose: Cross-platform database tool Download: https://docs.microsoft.com/en-us/sql/azure-data-studio/downloadPostman or similar API client
Purpose: Testing API endpoints Download: https://www.postman.com/downloads/Project Setup
1. Clone the Repository
2. Restore NuGet Packages
- Sistema de Seguimiento de Solicitudes (Frontend)
- SolicitudesAPI (Backend)
- SolicitudesShared (Shared library)
3. Database Setup
Option A: Using SQL Server Express/Developer
Step 1: Create DatabaseSolicitudesAPI/appsettings.json:
Option B: Using SQL Server LocalDB
Connection String:- Create all database tables
- Apply any existing migrations
- Set up the schema
dotnet ef is not recognized:
4. Configure JWT Settings
EditSolicitudesAPI/appsettings.json:
SecretKey to a secure, random string. Never commit production secrets to source control.
5. Configure Frontend API URL
EditSistema de Seguimiento de Solicitudes/Program.cs:
Running the Application
Option 1: Using Visual Studio
Step 1: Set Multiple Startup Projects- Right-click on solution in Solution Explorer
- Select “Set Startup Projects”
- Choose “Multiple startup projects”
- Set both projects to “Start”:
- SolicitudesAPI
- Sistema de Seguimiento de Solicitudes
- Click OK
F5 or click “Start Debugging”
Both projects will launch:
- API:
https://localhost:7123 - Frontend:
https://localhost:7xxx(varies)
Option 2: Using Command Line
Terminal 1 - Start API:Option 3: Using VS Code
Step 1: Open workspace.vscode/launch.json:
Accessing the Application
Frontend (Blazor WebAssembly)
URL: https://localhost:[port]- Default port varies (check console output)
- Opens automatically in browser
API (Backend)
URL: https://localhost:7123API Documentation (Scalar)
URL: https://localhost:7123/scalar/v1- Interactive API documentation
- Test endpoints directly
- View request/response schemas
Creating Test Users
You’ll need to create initial users to log in.Option 1: Direct SQL Insert
Option 2: Using API Endpoint
If you have a user registration endpoint, use Postman or curl:Development Workflow
1. Make Code Changes
- Frontend changes: Edit
.razor,.csfiles inSistema de Seguimiento de Solicitudes - Backend changes: Edit controllers, models in
SolicitudesAPI - Shared changes: Edit DTOs in
SolicitudesShared
2. Hot Reload
Both projects support hot reload: Blazor WebAssembly:- Save file → Browser refreshes automatically
- CSS changes apply instantly
- Automatically rebuilds on save
- Restarts server with changes
3. Database Changes
Add new entity or modify existing:4. Testing API Endpoints
Using Scalar UI:- Navigate to https://localhost:7123/scalar/v1
- Find your endpoint
- Click “Try it out”
- Enter parameters
- Execute and view response
Troubleshooting
Port Conflicts
Error: “Address already in use” Solution: Change ports inlaunchSettings.json:
SolicitudesAPI/Properties/launchSettings.json:
Database Connection Fails
Error: “Cannot connect to SQL Server” Solutions:- Verify SQL Server is running
- Check connection string
- Ensure Windows Authentication is enabled
- Check firewall settings
CORS Errors
Error: “CORS policy: No ‘Access-Control-Allow-Origin’” Solution: Verify CORS is configured inSolicitudesAPI/Program.cs:
Migration Issues
Error: “No migrations found” Solution:Frontend Won’t Connect to API
Check:- API is running
- BaseAddress in Program.cs matches API URL
- HTTPS certificate is trusted
- No firewall blocking connections
Next Steps
- Project Structure - Understand the codebase organization
- Contributing Guide - Guidelines for contributing
- Architecture Overview - Understand the system design