Cloning an Existing PearDrop-Based Project
This guide walks you through cloning and running an existing PearDrop-based application on your local machine.
Prerequisites: Before starting, ensure you have installed the required tools (.NET 10, Docker, Git, etc.)
Step 1: Clone Your Project
git clone <your-peardrop-project-url>
cd <your-project-directory>
Step 2: Restore Local Tools
PearDrop projects use the PearDrop CLI, pinned to a specific version. Restore it:
dotnet tool restore
Verify:
dotnet tool run peardrop --version
Step 3: Start Infrastructure Services
Start SQL Server, Redis, and other services using Docker Compose:
docker-compose up -d
Verify services are running:
docker-compose ps
Expected services:
sqlserver- SQL Server 2022 on port 1433redis- Redis cache on port 6379jaeger- Distributed tracing (UI at http://localhost:16686)
Note: SQL Server takes 15–20 seconds to fully start. Be patient!
Step 4: Configure Local Settings (Optional)
For local development with custom settings and secrets:
# Copy the example file (if it exists)
cp source/<YourProject>.App/appsettings.Local.json.example source/<YourProject>.App/appsettings.Local.json
Edit appsettings.Local.json and customize:
- Connection strings with your local passwords
- API keys and tokens
- Any local-specific configuration
Then set your environment to use Local configuration:
# PowerShell
$env:ASPNETCORE_ENVIRONMENT="Local"
# Or add to launchSettings.json:
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Local"
}
appsettings.Local.json is git-ignored by default, making it safe for secrets. This is cleaner than using .NET user-secrets and works just like any other environment config (Development, Production, etc.).
Step 5: Restore NuGet Packages & Build
dotnet restore
dotnet build
If the build fails, check:
- Your project's
nuget.configfor the correct NuGet feed URL - Ask your team for the PearDrop NuGet feed location
- Run
dotnet nuget locals all --clearand try again
Step 6: Initialize the Database
Apply migrations using the PearDrop CLI:
dotnet tool run peardrop migrate
Expected output:
Applying migrations...
Apply migration CreateIdentitySchema...
Apply migration InitialCreate...
Done.
Note: The
peardrop migratecommand automatically discovers and applies migrations from all DbContexts in your project.
Step 7: Run the Application
dotnet run --project source/<YourProject>.App
When ready, you'll see:
Now listening on: https://localhost:7001
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to stop.
Open your browser to: https://localhost:7001
Step 8: Access the Application
The application is now running. What you see depends on your project's configuration:
If authentication is enabled:
- You'll see a login page on first load
- Use the credentials provided by your team for local development
- These are typically defined in
appsettings.Development.jsonor seeded via database migrations - Ask your team for the local development credentials
If authentication is not enabled:
- You'll be automatically redirected to the dashboard
- No login required
Check your project's documentation or ask your team for:
- Whether authentication is configured
- What test credentials to use locally
- Any special setup steps for your specific project
Troubleshooting
Docker containers won't start
- Check Docker Desktop is running
- Check disk space
- Check for port conflicts:
netstat -ano | findstr ":1433" # SQL Server
netstat -ano | findstr ":6379" # Redis
netstat -ano | findstr ":16686" # Jaeger UI - Check container logs:
docker logs sqlserver
docker logs redis
docker logs jaeger - Try
docker rm <container-name>and restart
Cannot connect to database
- Verify SQL Server is running:
docker-compose ps - Check connection string in
appsettings.json - Wait longer for SQL Server to initialize
NuGet restore fails
- Check
nuget.configNuGet feed URL - Check internet connectivity
- Contact your team for feed access
Application won't start
- Check
peardrop migratecompleted successfully - Check
appsettings.Development.jsonexists - Look for error messages in the console output
Next Steps
✅ You're ready to develop! Continue to:
- Your First Project - Build your first feature
- Project Structure - Understand the layout
- CQRS Operations - Implement features