How rflowers45/stockinvestinggame works
Project type and purpose
• This is a monolithic full-stack web application built with ASP.NET Core Razor Pages.
• Purpose: a stock investment game that simulates buying/selling stocks based on historical totals (CS3750 assignment).
File structure
• Top level:
• StockInvestingGame.sln – .NET solution file
• StockInvestingGame/ – main web application
• Inside StockInvestingGame/:
• Pages/ – Razor Pages views and their C# handlers (.cshtml + .cshtml.cs)
• Program.cs – entry point, middleware, routing, DI setup
• appsettings.json + appsettings.Development.json – configuration
• wwwroot/ – static assets (css, js, images, Bootstrap, jQuery, validation libs)
• StockInvestingGame.csproj – project definition
• No database migrations or Data/ folder; likely in-memory or external API for stock data.
README
• Confirms the game simulates stock market investing by looking at prior totals.
• No explicit mention of a persistent database—assume business logic lives in StockData.cs or calls an external stock API.
Main components
a. User’s Web Browser (Client)
b. ASP.NET Core Web Server (Kestrel/IIS)
• Program.cs / Startup: config + middleware
• Razor Pages UI layer (Pages/*.cshtml)
• Business Logic layer (StockData.cs + page handler code-behind)
• Configuration (appsettings.json)
c. Static File Server (wwwroot)
• CSS (site.css, Bootstrap)
• JS (site.js, jQuery, validation)
d. External Stock Data API or Service (if applicable)
e. (Optional) Database or In-Memory Store for persistency
Relationships & interactions
• Client ↔ Web Server over HTTP/HTTPS
• Razor Pages render dynamic HTML by combining cshtml templates + handler logic
• Business Logic may call:
• External stock data API (REST)
• In-memory or DB store for user portfolios
• Static File Server serves JS/CSS libraries to the client
Architectural patterns & design principles
• MVVM‐style Razor Pages (UI separated from handler logic)
• Dependency Injection configured in Program.cs
• Single-tier monolith (no microservices)
• Clear separation of concerns:
• Presentation layer (Pages + static assets)
• Business logic layer (StockData.cs, handlers)
• Configuration & hosting layer (Program.cs, appsettings)