A full-stack Discord bot management platform with:
- ASP.NET Core backend API (bot lifecycle, auth, logging, plugins)
- Discord runtime services and plugin-based command system
- Angular frontend admin dashboard
- SQL Server / LocalDB persistence via Entity Framework Core
BotManager.sln- main solutionBotManager.Backend.API- ASP.NET Core API host (entry point inProgram.cs)BotManager.Backend.Bots- Discord runtime and bot servicesBotManager.Backend.Bots.Tests- backend bot runtime testsBotManager.Backend.Services- business servicesBotManager.Backend.Entities- EF Core entities and migrationsBotManager.Backend.Shared- shared models/servicesBotManager.Frontend- Angular 19 admin UI
- .NET 10
- ASP.NET Core Web API + SignalR
- Entity Framework Core (SQL Server)
- Serilog (+ SQL sink)
- Discord.Net runtime integration
- Angular 19
- .NET SDK 10.x
- Node.js 20+ and npm
- SQL Server LocalDB or SQL Server instance
- (Optional) Visual Studio 2022 / VS Code
git clone <your-repo-url>
cd discord-bot-aliance
dotnet restore BotManager.slncd BotManager.Frontend
npm install
cd ..Do not keep real credentials in tracked files. Use one of these approaches:
dotnet user-secretsfor local development- environment variables in your shell/CI/CD
- untracked local override files
Minimum required settings for backend:
ConnectionStrings:DefaultConnectionJwtSettings:SecretJwtSettings:IssuerJwtSettings:AudienceAdminCredentials:EmailAdminCredentials:PasswordGoogleAuth:ClientIdGoogleAuth:ClientSecret
Example (recommended): use .NET User Secrets for local readable storage.
dotnet user-secrets --project BotManager.Backend.API/BotManager.Backend.API.csproj set "JwtSettings:Secret" "<your-strong-jwt-secret>"
dotnet user-secrets --project BotManager.Backend.API/BotManager.Backend.API.csproj set "AdminCredentials:Email" "admin@example.com"
dotnet user-secrets --project BotManager.Backend.API/BotManager.Backend.API.csproj set "AdminCredentials:Password" "<admin-password>"
dotnet user-secrets --project BotManager.Backend.API/BotManager.Backend.API.csproj set "GoogleAuth:ClientId" "<google-client-id>"
dotnet user-secrets --project BotManager.Backend.API/BotManager.Backend.API.csproj set "GoogleAuth:ClientSecret" "<google-client-secret>"To view what is saved locally:
dotnet user-secrets --project BotManager.Backend.API/BotManager.Backend.API.csproj listWindows local file location for these secrets:
%APPDATA%\\Microsoft\\UserSecrets\\botmanager-backend-api-9b2f9a0a-5e8c-4e18-a4b6-2e8d83f0bbd2\\secrets.json
Second computer setup:
- copy the values securely (not via public/shared channels)
- run the same
dotnet user-secrets ... set ...commands on the second machine - or copy
%APPDATA%\\Microsoft\\UserSecrets\\botmanager-backend-api-9b2f9a0a-5e8c-4e18-a4b6-2e8d83f0bbd2\\secrets.jsonto the same path on the second machine (secure transfer only) - avoid copying tracked
appsettings.jsonwith real values
dotnet run --project BotManager.Backend.API/BotManager.Backend.API.csprojDefault local URLs (from launch settings):
https://localhost:7165http://localhost:5165
In a separate terminal:
cd BotManager.Frontend
npm startFrontend runs at http://localhost:4200 and proxies /api + /hubs to backend (https://localhost:7165).
dotnet build BotManager.slndotnet test BotManager.Backend.Bots.Tests/BotManager.Backend.Bots.Tests.csprojcd BotManager.Frontend
npm test- Bot command model uses plugin architecture (
discord-boardplugin). - API startup applies EF migrations automatically.
- SignalR hub endpoint:
/hubs/bot-events. - Repository runtime is based on direct project commands (
dotnet runandnpm start), not a Procfile.
For deeper runtime internals, see:
DEVELOPER_RUNTIME_FLOWS.mdPROGRAM_CS_DOCUMENTATION.md