Repository navigation
Development Setup
This guide is for contributors who want a repeatable local development environment that matches the current solution layout.
Required:
Recommended:
- Visual Studio 2022 or Visual Studio Code
- Docker Desktop for database or deployment experiments
- pgAdmin, Azure Data Studio, or another PostgreSQL client
| Project | Role |
|---|---|
src/Egroo/Egroo |
Blazor host application |
src/Egroo/Egroo.Client |
Blazor WebAssembly project |
src/Egroo.UI |
Shared component library |
src/Egroo.Server |
API, SignalR, EF Core, repositories |
src/jihadkhawaja.chat.client |
Client chat services |
src/jihadkhawaja.chat.server |
SignalR hub implementation |
src/jihadkhawaja.chat.shared |
Shared contracts and models |
src/Egroo.Server.Test |
MSTest project |
The main solution file is src/Egroo.slnx.
git clone https://github.com/jihadkhawaja/Egroo.git
cd EgrooCreate a local PostgreSQL database and then update src/Egroo.Server/appsettings.Development.json.
Example:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=5432;User Id=egroo_dev_user;Password=dev_password;Database=egroo_dev;"
},
"Secrets": {
"Jwt": "development-jwt-secret-at-least-32-characters"
},
"Encryption": {
"Key": "12345678901234567890123456789012",
"IV": "1234567890123456"
}
}From the repository root:
dotnet build src/Egroo.slnx --configuration DebugTerminal 1:
dotnet watch --project src/Egroo.Server/Egroo.Server.csprojTerminal 2:
dotnet watch --project src/Egroo/Egroo/Egroo.csprojRuntime defaults:
- API:
http://localhost:5175 - Web app:
http://localhost:5068 - Swagger:
http://localhost:5175/swagger
The UI already targets http://localhost:5175/ in debug builds through src/Egroo.UI/Constants/Source.cs.
Run the server tests:
dotnet test src/Egroo.Server.Test/Egroo.Server.Test.csproj --verbosity normalThe test project uses an in-memory EF Core setup, so it does not require a live PostgreSQL instance for normal test runs.
Migrations target src/Egroo.Server.
Common scripts:
.\scripts\add-migration.ps1 "MigrationName"
.\scripts\update-database.ps1Important detail:
- normal local startup already runs
db.Database.MigrateAsync()automatically - use migration scripts when you intentionally change the data model
Open src/Egroo.slnx and run both startup projects:
Egroo.ServerEgroo
The workspace already includes build and test tasks for:
- building the full solution
- building the API
- building the Blazor host
- running the server tests
If you mainly work in VS Code, those tasks are the easiest way to keep the standard commands consistent.
- database access lives in repositories in
src/Egroo.Server/Repository - minimal API endpoints live under
src/Egroo.Server/API - the SignalR hub is mapped at
/chathub - CORS is opened in debug builds
- message payloads can be encrypted per recipient and decrypted on the receiving device
- server-side
Encryption:KeyandEncryption:IVare still required for protected server records and encrypted transport workflows -
IConnectionTrackeris in-memory by default, so local development is effectively single-node
- user profiles can publish
EncryptionPublicKeyandEncryptionKeyId - device private keys stay in client storage and are not stored in PostgreSQL
- clearing browser storage or using a different device can put the client out of sync until the encryption key is regenerated
- if you change persisted encryption fields or mappings, add a migration and update the docs in the same change
- Pull latest changes.
- Build the solution.
- Start API and web host with
dotnet watch. - Run tests for the area you changed.
- Update docs when behavior or setup changes.