How fpindej/netrock works
NETrock is a full-stack .NET API and SvelteKit application foundation. A user makes requests through the frontend API client and CSRF-aware BFF proxy to the backend API; authentication and authorization then govern access to account and administrative capabilities. The README also documents OAuth, TOTP, email, audit, jobs, and file storage. The graph uses documented capabilities and sampled call sites; several subsystem connections are not directly evidenced by the excerpts and are left unwired.
Main entry points: MyProjectDbContext.cs PostgreSQL data · AuthenticationService.cs Authentication service · AdminController.cs Admin endpoints · AuthController.cs Auth endpoints
Components 23
Web client
- SvelteKit app
src/frontend/src/hooks.server.ts - API client
src/frontend/src/lib/api/client.ts - BFF proxy
src/frontend/src/routes/api/[...path]/+server.ts
API surface
- Auth endpoints
src/backend/MyProject.WebApi/Features/Authentication/AuthController.cs - Two-factor endpoints
src/backend/MyProject.WebApi/Features/Authentication/TwoFactorController.cs - User endpoints
src/backend/MyProject.WebApi/Features/Users/UsersController.cs - Admin endpoints
src/backend/MyProject.WebApi/Features/Admin/AdminController.cs
Identity and access
- Authentication service
src/backend/MyProject.Infrastructure/Features/Authentication/Services/AuthenticationService.cs - External auth
src/backend/MyProject.Infrastructure/Features/Authentication/Services/ExternalAuthService.cs - TOTP service
src/backend/MyProject.Infrastructure/Features/Authentication/Services/TwoFactorService.cs - Admin service
src/backend/MyProject.Infrastructure/Features/Admin/Services/AdminService.cs - Role management
src/backend/MyProject.Infrastructure/Features/Admin/Services/RoleManagementService.cs - Permission authorization
src/backend/MyProject.WebApi/Authorization/PermissionAuthorizationHandler.cs - User service
src/backend/MyProject.Infrastructure/Identity/Services/UserService.cs
Operations
- Audit service
src/backend/MyProject.Infrastructure/Features/Audit/Services/AuditService.cs - Email delivery
src/backend/MyProject.Infrastructure/Features/Email/Services/BackgroundEmailService.cs - Background jobs
src/backend/MyProject.Infrastructure/Features/Jobs/Services/JobManagementService.cs - Image processing
src/backend/MyProject.Infrastructure/Features/Avatar/Services/ImageProcessingService.cs - S3 file storage
src/backend/MyProject.Infrastructure/Features/FileStorage/Services/S3FileStorageService.cs
Persistence
- PostgreSQL data
src/backend/MyProject.Infrastructure/Persistence/MyProjectDbContext.cs
Other components
- User
- S3-compatible store
- OAuth providers
Connections 23
- User → SvelteKit app: uses
- SvelteKit app → API client: requests
- API client → BFF proxy: sends API calls
- BFF proxy → Auth endpoints: proxies requests
- Auth endpoints → Authentication service: invokes
- Two-factor endpoints → Authentication service: completes login
- Two-factor endpoints → TOTP service: manages TOTP
- Auth endpoints → External auth: handles external auth
- External auth → OAuth providers: redirects for identity
- Authentication service → PostgreSQL data: reads and writes
- Authentication service → Audit service: logs events
- User endpoints → User service: invokes
- User endpoints → Audit service: reads user events
- User service → Image processing: processes images
- User service → S3 file storage: stores avatar files
- S3 file storage → S3-compatible store: reads and writes objects
- Admin endpoints → Admin service: manages users
- Admin endpoints → Role management: manages roles
- Admin endpoints → Permission authorization: requires permissions
- Admin service → PostgreSQL data: reads and writes
- Role management → PostgreSQL data: reads and writes
- Audit service → PostgreSQL data: stores events
- Background jobs → PostgreSQL data: manages job state