Tech stack stub page and changing project to be just one Web Assembly project for now

This commit is contained in:
2026-05-27 11:25:04 -04:00
parent 8a20cfec4f
commit dd74f9b69f
140 changed files with 64156 additions and 97 deletions
+25 -69
View File
@@ -55,42 +55,10 @@
"id": "8324f61f4bd3709f",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Collect Data.md",
"mode": "source",
"source": false
},
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "Collect Data"
}
},
{
"id": "212687daeb7a3b1c",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Victory Condition Information.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "Victory Condition Information"
}
},
{
"id": "10a698c52bc38412",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Data/Terrain Data.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "Terrain Data"
"title": "New tab"
}
},
{
@@ -99,30 +67,16 @@
"state": {
"type": "markdown",
"state": {
"file": "Data/Governor Data.md",
"file": "Prompts/Tech-Stack Prompt.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "Governor Data"
}
},
{
"id": "bde038e94c9b3eae",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "agent.md.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "agent.md"
"title": "Tech-Stack Prompt"
}
}
],
"currentTab": 7
"currentTab": 4
}
],
"direction": "vertical"
@@ -294,41 +248,43 @@
"bases:Create new base": false
}
},
"active": "bde038e94c9b3eae",
"active": "29a82e720e0c7539",
"lastOpenFiles": [
"_Tasks Kanban.base",
"Data/Common Building Data.md",
"Prompts/Tech-Stack Prompt.md",
"Data/Building Stats Reference.md",
"agent.md.md",
"Game Notes/Province.md",
"Data/Terrain Data.md",
"Data/Resource Node Data.md",
"Data/Magic Material Data.md",
"Data/Governor Data.md",
"Game Notes/Throne City.md",
"Game Notes/Rush Gold Cost.md",
"Game Notes/Resources.md",
"Game Notes/Province.md",
"Game Notes/Forge.md",
"_Tasks Kanban.base",
"Risks.md",
"Prompts/Document Raw Data and Turn it into Class Data.md",
"Prompts/AI Gen Documents/blazor.md",
"Prompts/AI Gen Documents",
"Tasks/Collect Data.md",
"_Plan.canvas",
"agent.md.md",
"Prompts/Test Automation.md",
"Pages/Tome Calculator.md",
"Pages/Victory Condition Information.md",
"Tasks/Write Spec for some Priority Calculator System.md",
"Pages/Unit Data Tables.md",
"Game Notes/Throne City.md",
"Tasks/Stub out the Home Page.md",
"Pages/Spell Data Tables.md",
"Game Notes/Rush Gold Cost.md",
"Tasks/Setup Test Database.md",
"Project/Stack/Server App.md",
"Data/Resource Node Data.md",
"Pages/Reference Pages.md",
"Tasks/Play Architect culture and find out what Monuments are.md",
"Tasks/Plan Basic Pages.md",
"Project/Stack/Mobile App.md",
"Overview.md",
"Game Notes/Forge.md",
"Tasks/Load Game Data Into Build Calculator.md",
"Pages/Learning Pages.md",
"Prompts",
"Pages",
"Project/Stack",
"Project",
"Game Notes",
"Tasks",
"Data",
"_Plan.canvas"
"Data"
]
}
+6
View File
@@ -1,5 +1,7 @@
These are the general variable stats that will exist on a building. More to come as calculator considers more data cases.
# Schema
# String
- Name required
@@ -32,3 +34,7 @@ These are the general variable stats that will exist on a building. More to come
- BoostGoldMine: 0
- BoostConduit: 0
---
# Raw Data
+78
View File
@@ -0,0 +1,78 @@
# Blazor Project Configuration
This document explains the hosting model used in this project, how to identify it, and how to switch between different Blazor setups.
## Current Project Type: Blazor Web App (.NET 8+)
This project uses the **Blazor Web App** template introduced in .NET 8. This is a unified model that supports multiple rendering modes:
- **Static Server-Side Rendering (Static SSR)**: The default mode for most components in this project.
- **Interactive WebAssembly**: Currently configured as the interactive hosting model.
### 1. How to tell it's using WebAssembly
You can identify the hosting model by looking at the following locations:
- **`AOW4/Program.cs`**:
- `builder.Services.AddRazorComponents().AddInteractiveWebAssemblyComponents();` registers the WebAssembly services.
- `app.MapRazorComponents<App>().AddInteractiveWebAssemblyRenderMode()` enables the WebAssembly rendering mode.
- **Project Structure**:
- **`AOW4` (Server Project)**: Handles the initial request and serves the static assets.
- **`AOW4.Client` (Client Project)**: Contains components and logic intended to run in the user's browser via WebAssembly.
- **Project References (`AOW4.csproj`)**:
- The server project references the client project: `<ProjectReference Include="..\AOW4.Client\AOW4.Client.csproj" />`.
- It also includes the package `Microsoft.AspNetCore.Components.WebAssembly.Server`.
## 2. Switching Between Setups
### Switching to Blazor Server (Interactive Server)
If you want components to run on the server via SignalR instead of WebAssembly:
1. **Update `Program.cs` in the Server project**:
```csharp
// Add service registration
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents(); // Add this line
// Enable render mode
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode(); // Add this line
```
2. **On your Components**:
Change the render mode attribute at the top of your `.razor` files:
```razor
@rendermode InteractiveServer
```
### Using Interactive Auto
Auto mode uses Blazor Server while the WebAssembly bundle is downloading, then switches to WebAssembly on subsequent visits.
1. **Update `Program.cs`**:
Ensure both `AddInteractiveServerComponents()` and `AddInteractiveWebAssemblyComponents()` are registered, and both render modes are added to `MapRazorComponents<App>()`.
2. **On your Components**:
```razor
@rendermode InteractiveAuto
```
### Switching to ONLY Blazor Server
To remove WebAssembly entirely:
1. Remove the `AOW4.Client` project reference from `AOW4.csproj`.
2. Remove all "WebAssembly" related calls in `Program.cs`.
3. Delete the `AOW4.Client` project.
4. Ensure all components are moved to the `AOW4` (Server) project.
## 3. Production Release for Blazor WebAssembly
Since this is a **hosted** Blazor Web App, you publish the **Server project**. The build process automatically handles the WebAssembly client assets.
### Command
Run this command from the solution root:
```powershell
dotnet publish AOW4\AOW4.csproj -c Release
```
### What happens during publish:
1. **Server Compilation**: The ASP.NET Core host project is compiled.
2. **Client Compilation**: The `AOW4.Client` project is compiled into WebAssembly (`.wasm`) and static assets.
3. **Asset Integration**: All client-side files (WASM, JS, CSS, images) are placed in the `wwwroot` folder of the published server output.
4. **Output Directory**: The final ready-to-deploy application will be in `AOW4\bin\Release\net10.0\publish\`.
To deploy, simply copy the contents of the `publish` folder to your web server (IIS, Azure App Service, Nginx, etc.).
+18
View File
@@ -0,0 +1,18 @@
---
type: Prompt
---
Create a new page called Tech Stack with the href of `/tech-stack`.
Populate it with information from TechStackData.cs.
Name, Description should be visible.
If InUse is false, make the section of information greyed out and faded to indicate a lack of implementation.
If you hover over the information, it should that it's interactive and clickable.
Create a new dialog in the Components/Dialog folder to display the tech stack information.
This dialog with display the Name and Description, but also the expected notes. The user should be able to quit out of the dialog with a close button, or close it by clicking the outside area around the dialog.
Your logic should use the DialogService.cs for opening and closing the dialog.