diff --git a/.gitignore b/.gitignore
index 3c029b6..6a6d8a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -210,6 +210,7 @@ project.lock.json
*.feature.xlsx.*
*.Specs_*.html
+RP1AnalyticsWebApp/wwwroot/*
RP1AnalyticsWebApp/appsettings.Development.json
RP1AnalyticsWebApp/appsettings.json
*.pubxml
diff --git a/README.md b/README.md
index fa011f0..2c02c0b 100644
--- a/README.md
+++ b/README.md
@@ -2,14 +2,17 @@
Receives career progress information from the game and shows various useful visualizations for comparing careers and balancing RP-1.
## Technology stack
-* .NET 5
-* ASP.NET Core 5 (Razor pages + web API)
-* Vue.js
+* .NET 6
+* ASP.NET Core 6 (Razor pages + web API)
+* Vue.js 3
* MongoDB
+* Microsoft.AspNetCore.OData
* Application Insights
* AspNetCore.Identity.Mongo
* AspNet.Security.OAuth.GitHub
* Swagger / OpenAPI
+* Vite.AspNetCore
+* Node.js 20
## Install
### Production
@@ -24,7 +27,7 @@ I.e:
```
### Development
-Add appsettings.json to \RP1AnalyticsWebApp\ and hit F5 in VS.
+Add appsettings.json to \RP1AnalyticsWebApp\ and hit F5 in VS. Npm install will be run automatically and vite dev server will start on first request.
Example settings file:
```
{
diff --git a/RP1AnalyticsWebApp/.eslintrc.cjs b/RP1AnalyticsWebApp/.eslintrc.cjs
new file mode 100644
index 0000000..7e079b8
--- /dev/null
+++ b/RP1AnalyticsWebApp/.eslintrc.cjs
@@ -0,0 +1,15 @@
+/* eslint-env node */
+require('@rushstack/eslint-patch/modern-module-resolution')
+
+module.exports = {
+ root: true,
+ 'extends': [
+ 'plugin:vue/vue3-essential',
+ 'eslint:recommended',
+ '@vue/eslint-config-typescript',
+ '@vue/eslint-config-prettier/skip-formatting'
+ ],
+ parserOptions: {
+ ecmaVersion: 'latest'
+ }
+}
diff --git a/RP1AnalyticsWebApp/Areas/Admin/Pages/Races.cshtml b/RP1AnalyticsWebApp/Areas/Admin/Pages/Races.cshtml
index e827398..e405de8 100644
--- a/RP1AnalyticsWebApp/Areas/Admin/Pages/Races.cshtml
+++ b/RP1AnalyticsWebApp/Areas/Admin/Pages/Races.cshtml
@@ -4,20 +4,11 @@
ViewData["Title"] = "Race management";
}
-
-
Careers
-
-
+
+@section Styles {
+
+}
@section Scripts {
-
-
-
-}
\ No newline at end of file
+
+}
diff --git a/RP1AnalyticsWebApp/Areas/Admin/Pages/_ViewImports.cshtml b/RP1AnalyticsWebApp/Areas/Admin/Pages/_ViewImports.cshtml
index a6a0d87..785ef8f 100644
--- a/RP1AnalyticsWebApp/Areas/Admin/Pages/_ViewImports.cshtml
+++ b/RP1AnalyticsWebApp/Areas/Admin/Pages/_ViewImports.cshtml
@@ -3,3 +3,4 @@
@using RP1AnalyticsWebApp.Areas.Admin
@using RP1AnalyticsWebApp.Areas.Admin.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
+@addTagHelper *, Vite.AspNetCore
diff --git a/RP1AnalyticsWebApp/contractData.json b/RP1AnalyticsWebApp/Configs/contractData.json
similarity index 100%
rename from RP1AnalyticsWebApp/contractData.json
rename to RP1AnalyticsWebApp/Configs/contractData.json
diff --git a/RP1AnalyticsWebApp/leaders.json b/RP1AnalyticsWebApp/Configs/leaders.json
similarity index 100%
rename from RP1AnalyticsWebApp/leaders.json
rename to RP1AnalyticsWebApp/Configs/leaders.json
diff --git a/RP1AnalyticsWebApp/milestoneContracts.json b/RP1AnalyticsWebApp/Configs/milestoneContracts.json
similarity index 100%
rename from RP1AnalyticsWebApp/milestoneContracts.json
rename to RP1AnalyticsWebApp/Configs/milestoneContracts.json
diff --git a/RP1AnalyticsWebApp/programs.json b/RP1AnalyticsWebApp/Configs/programs.json
similarity index 100%
rename from RP1AnalyticsWebApp/programs.json
rename to RP1AnalyticsWebApp/Configs/programs.json
diff --git a/RP1AnalyticsWebApp/repeatableContracts.json b/RP1AnalyticsWebApp/Configs/repeatableContracts.json
similarity index 100%
rename from RP1AnalyticsWebApp/repeatableContracts.json
rename to RP1AnalyticsWebApp/Configs/repeatableContracts.json
diff --git a/RP1AnalyticsWebApp/techTree.json b/RP1AnalyticsWebApp/Configs/techTree.json
similarity index 100%
rename from RP1AnalyticsWebApp/techTree.json
rename to RP1AnalyticsWebApp/Configs/techTree.json
diff --git a/RP1AnalyticsWebApp/Models/Settings/ContractSettings.cs b/RP1AnalyticsWebApp/Models/Settings/ContractSettings.cs
index c7d1f9a..72f553d 100644
--- a/RP1AnalyticsWebApp/Models/Settings/ContractSettings.cs
+++ b/RP1AnalyticsWebApp/Models/Settings/ContractSettings.cs
@@ -13,17 +13,17 @@ public class ContractSettings : IContractSettings
public ContractSettings()
{
- const string _fileName = @"contractData.json";
+ const string _fileName = @"Configs/contractData.json";
string jsonString = File.ReadAllText(_fileName);
var arr = JsonSerializer.Deserialize(jsonString);
ContractNameDict = arr.ToDictionary(e => e.Name, e => e.Title);
- const string _milestoneFileName = @"milestoneContracts.json";
+ const string _milestoneFileName = @"Configs/milestoneContracts.json";
jsonString = File.ReadAllText(_milestoneFileName);
var arr2 = JsonSerializer.Deserialize(jsonString);
MilestoneContractNames = new HashSet(arr2);
- const string _repeatableFileName = @"repeatableContracts.json";
+ const string _repeatableFileName = @"Configs/repeatableContracts.json";
jsonString = File.ReadAllText(_repeatableFileName);
var arr3 = JsonSerializer.Deserialize(jsonString);
RepeatableContractNames = new HashSet(arr3);
diff --git a/RP1AnalyticsWebApp/Models/Settings/LeaderSettings.cs b/RP1AnalyticsWebApp/Models/Settings/LeaderSettings.cs
index d8f2c0c..e2961aa 100644
--- a/RP1AnalyticsWebApp/Models/Settings/LeaderSettings.cs
+++ b/RP1AnalyticsWebApp/Models/Settings/LeaderSettings.cs
@@ -11,7 +11,7 @@ public class LeaderSettings : ILeaderSettings
public LeaderSettings()
{
- const string _fileName = @"leaders.json";
+ const string _fileName = @"Configs/leaders.json";
string jsonString = File.ReadAllText(_fileName);
var arr = JsonSerializer.Deserialize(jsonString);
LeaderDict = arr.ToDictionary(e => e.Name);
diff --git a/RP1AnalyticsWebApp/Models/Settings/ProgramSettings.cs b/RP1AnalyticsWebApp/Models/Settings/ProgramSettings.cs
index c0ec4ed..b2f62b3 100644
--- a/RP1AnalyticsWebApp/Models/Settings/ProgramSettings.cs
+++ b/RP1AnalyticsWebApp/Models/Settings/ProgramSettings.cs
@@ -11,7 +11,7 @@ public class ProgramSettings : IProgramSettings
public ProgramSettings()
{
- const string _fileName = @"programs.json";
+ const string _fileName = @"Configs/programs.json";
string jsonString = File.ReadAllText(_fileName);
var arr = JsonSerializer.Deserialize(jsonString);
ProgramNameDict = arr.ToDictionary(e => e.Name, e => e.Title);
diff --git a/RP1AnalyticsWebApp/Models/Settings/TechTreeSettings.cs b/RP1AnalyticsWebApp/Models/Settings/TechTreeSettings.cs
index 9db2f3e..77ef15c 100644
--- a/RP1AnalyticsWebApp/Models/Settings/TechTreeSettings.cs
+++ b/RP1AnalyticsWebApp/Models/Settings/TechTreeSettings.cs
@@ -11,7 +11,7 @@ public class TechTreeSettings : ITechTreeSettings
public TechTreeSettings()
{
- const string _fileName = @"techTree.json";
+ const string _fileName = @"Configs/techTree.json";
string jsonString = File.ReadAllText(_fileName);
var arr = JsonSerializer.Deserialize(jsonString);
NodeTitleDict = arr.ToDictionary(e => e.ID, e => e.Title);
diff --git a/RP1AnalyticsWebApp/Pages/Index.cshtml b/RP1AnalyticsWebApp/Pages/Index.cshtml
index 1799d01..42fd405 100644
--- a/RP1AnalyticsWebApp/Pages/Index.cshtml
+++ b/RP1AnalyticsWebApp/Pages/Index.cshtml
@@ -5,65 +5,11 @@
ViewData["Title"] = "RP-1 Analytics";
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+@section Styles {
+
+}
@section Scripts {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
\ No newline at end of file
+
+}
diff --git a/RP1AnalyticsWebApp/Pages/Records.cshtml b/RP1AnalyticsWebApp/Pages/Records.cshtml
index 5a814b3..13594b6 100644
--- a/RP1AnalyticsWebApp/Pages/Records.cshtml
+++ b/RP1AnalyticsWebApp/Pages/Records.cshtml
@@ -4,26 +4,11 @@
ViewData["Title"] = "Records";
}
-
-
Program Records
-
-
-
-
-
Contract Records
-
-
-
+
+@section Styles {
+
+}
@section Scripts {
-
-
-
-
-
-
-
-
-}
\ No newline at end of file
+
+}
diff --git a/RP1AnalyticsWebApp/Pages/Shared/_Layout.cshtml b/RP1AnalyticsWebApp/Pages/Shared/_Layout.cshtml
index 7fa729e..f848b7f 100644
--- a/RP1AnalyticsWebApp/Pages/Shared/_Layout.cshtml
+++ b/RP1AnalyticsWebApp/Pages/Shared/_Layout.cshtml
@@ -1,6 +1,6 @@
-@using RP1AnalyticsWebApp.Utilities
-@inject SignInManager SignInManager
+@inject SignInManager SignInManager
@inject UserManager UserManager
+@inject IViteManifest Manifest
@@ -8,17 +8,16 @@
@ViewData["Title"]
-
-
-
-
-
+
-
+
+
+
+ @await RenderSectionAsync("Styles", required: false)
@@ -43,7 +42,7 @@
@RenderBody()
-
-
-
+
@if (SignInManager.IsSignedIn(User))
{
}
- @RenderSection("Scripts", required: false)
+
+
+
+ @await RenderSectionAsync("Scripts", required: false)