Quick Start Guide¶
Get the Cargonerds application up and running in minutes.
Prerequisites¶
Before you begin, ensure you have the following installed:
- .NET 9.0 SDK or later - Download
- Node.js v18 or v20 - Download
- Docker Desktop - Download
- Redis (via Docker or local install)
- SQL Server (via Docker or local install)
- Git - Download
Clone the Repository¶
Configure the Application¶
1. Update Connection Strings¶
Check the connection strings in the following files:
src/Cargonerds.AuthServer/appsettings.jsonsrc/Cargonerds.HttpApi.Host/appsettings.jsonsrc/Cargonerds.DbMigrator/appsettings.jsonsrc/Cargonerds.Web.Public/appsettings.json
Default connection string (for local SQL Server in Docker):
{
"ConnectionStrings": {
"Default": "Server=localhost,1433;Database=Cargonerds;User Id=sa;Password=myStrong(!)Password;TrustServerCertificate=true"
}
}
2. Generate Signing Certificate¶
For the AuthServer, you need an OpenIddict signing certificate:
cd src/Cargonerds.AuthServer
dotnet dev-certs https -v -ep openiddict.pfx -p d9efcd01-fbd8-42b1-a9d1-a5cf44afe714
Note:
d9efcd01-fbd8-42b1-a9d1-a5cf44afe714is the default password. Change it for production.
Set Up Infrastructure¶
Option 1: Using Docker Compose (Recommended)¶
Start infrastructure dependencies with Docker Compose:
This starts: - SQL Server on port 1433 - Redis on port 6379 - RabbitMQ on port 5672
Option 2: Using .NET Aspire (Automated)¶
.NET Aspire will automatically start required infrastructure when you run the AppHost.
Install Client-Side Dependencies¶
This command installs all required JavaScript/CSS libraries.
Run Database Migrations¶
Create the database and apply migrations:
You should see output indicating successful migration and data seeding.
Run the Application¶
Option 1: Using .NET Aspire (Recommended)¶
Run the AppHost project to start all services:
The Aspire dashboard will open automatically. You can access:
- Aspire Dashboard:
http://localhost:15000(or as shown in console) - AuthServer:
http://localhost:5000 - API:
http://localhost:6000 - Public Web:
http://localhost:7000 - Blazor App:
http://localhost:8000
Option 2: Manual Start¶
Start each service individually in separate terminals:
# Terminal 1: AuthServer
cd src/Cargonerds.AuthServer
dotnet run
# Terminal 2: API Host
cd src/Cargonerds.HttpApi.Host
dotnet run
# Terminal 3: Public Web
cd src/Cargonerds.Web.Public
dotnet run
# Terminal 4: Blazor App
cd src/Cargonerds.Blazor
dotnet run
Access the Application¶
Default Credentials¶
Admin User:
- Username: admin
- Password: 1q2w3E*
Application URLs¶
- Public Web: Navigate to the Public Web URL (default:
https://localhost:7000) - Blazor App: Navigate to the Blazor URL (default:
https://localhost:8000) - API Swagger: Navigate to
{API_URL}/swagger(default:https://localhost:6000/swagger)
Verify Installation¶
1. Check API Health¶
Navigate to the API health endpoint:
You should see a JSON response indicating the health status.
2. Test Authentication¶
- Navigate to the Blazor app
- Click "Login"
- Enter admin credentials
- You should be redirected back to the application
3. Test API¶
Using Swagger UI at https://localhost:6000/swagger:
- Click "Authorize"
- Use admin credentials
- Try the
/api/app/bookendpoints
Common Issues¶
Port Already in Use¶
If ports are already in use, you can change them in launchSettings.json files in each project's Properties folder.
Certificate Errors¶
If you encounter HTTPS certificate errors:
Database Connection Errors¶
-
Verify SQL Server is running:
-
Check connection string in
appsettings.json -
Verify SQL Server accepts connections:
Redis Connection Errors¶
Verify Redis is running:
Next Steps¶
Now that you have the application running:
- Explore the UI: Navigate through the Blazor application
- Try the API: Use Swagger to test API endpoints
- Review the Code: Start with the Book service as a simple example
- Read Architecture: Understand the layered architecture
- Learn ABP Patterns: Review ABP patterns
Development Workflow¶
For day-to-day development:
- Start Infrastructure:
docker-compose up -d(if not using Aspire) - Run AppHost:
dotnet runin AppHost directory - Make Changes: Edit code in your IDE
- Hot Reload: Changes are automatically reloaded
- Run Tests:
dotnet testin the test project - Commit Changes: Use Git to commit your work
Troubleshooting¶
Application Won't Start¶
- Check prerequisites are installed
- Verify Docker is running
- Check port availability
- Review logs in the console
Can't Login¶
- Verify AuthServer is running
- Check AuthServer logs
- Ensure database migrations ran successfully
- Try default admin credentials
API Returns 401 Unauthorized¶
- Verify you're authenticated
- Check token in Authorization header
- Verify permission configuration
- Check AuthServer is accessible
Getting Help¶
- Documentation: Browse this documentation site
- GitHub Issues: Report issues
- ABP Docs: Official ABP documentation
- Community: ABP Community