WikiGraph has two local entry points:
- Backend API:
WikiGraph.Api - Frontend client:
WikiGraph.Client
dotnet run --project WikiGraph.Api/WikiGraph.Api.csprojdotnet run --project WikiGraph.Client/WikiGraph.Client.csprojOpen http://localhost:5052 for the hosted API reference.
Open http://localhost:5024 for the WikiGraph client.
- API:
http://localhost:5052 - Client:
http://localhost:5024
- Hosted API reference UI:
http://localhost:5052/docs/v1 - Runtime document:
http://localhost:5052/openapi/v1.json - Build-time document:
dotnet build WikiGraph.Api/WikiGraph.Api.csproj - Generated file output:
WikiGraph.Api/openapi/WikiGraph.Api.json
The API uses Gemini for Wikipedia lookup planning, embeddings, and user-facing replies only when GEMINI_API_KEY is configured.
export GEMINI_API_KEY="your-api-key"
dotnet run --project WikiGraph.Api/WikiGraph.Api.csprojYou can also put GEMINI_API_KEY=your-api-key in a local .env file at the repo root or API project path.
If GEMINI_API_KEY is not set, the backend still runs with deterministic local fallback responses and keyword retrieval. The API logs will say when fallback behavior is being used.
- The backend stores data in SQLite.
- Opening the backend root redirects to the hosted API reference at
/docs/v1. - The Blazor client runs separately and calls the API at
http://localhost:5052/. - If you change local environment values, restart the backend.
run.sh will run the testing first and then run everything else.
To use run.sh Set the file permission
chmod +x run.shThen you can use this command.
./run.shRun tests:
dotnet test WikiGraph.Tests/WikiGraph.Tests.csprojThis repo includes an automated C# to PlantUML workflow for generating class diagrams across the codebase.
Generate UML text files and SVG renders:
./scripts/generate-uml.shGenerate UML text files to a custom output folder:
./scripts/generate-uml.sh ./uml-outputEnable PNG image rendering (disabled by default):
./scripts/generate-uml.sh --pngOutput:
- Main diagram entry file:
uml/include.puml - Per-file diagrams grouped by namespace/project under
uml/ - One SVG image per
.pumlfile - Optional PNG image per
.pumlfile when--pngis used
Override PNG DPI when PNG export is enabled:
UML_PNG_DPI=600 ./scripts/generate-uml.sh --pngHow it works:
- Uses the local .NET tool
PlantUmlClassDiagramGenerator(puml-gen) - Scans C# source and emits PlantUML (
.puml) files - Adds inheritance and association links automatically
- Excludes generated/build folders like
binandobj
Dependencies:
- .NET SDK 10.x
- Local .NET tools restored from
dotnet-tools.json - PlantUML CLI
- Graphviz (
dot)
Install/restore UML generator dependency:
dotnet tool restoreImage rendering runtime requirements:
- Java Runtime (OpenJDK 17+)
Ubuntu/Debian install example:
sudo apt update
sudo apt install -y openjdk-17-jre plantuml graphvizOptional VS Code extensions:
pierre3.csharp-to-plantumlfor direct C# to PlantUML supportjebbs.plantumlto preview and render.pumldiagrams
If a PlantUML renderer is configured, open uml/include.puml to visualize the full model graph.