How 14net-fiap/fiap.cloudgames works
FIAP.CloudGames is a cloud-games API for managing users and authentication, games, promotions, and personal game libraries. Its principal workflow is a client request entering a controller, being handled by an application service, and using repositories to read or change domain data. LibraryService’s excerpt confirms user/game checks, promotion-based price calculation, and library writes; repository excerpts show SQL Server-backed persistence. Other API and service capabilities are represented from the file tree and SOURCE INDEX, but their internal calls were not sampled, so those links are left unverified.
Main entry points: AppDbContext.cs EF Core context · LibraryService.cs Library management · UserRepository.cs User repository · AuthService.cs Authentication
Components 27
HTTP API
- Authentication API
FIAP.CloudGames/Controllers/AuthController.cs - Games API
FIAP.CloudGames/Controllers/GamesController.cs - Library API
FIAP.CloudGames/Controllers/LibraryController.cs - Promotions API
FIAP.CloudGames/Controllers/PromotionsController.cs - Users API
FIAP.CloudGames/Controllers/UsersController.cs - Health check
FIAP.CloudGames/Controllers/HealthCheckController.cs
Application Services
- Authentication
FIAP.CloudGames.Application/Services/AuthService.cs - Game management
FIAP.CloudGames.Application/Services/GamesService.cs - Library management
FIAP.CloudGames.Application/Services/LibraryService.cs - Promotion management
FIAP.CloudGames.Application/Services/PromotionService.cs - User management
FIAP.CloudGames.Application/Services/UsersService.cs
Domain Model
- User model
FIAP.CloudGames.Domain/Entities/User.cs - Game model
FIAP.CloudGames.Domain/Entities/Game.cs - Promotion model
FIAP.CloudGames.Domain/Entities/Promotion.cs - Library item
FIAP.CloudGames.Domain/Entities/UserLibrary.cs - Repository contracts
FIAP.CloudGames.Domain/Repositories - Operation results
FIAP.CloudGames.Domain/Services/Result.cs
SQL Persistence
- User repository
FIAP.CloudGames.DataBase/Repositories/UserRepository.cs - Game repository
FIAP.CloudGames.DataBase/Repositories/GameRepository.cs - Promotion repository
FIAP.CloudGames.DataBase/Repositories/PromotionRepository.cs - Library repository
FIAP.CloudGames.DataBase/Repositories/ILibraryRepository.cs - EF Core context
FIAP.CloudGames.DataBase/Context/AppDbContext.cs
Infrastructure
- JWT security
FIAP.CloudGames.Infra/Security/SecurityHelper.cs - Mongo logging
FIAP.CloudGames.Infra/Logging/MongoLogWriterService.cs
Other components
- API client
- SQL Server
- MongoDB
Connections 31
- API client → Authentication API: sends request
- API client → Games API: sends request
- API client → Library API: sends request
- API client → Promotions API: sends request
- API client → Users API: sends request
- API client → Health check: sends request
- Authentication API → Authentication: dispatches to
- Games API → Game management: dispatches to
- Library API → Library management: dispatches to
- Promotions API → Promotion management: dispatches to
- Users API → User management: dispatches to
- Authentication → User repository: finds login
FIAP.CloudGames.Application/Services/AuthService.cs - Authentication → JWT security: hashes and signs
FIAP.CloudGames.Application/Services/AuthService.cs - Library management → User repository: checks user
FIAP.CloudGames.Application/Services/LibraryService.cs - Library management → Game repository: checks game
FIAP.CloudGames.Application/Services/LibraryService.cs - Library management → Promotion repository: gets promotions
FIAP.CloudGames.Application/Services/LibraryService.cs - Library management → Library repository: reads and writes
FIAP.CloudGames.Application/Services/LibraryService.cs - Library management → Game model: calculates price
FIAP.CloudGames.Application/Services/LibraryService.cs - Library management → Library item: creates item
FIAP.CloudGames.Application/Services/LibraryService.cs - User management → User repository: uses contract
- Game management → Game repository: uses contract
- Promotion management → Promotion repository: uses contract
- User repository → EF Core context: queries data
FIAP.CloudGames.DataBase/Repositories/UserRepository.cs - Game repository → EF Core context: queries data
FIAP.CloudGames.DataBase/Repositories/GameRepository.cs - Promotion repository → EF Core context: queries data
FIAP.CloudGames.DataBase/Repositories/PromotionRepository.cs - EF Core context → User model: maps entity
FIAP.CloudGames.DataBase/Context/AppDbContext.cs - EF Core context → Game model: maps entity
FIAP.CloudGames.DataBase/Context/AppDbContext.cs - EF Core context → Promotion model: maps entity
FIAP.CloudGames.DataBase/Context/AppDbContext.cs - EF Core context → Library item: maps entity
FIAP.CloudGames.DataBase/Context/AppDbContext.cs - EF Core context → SQL Server: persists data
- Mongo logging → MongoDB: writes logs