How szischerkibs/cogs-api works
CodeMash Cogs is an ASP.NET API for user, application, and authentication operations. The visible login workflow accepts credentials, checks them through the authentication repository, then loads the user and returns a JWT with user details; user and application controllers expose separate API workflows. Repositories execute stored procedures through shared SQL access, while Startup wires services. The README gives little product detail, and several controller and configuration files were not excerpted, so only evidenced links are shown.
Main entry points: AuthController.cs Authentication API · BaseSqlRepository.cs SQL access · Startup.cs Service wiring · UserRepository.cs User repository
Components 13
API workflows
- Authentication API
cogs-api/Controllers/AuthController.cs - User API
cogs-api/Controllers/UsersController.cs - Application API
cogs-api/Controllers/ApplicationController.cs
Persistence
- User repository
cogs-api/Repositories/UserRepository.cs - Auth repository
cogs-api/Repositories/AuthRepository.cs - Application repository
cogs-api/Repositories/ApplicationRepository.cs - SQL access
cogs-api/Repositories/BaseSqlRepository.cs - Cogs database
cogs-api/Scripts
Domain and wiring
- Repository contracts
cogs-api/Interfaces - API DTOs
cogs-api/Dtos - Domain models
cogs-api/Models - Service wiring
cogs-api/Startup.cs
Other components
- API client
Connections 14
- API client → Authentication API: submits login
cogs-api/Controllers/AuthController.cs - Authentication API → Auth repository: checks credentials
cogs-api/Controllers/AuthController.cs - Authentication API → User repository: loads user
cogs-api/Controllers/AuthController.cs - User API → Repository contracts: uses user contract
cogs-api/Controllers/UsersController.cs - Application API → Repository contracts: uses application contract
cogs-api/Controllers/ApplicationController.cs - Auth repository → SQL access: executes queries
cogs-api/Repositories/AuthRepository.cs - User repository → SQL access: executes queries
cogs-api/Repositories/UserRepository.cs - Application repository → SQL access: executes queries
cogs-api/Repositories/ApplicationRepository.cs - SQL access → Cogs database: runs SQL commands
cogs-api/Repositories/BaseSqlRepository.cs - Service wiring → Auth repository: registers service
cogs-api/Startup.cs - Service wiring → User repository: registers service
cogs-api/Startup.cs - Service wiring → Application repository: registers service
cogs-api/Startup.cs - Repository contracts → Domain models: exposes models
cogs-api/Interfaces/IUserRepository.cs - Authentication API → API DTOs: accepts and returns
cogs-api/Controllers/AuthController.cs