diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 991e4615..e1c78fac 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -9,9 +9,9 @@ jobs: strategy: matrix: docker: - - repo: planetariumhq/9cutil-backend + - repo: planetariumhq/mimir dockerfile: Dockerfile - - repo: planetariumhq/9cutil-backend-store + - repo: planetariumhq/mimir-store dockerfile: Dockerfile.Store steps: - diff --git a/.vscode/launch.json b/.vscode/launch.json index 314f2ea0..f380506a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,21 +2,21 @@ "version": "0.2.0", "configurations": [ { - "name": "Debug NineChroniclesUtilBackend", + "name": "Debug Mimir", "type": "coreclr", "request": "launch", - "program": "${workspaceFolder}/NineChroniclesUtilBackend/bin/Debug/net8.0/NineChroniclesUtilBackend.dll", - "cwd": "${workspaceFolder}/NineChroniclesUtilBackend", + "program": "${workspaceFolder}/Mimir/bin/Debug/net8.0/Mimir.dll", + "cwd": "${workspaceFolder}/Mimir", "stopAtEntry": false, "console": "internalConsole", "preLaunchTask": "build-backend" }, { - "name": "Debug NineChroniclesUtilBackend.Store", + "name": "Debug Mimir.Store", "type": "coreclr", "request": "launch", - "program": "${workspaceFolder}/NineChroniclesUtilBackend.Store/bin/Debug/net8.0/NineChroniclesUtilBackend.Store.dll", - "cwd": "${workspaceFolder}/NineChroniclesUtilBackend.Store", + "program": "${workspaceFolder}/Mimir.Store/bin/Debug/net8.0/Mimir.Store.dll", + "cwd": "${workspaceFolder}/Mimir.Store", "stopAtEntry": false, "console": "internalConsole", "preLaunchTask": "build-store", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 2eff8588..a9ac982a 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,7 +7,7 @@ "type": "process", "args": [ "build", - "${workspaceFolder}/NineChroniclesUtilBackend/NineChroniclesUtilBackend.csproj", + "${workspaceFolder}/Mimir/Mimir.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], @@ -19,7 +19,7 @@ "type": "process", "args": [ "publish", - "${workspaceFolder}/NineChroniclesUtilBackend/NineChroniclesUtilBackend.csproj", + "${workspaceFolder}/Mimir/Mimir.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], @@ -33,7 +33,7 @@ "watch", "run", "--project", - "${workspaceFolder}/NineChroniclesUtilBackend/NineChroniclesUtilBackend.csproj" + "${workspaceFolder}/Mimir/Mimir.csproj" ], "problemMatcher": "$msCompile" }, @@ -43,7 +43,7 @@ "type": "process", "args": [ "build", - "${workspaceFolder}/NineChroniclesUtilBackend.Store/NineChroniclesUtilBackend.Store.csproj", + "${workspaceFolder}/Mimir.Store/Mimir.Store.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], @@ -55,7 +55,7 @@ "type": "process", "args": [ "publish", - "${workspaceFolder}/NineChroniclesUtilBackend.Store/NineChroniclesUtilBackend.Store.csproj", + "${workspaceFolder}/Mimir.Store/Mimir.Store.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], @@ -69,7 +69,7 @@ "watch", "run", "--project", - "${workspaceFolder}/NineChroniclesUtilBackend.Store/NineChroniclesUtilBackend.Store.csproj" + "${workspaceFolder}/Mimir.Store/Mimir.Store.csproj" ], "problemMatcher": "$msCompile" } diff --git a/Dockerfile b/Dockerfile index c4141c88..504630ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,21 +6,21 @@ WORKDIR /app # Copy everything else and build COPY . ./ RUN dotnet tool restore -RUN dotnet graphql generate NineChroniclesUtilBackend +RUN dotnet graphql generate Mimir RUN <net8.0 enable enable - dotnet-NineChroniclesUtilBackend.Store-bccda56f-4d38-484b-ab03-ebb26065c837 + dotnet-Mimir.Store-bccda56f-4d38-484b-ab03-ebb26065c837 diff --git a/NineChroniclesUtilBackend.Store/Program.cs b/Mimir.Store/Program.cs similarity index 93% rename from NineChroniclesUtilBackend.Store/Program.cs rename to Mimir.Store/Program.cs index 82b6e81c..11c934cc 100644 --- a/NineChroniclesUtilBackend.Store/Program.cs +++ b/Mimir.Store/Program.cs @@ -2,8 +2,8 @@ using System.Net.Http.Headers; using System.Text; using Microsoft.IdentityModel.Tokens; -using NineChroniclesUtilBackend.Store; -using NineChroniclesUtilBackend.Store.Services; +using Mimir.Store; +using Mimir.Store.Services; using Microsoft.Extensions.Options; var builder = Host.CreateApplicationBuilder(args); diff --git a/NineChroniclesUtilBackend.Store/Properties/launchSettings.json b/Mimir.Store/Properties/launchSettings.json similarity index 82% rename from NineChroniclesUtilBackend.Store/Properties/launchSettings.json rename to Mimir.Store/Properties/launchSettings.json index 8efeb70e..bd791543 100644 --- a/NineChroniclesUtilBackend.Store/Properties/launchSettings.json +++ b/Mimir.Store/Properties/launchSettings.json @@ -1,7 +1,7 @@ { "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { - "NineChroniclesUtilBackend.Store": { + "Mimir.Store": { "commandName": "Project", "dotnetRunMessages": true, "environmentVariables": { diff --git a/NineChroniclesUtilBackend.Store/Queries.graphql b/Mimir.Store/Queries.graphql similarity index 100% rename from NineChroniclesUtilBackend.Store/Queries.graphql rename to Mimir.Store/Queries.graphql diff --git a/NineChroniclesUtilBackend.Store/Scrapper/ArenaScrapper.cs b/Mimir.Store/Scrapper/ArenaScrapper.cs similarity index 91% rename from NineChroniclesUtilBackend.Store/Scrapper/ArenaScrapper.cs rename to Mimir.Store/Scrapper/ArenaScrapper.cs index 843527a2..77db74e0 100644 --- a/NineChroniclesUtilBackend.Store/Scrapper/ArenaScrapper.cs +++ b/Mimir.Store/Scrapper/ArenaScrapper.cs @@ -1,10 +1,10 @@ -using NineChroniclesUtilBackend.Store.Events; -using NineChroniclesUtilBackend.Store.Services; -using NineChroniclesUtilBackend.Store.Models; +using Mimir.Store.Events; +using Mimir.Store.Services; +using Mimir.Store.Models; using Nekoyume.TableData; using Libplanet.Crypto; -namespace NineChroniclesUtilBackend.Store.Scrapper; +namespace Mimir.Store.Scrapper; public class ArenaScrapper(ILogger logger, IStateService service, MongoDbStore store) { diff --git a/NineChroniclesUtilBackend.Store/Scrapper/StateGetter.cs b/Mimir.Store/Scrapper/StateGetter.cs similarity index 97% rename from NineChroniclesUtilBackend.Store/Scrapper/StateGetter.cs rename to Mimir.Store/Scrapper/StateGetter.cs index ef2ec4c8..3c5ce38e 100644 --- a/NineChroniclesUtilBackend.Store/Scrapper/StateGetter.cs +++ b/Mimir.Store/Scrapper/StateGetter.cs @@ -1,4 +1,4 @@ -using NineChroniclesUtilBackend.Store.Services; +using Mimir.Store.Services; using Libplanet.Crypto; using Bencodex.Types; using Nekoyume.TableData; @@ -8,9 +8,9 @@ using Nekoyume.Model.Item; using Nekoyume.Model.State; using Nekoyume.Model.Arena; -using NineChroniclesUtilBackend.Store.Models; +using Mimir.Store.Models; -namespace NineChroniclesUtilBackend.Store.Scrapper; +namespace Mimir.Store.Scrapper; public class StateGetter { diff --git a/NineChroniclesUtilBackend.Store/Services/HeadlessStateService.cs b/Mimir.Store/Services/HeadlessStateService.cs similarity index 96% rename from NineChroniclesUtilBackend.Store/Services/HeadlessStateService.cs rename to Mimir.Store/Services/HeadlessStateService.cs index 0fdd5152..3f78d061 100644 --- a/NineChroniclesUtilBackend.Store/Services/HeadlessStateService.cs +++ b/Mimir.Store/Services/HeadlessStateService.cs @@ -6,7 +6,7 @@ using Libplanet.Types.Blocks; using StrawberryShake; -namespace NineChroniclesUtilBackend.Store.Services; +namespace Mimir.Store.Services; public class HeadlessStateService(IHeadlessGQLClient client) : IStateService { diff --git a/NineChroniclesUtilBackend.Store/Services/IStateService.cs b/Mimir.Store/Services/IStateService.cs similarity index 88% rename from NineChroniclesUtilBackend.Store/Services/IStateService.cs rename to Mimir.Store/Services/IStateService.cs index cffd4852..dbe48c88 100644 --- a/NineChroniclesUtilBackend.Store/Services/IStateService.cs +++ b/Mimir.Store/Services/IStateService.cs @@ -2,7 +2,7 @@ using Bencodex.Types; using Libplanet.Crypto; -namespace NineChroniclesUtilBackend.Store.Services; +namespace Mimir.Store.Services; public interface IStateService { diff --git a/NineChroniclesUtilBackend.Store/Services/MongoDbStore.cs b/Mimir.Store/Services/MongoDbStore.cs similarity index 97% rename from NineChroniclesUtilBackend.Store/Services/MongoDbStore.cs rename to Mimir.Store/Services/MongoDbStore.cs index 25a4c6da..084e2a5f 100644 --- a/NineChroniclesUtilBackend.Store/Services/MongoDbStore.cs +++ b/Mimir.Store/Services/MongoDbStore.cs @@ -2,9 +2,9 @@ using Libplanet.Crypto; using MongoDB.Bson; using MongoDB.Driver; -using NineChroniclesUtilBackend.Store.Models; +using Mimir.Store.Models; -namespace NineChroniclesUtilBackend.Store.Services; +namespace Mimir.Store.Services; public class MongoDbStore { diff --git a/NineChroniclesUtilBackend.Store/Services/StateServiceExtensions.cs b/Mimir.Store/Services/StateServiceExtensions.cs similarity index 61% rename from NineChroniclesUtilBackend.Store/Services/StateServiceExtensions.cs rename to Mimir.Store/Services/StateServiceExtensions.cs index b560d32b..52a1f742 100644 --- a/NineChroniclesUtilBackend.Store/Services/StateServiceExtensions.cs +++ b/Mimir.Store/Services/StateServiceExtensions.cs @@ -1,6 +1,6 @@ -using NineChroniclesUtilBackend.Store.Scrapper; +using Mimir.Store.Scrapper; -namespace NineChroniclesUtilBackend.Store.Services; +namespace Mimir.Store.Services; public static class StateServiceExtensions { diff --git a/NineChroniclesUtilBackend.Store/Util/BigIntegerToStringConverter.cs b/Mimir.Store/Util/BigIntegerToStringConverter.cs similarity index 92% rename from NineChroniclesUtilBackend.Store/Util/BigIntegerToStringConverter.cs rename to Mimir.Store/Util/BigIntegerToStringConverter.cs index 9b3cb586..678b84ca 100644 --- a/NineChroniclesUtilBackend.Store/Util/BigIntegerToStringConverter.cs +++ b/Mimir.Store/Util/BigIntegerToStringConverter.cs @@ -1,7 +1,7 @@ using System.Numerics; using Newtonsoft.Json; -namespace NineChroniclesUtilBackend.Store.Util; +namespace Mimir.Store.Util; public class BigIntegerToStringConverter : JsonConverter { diff --git a/NineChroniclesUtilBackend.Store/Util/StateJsonConverter.cs b/Mimir.Store/Util/StateJsonConverter.cs similarity index 96% rename from NineChroniclesUtilBackend.Store/Util/StateJsonConverter.cs rename to Mimir.Store/Util/StateJsonConverter.cs index 2cfb5ed1..5e974f4f 100644 --- a/NineChroniclesUtilBackend.Store/Util/StateJsonConverter.cs +++ b/Mimir.Store/Util/StateJsonConverter.cs @@ -5,7 +5,7 @@ using Bencodex; using Bencodex.Types; -namespace NineChroniclesUtilBackend.Store.Util; +namespace Mimir.Store.Util; public class StateJsonConverter : JsonConverter { diff --git a/NineChroniclesUtilBackend.Store/appsettings.Development.json b/Mimir.Store/appsettings.Development.json similarity index 100% rename from NineChroniclesUtilBackend.Store/appsettings.Development.json rename to Mimir.Store/appsettings.Development.json diff --git a/NineChroniclesUtilBackend.Store/appsettings.json b/Mimir.Store/appsettings.json similarity index 86% rename from NineChroniclesUtilBackend.Store/appsettings.json rename to Mimir.Store/appsettings.json index 89eb3aa3..71a6abd2 100644 --- a/NineChroniclesUtilBackend.Store/appsettings.json +++ b/Mimir.Store/appsettings.json @@ -7,7 +7,7 @@ }, "Configuration": { "MongoDbConnectionString": "mongodb://rootuser:rootpass@localhost:27017", - "DatabaseName": "9cutil_backend", + "DatabaseName": "mimir", "HeadlessEndpoint": "https://9c-main-full-state.nine-chronicles.com/graphql" } } \ No newline at end of file diff --git a/NineChroniclesUtilBackend.Store/schema.extensions.graphql b/Mimir.Store/schema.extensions.graphql similarity index 100% rename from NineChroniclesUtilBackend.Store/schema.extensions.graphql rename to Mimir.Store/schema.extensions.graphql diff --git a/NineChroniclesUtilBackend.Store/schema.graphql b/Mimir.Store/schema.graphql similarity index 100% rename from NineChroniclesUtilBackend.Store/schema.graphql rename to Mimir.Store/schema.graphql diff --git a/NineChroniclesUtilBackend.sln b/Mimir.sln similarity index 75% rename from NineChroniclesUtilBackend.sln rename to Mimir.sln index 2d78a670..f4737cca 100644 --- a/NineChroniclesUtilBackend.sln +++ b/Mimir.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NineChroniclesUtilBackend", "NineChroniclesUtilBackend\NineChroniclesUtilBackend.csproj", "{1909E492-D010-4FB5-BC4B-DEF73025C41E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mimir", "Mimir\Mimir.csproj", "{1909E492-D010-4FB5-BC4B-DEF73025C41E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NineChroniclesUtilBackend.Store", "NineChroniclesUtilBackend.Store\NineChroniclesUtilBackend.Store.csproj", "{462CDFD3-650B-46A7-A937-8E3BCE7E527C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mimir.Store", "Mimir.Store\Mimir.Store.csproj", "{462CDFD3-650B-46A7-A937-8E3BCE7E527C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/NineChroniclesUtilBackend/.graphqlrc.json b/Mimir/.graphqlrc.json similarity index 100% rename from NineChroniclesUtilBackend/.graphqlrc.json rename to Mimir/.graphqlrc.json diff --git a/NineChroniclesUtilBackend/Arena/ArenaBulkSimulator.cs b/Mimir/Arena/ArenaBulkSimulator.cs similarity index 96% rename from NineChroniclesUtilBackend/Arena/ArenaBulkSimulator.cs rename to Mimir/Arena/ArenaBulkSimulator.cs index 47fbe77f..16027405 100644 --- a/NineChroniclesUtilBackend/Arena/ArenaBulkSimulator.cs +++ b/Mimir/Arena/ArenaBulkSimulator.cs @@ -5,10 +5,10 @@ using Libplanet.Crypto; using Nekoyume.Model.Stat; using Nekoyume.Model.State; -using SimulatorRandom = NineChroniclesUtilBackend.Random; +using SimulatorRandom = Mimir.Random; using SystemRandom = System.Random; -namespace NineChroniclesUtilBackend.Arena; +namespace Mimir.Arena; public class ArenaBulkSimulator { diff --git a/NineChroniclesUtilBackend/Arena/AvatarStatesForArena.cs b/Mimir/Arena/AvatarStatesForArena.cs similarity index 91% rename from NineChroniclesUtilBackend/Arena/AvatarStatesForArena.cs rename to Mimir/Arena/AvatarStatesForArena.cs index 98b05862..98791d7a 100644 --- a/NineChroniclesUtilBackend/Arena/AvatarStatesForArena.cs +++ b/Mimir/Arena/AvatarStatesForArena.cs @@ -1,6 +1,6 @@ using Nekoyume.Model.State; -namespace NineChroniclesUtilBackend.Arena; +namespace Mimir.Arena; public record AvatarStatesForArena { diff --git a/NineChroniclesUtilBackend/Controllers/AgentController.cs b/Mimir/Controllers/AgentController.cs similarity index 80% rename from NineChroniclesUtilBackend/Controllers/AgentController.cs rename to Mimir/Controllers/AgentController.cs index bd72ee72..a54bffaa 100644 --- a/NineChroniclesUtilBackend/Controllers/AgentController.cs +++ b/Mimir/Controllers/AgentController.cs @@ -1,10 +1,10 @@ using Microsoft.AspNetCore.Mvc; -using NineChroniclesUtilBackend.Models.Agent; +using Mimir.Models.Agent; using Libplanet.Crypto; -using NineChroniclesUtilBackend.Services; -using NineChroniclesUtilBackend.Util; +using Mimir.Services; +using Mimir.Util; -namespace NineChroniclesUtilBackend.Controllers; +namespace Mimir.Controllers; [ApiController] [Route("agent")] diff --git a/NineChroniclesUtilBackend/Controllers/ArenaController.cs b/Mimir/Controllers/ArenaController.cs similarity index 92% rename from NineChroniclesUtilBackend/Controllers/ArenaController.cs rename to Mimir/Controllers/ArenaController.cs index 59607aed..8368428f 100644 --- a/NineChroniclesUtilBackend/Controllers/ArenaController.cs +++ b/Mimir/Controllers/ArenaController.cs @@ -1,13 +1,13 @@ using Libplanet.Crypto; using Microsoft.AspNetCore.Mvc; using Nekoyume.TableData; -using NineChroniclesUtilBackend.Arena; -using NineChroniclesUtilBackend.Models.Arena; -using NineChroniclesUtilBackend.Repositories; -using NineChroniclesUtilBackend.Services; -using NineChroniclesUtilBackend.Util; +using Mimir.Arena; +using Mimir.Models.Arena; +using Mimir.Repositories; +using Mimir.Services; +using Mimir.Util; -namespace NineChroniclesUtilBackend.Controllers; +namespace Mimir.Controllers; [ApiController] [Route("arena")] diff --git a/NineChroniclesUtilBackend/Controllers/AvatarController.cs b/Mimir/Controllers/AvatarController.cs similarity index 78% rename from NineChroniclesUtilBackend/Controllers/AvatarController.cs rename to Mimir/Controllers/AvatarController.cs index de02ea07..a48f43d1 100644 --- a/NineChroniclesUtilBackend/Controllers/AvatarController.cs +++ b/Mimir/Controllers/AvatarController.cs @@ -1,8 +1,8 @@ using Microsoft.AspNetCore.Mvc; -using NineChroniclesUtilBackend.Models.Avatar; -using NineChroniclesUtilBackend.Repositories; +using Mimir.Models.Avatar; +using Mimir.Repositories; -namespace NineChroniclesUtilBackend.Controllers; +namespace Mimir.Controllers; [ApiController] [Route("avatars")] diff --git a/NineChroniclesUtilBackend/Models/Agent/Avatar.cs b/Mimir/Models/Agent/Avatar.cs similarity index 82% rename from NineChroniclesUtilBackend/Models/Agent/Avatar.cs rename to Mimir/Models/Agent/Avatar.cs index fcdf2d18..8b77c9c2 100644 --- a/NineChroniclesUtilBackend/Models/Agent/Avatar.cs +++ b/Mimir/Models/Agent/Avatar.cs @@ -1,4 +1,4 @@ -namespace NineChroniclesUtilBackend.Models.Agent; +namespace Mimir.Models.Agent; public class Avatar(string avatarAddress, string avatarName, int level) { diff --git a/NineChroniclesUtilBackend/Models/Agent/AvatarsResponse.cs b/Mimir/Models/Agent/AvatarsResponse.cs similarity index 54% rename from NineChroniclesUtilBackend/Models/Agent/AvatarsResponse.cs rename to Mimir/Models/Agent/AvatarsResponse.cs index 52280d7e..61186795 100644 --- a/NineChroniclesUtilBackend/Models/Agent/AvatarsResponse.cs +++ b/Mimir/Models/Agent/AvatarsResponse.cs @@ -1,4 +1,4 @@ -namespace NineChroniclesUtilBackend.Models.Agent; +namespace Mimir.Models.Agent; public record AvatarsResponse( List Avatars diff --git a/NineChroniclesUtilBackend/Models/Arena/ArenaRanking.cs b/Mimir/Models/Arena/ArenaRanking.cs similarity index 94% rename from NineChroniclesUtilBackend/Models/Arena/ArenaRanking.cs rename to Mimir/Models/Arena/ArenaRanking.cs index 3dcd74a9..e4f0e113 100644 --- a/NineChroniclesUtilBackend/Models/Arena/ArenaRanking.cs +++ b/Mimir/Models/Arena/ArenaRanking.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace NineChroniclesUtilBackend.Models.Arena; +namespace Mimir.Models.Arena; public class ArenaRanking( string avatarAddress, diff --git a/NineChroniclesUtilBackend/Models/Arena/ArenaSimulateRequest.cs b/Mimir/Models/Arena/ArenaSimulateRequest.cs similarity index 69% rename from NineChroniclesUtilBackend/Models/Arena/ArenaSimulateRequest.cs rename to Mimir/Models/Arena/ArenaSimulateRequest.cs index a112b7b4..e428a486 100644 --- a/NineChroniclesUtilBackend/Models/Arena/ArenaSimulateRequest.cs +++ b/Mimir/Models/Arena/ArenaSimulateRequest.cs @@ -1,4 +1,4 @@ -namespace NineChroniclesUtilBackend.Models.Arena; +namespace Mimir.Models.Arena; public record ArenaSimulateRequest( int? Seed, diff --git a/NineChroniclesUtilBackend/Models/Arena/ArenaSimulateResponse.cs b/Mimir/Models/Arena/ArenaSimulateResponse.cs similarity index 54% rename from NineChroniclesUtilBackend/Models/Arena/ArenaSimulateResponse.cs rename to Mimir/Models/Arena/ArenaSimulateResponse.cs index cb517e9a..36a8de00 100644 --- a/NineChroniclesUtilBackend/Models/Arena/ArenaSimulateResponse.cs +++ b/Mimir/Models/Arena/ArenaSimulateResponse.cs @@ -1,4 +1,4 @@ -namespace NineChroniclesUtilBackend.Models.Arena; +namespace Mimir.Models.Arena; public record ArenaSimulateResponse( double WinRate diff --git a/NineChroniclesUtilBackend/Models/Avatar/Inventory.cs b/Mimir/Models/Avatar/Inventory.cs similarity index 70% rename from NineChroniclesUtilBackend/Models/Avatar/Inventory.cs rename to Mimir/Models/Avatar/Inventory.cs index 8b2b7f76..64d29820 100644 --- a/NineChroniclesUtilBackend/Models/Avatar/Inventory.cs +++ b/Mimir/Models/Avatar/Inventory.cs @@ -1,7 +1,7 @@ using MongoDB.Bson; -using NineChroniclesUtilBackend.Models.Items; +using Mimir.Models.Items; -namespace NineChroniclesUtilBackend.Models.Avatar; +namespace Mimir.Models.Avatar; public class Inventory(BsonValue inventory) { diff --git a/NineChroniclesUtilBackend/Models/Items/Equipment.cs b/Mimir/Models/Items/Equipment.cs similarity index 76% rename from NineChroniclesUtilBackend/Models/Items/Equipment.cs rename to Mimir/Models/Items/Equipment.cs index 67efac2b..599ab3aa 100644 --- a/NineChroniclesUtilBackend/Models/Items/Equipment.cs +++ b/Mimir/Models/Items/Equipment.cs @@ -1,6 +1,6 @@ using MongoDB.Bson; -namespace NineChroniclesUtilBackend.Models.Items; +namespace Mimir.Models.Items; public class Equipment(BsonValue equipment) : NonFungibleItem(equipment) { diff --git a/NineChroniclesUtilBackend/Models/Items/Item.cs b/Mimir/Models/Items/Item.cs similarity index 78% rename from NineChroniclesUtilBackend/Models/Items/Item.cs rename to Mimir/Models/Items/Item.cs index d8c0936f..98145e5e 100644 --- a/NineChroniclesUtilBackend/Models/Items/Item.cs +++ b/Mimir/Models/Items/Item.cs @@ -1,7 +1,7 @@ using MongoDB.Bson; using Nekoyume.Model.Item; -namespace NineChroniclesUtilBackend.Models.Items; +namespace Mimir.Models.Items; public class Item(BsonValue item) { diff --git a/NineChroniclesUtilBackend/Models/Items/NonFungibleItem.cs b/Mimir/Models/Items/NonFungibleItem.cs similarity index 85% rename from NineChroniclesUtilBackend/Models/Items/NonFungibleItem.cs rename to Mimir/Models/Items/NonFungibleItem.cs index c49d9fe8..335653fa 100644 --- a/NineChroniclesUtilBackend/Models/Items/NonFungibleItem.cs +++ b/Mimir/Models/Items/NonFungibleItem.cs @@ -1,6 +1,6 @@ using MongoDB.Bson; -namespace NineChroniclesUtilBackend.Models.Items; +namespace Mimir.Models.Items; public class NonFungibleItem(BsonValue nonFungibleItem) : Item(nonFungibleItem) { diff --git a/NineChroniclesUtilBackend/NineChroniclesUtilBackend.csproj b/Mimir/NineChroniclesUtilBackend.csproj similarity index 100% rename from NineChroniclesUtilBackend/NineChroniclesUtilBackend.csproj rename to Mimir/NineChroniclesUtilBackend.csproj diff --git a/Mimir/NineChroniclesUtilBackend.http b/Mimir/NineChroniclesUtilBackend.http new file mode 100644 index 00000000..7f936e65 --- /dev/null +++ b/Mimir/NineChroniclesUtilBackend.http @@ -0,0 +1,6 @@ +@Mimir_HostAddress = http://localhost:5195 + +GET {{Mimir_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/NineChroniclesUtilBackend/Options/DatabaseOption.cs b/Mimir/Options/DatabaseOption.cs similarity index 73% rename from NineChroniclesUtilBackend/Options/DatabaseOption.cs rename to Mimir/Options/DatabaseOption.cs index ca566e82..dcd3ca79 100644 --- a/NineChroniclesUtilBackend/Options/DatabaseOption.cs +++ b/Mimir/Options/DatabaseOption.cs @@ -1,4 +1,4 @@ -namespace NineChroniclesUtilBackend.Options; +namespace Mimir.Options; public class DatabaseOption { diff --git a/NineChroniclesUtilBackend/Options/HeadlessStateServiceOption.cs b/Mimir/Options/HeadlessStateServiceOption.cs similarity index 80% rename from NineChroniclesUtilBackend/Options/HeadlessStateServiceOption.cs rename to Mimir/Options/HeadlessStateServiceOption.cs index 5f8d6e64..3f20fce3 100644 --- a/NineChroniclesUtilBackend/Options/HeadlessStateServiceOption.cs +++ b/Mimir/Options/HeadlessStateServiceOption.cs @@ -1,4 +1,4 @@ -namespace NineChroniclesUtilBackend.Options; +namespace Mimir.Options; public class HeadlessStateServiceOption { diff --git a/NineChroniclesUtilBackend/Program.cs b/Mimir/Program.cs similarity index 94% rename from NineChroniclesUtilBackend/Program.cs rename to Mimir/Program.cs index 67edd4ff..7b278eec 100644 --- a/NineChroniclesUtilBackend/Program.cs +++ b/Mimir/Program.cs @@ -4,9 +4,9 @@ using System.Text; using Microsoft.IdentityModel.Tokens; using Microsoft.Extensions.Options; -using NineChroniclesUtilBackend.Services; -using NineChroniclesUtilBackend.Options; -using NineChroniclesUtilBackend.Repositories; +using Mimir.Services; +using Mimir.Options; +using Mimir.Repositories; var builder = WebApplication.CreateBuilder(args); diff --git a/NineChroniclesUtilBackend/Properties/launchSettings.json b/Mimir/Properties/launchSettings.json similarity index 100% rename from NineChroniclesUtilBackend/Properties/launchSettings.json rename to Mimir/Properties/launchSettings.json diff --git a/NineChroniclesUtilBackend/Queries.graphql b/Mimir/Queries.graphql similarity index 100% rename from NineChroniclesUtilBackend/Queries.graphql rename to Mimir/Queries.graphql diff --git a/NineChroniclesUtilBackend/Random.cs b/Mimir/Random.cs similarity index 93% rename from NineChroniclesUtilBackend/Random.cs rename to Mimir/Random.cs index 7f0d63e1..4b194407 100644 --- a/NineChroniclesUtilBackend/Random.cs +++ b/Mimir/Random.cs @@ -1,6 +1,6 @@ using Libplanet.Action; -namespace NineChroniclesUtilBackend; +namespace Mimir; public class Random(int seed) : IRandom { diff --git a/NineChroniclesUtilBackend/Repositories/ArenaRankingRespository.cs b/Mimir/Repositories/ArenaRankingRespository.cs similarity index 95% rename from NineChroniclesUtilBackend/Repositories/ArenaRankingRespository.cs rename to Mimir/Repositories/ArenaRankingRespository.cs index e6e64c9c..48cd3cf4 100644 --- a/NineChroniclesUtilBackend/Repositories/ArenaRankingRespository.cs +++ b/Mimir/Repositories/ArenaRankingRespository.cs @@ -1,10 +1,10 @@ using MongoDB.Bson; using MongoDB.Driver; -using NineChroniclesUtilBackend.Models.Agent; -using NineChroniclesUtilBackend.Models.Arena; -using NineChroniclesUtilBackend.Services; +using Mimir.Models.Agent; +using Mimir.Models.Arena; +using Mimir.Services; -namespace NineChroniclesUtilBackend.Repositories; +namespace Mimir.Repositories; public class ArenaRankingRepository(MongoDBCollectionService mongoDBCollectionService, IStateService stateService) { diff --git a/NineChroniclesUtilBackend/Repositories/AvatarRepository.cs b/Mimir/Repositories/AvatarRepository.cs similarity index 85% rename from NineChroniclesUtilBackend/Repositories/AvatarRepository.cs rename to Mimir/Repositories/AvatarRepository.cs index 9242e6b3..9e4fd7d4 100644 --- a/NineChroniclesUtilBackend/Repositories/AvatarRepository.cs +++ b/Mimir/Repositories/AvatarRepository.cs @@ -1,9 +1,9 @@ using MongoDB.Bson; using MongoDB.Driver; -using NineChroniclesUtilBackend.Models.Avatar; -using NineChroniclesUtilBackend.Services; +using Mimir.Models.Avatar; +using Mimir.Services; -namespace NineChroniclesUtilBackend.Repositories; +namespace Mimir.Repositories; public class AvatarRepository(MongoDBCollectionService mongoDBCollectionService) { diff --git a/NineChroniclesUtilBackend/Repositories/CpRepository.cs b/Mimir/Repositories/CpRepository.cs similarity index 95% rename from NineChroniclesUtilBackend/Repositories/CpRepository.cs rename to Mimir/Repositories/CpRepository.cs index 986ad9af..eee3c429 100644 --- a/NineChroniclesUtilBackend/Repositories/CpRepository.cs +++ b/Mimir/Repositories/CpRepository.cs @@ -5,11 +5,11 @@ using Nekoyume.Model.Stat; using Nekoyume.Model.State; using Nekoyume.TableData; -using NineChroniclesUtilBackend.Models.Agent; -using NineChroniclesUtilBackend.Services; -using NineChroniclesUtilBackend.Util; +using Mimir.Models.Agent; +using Mimir.Services; +using Mimir.Util; -namespace NineChroniclesUtilBackend.Repositories; +namespace Mimir.Repositories; public class CpRepository { diff --git a/NineChroniclesUtilBackend/Services/HeadlessStateService.cs b/Mimir/Services/HeadlessStateService.cs similarity index 96% rename from NineChroniclesUtilBackend/Services/HeadlessStateService.cs rename to Mimir/Services/HeadlessStateService.cs index c890ddc9..efc48416 100644 --- a/NineChroniclesUtilBackend/Services/HeadlessStateService.cs +++ b/Mimir/Services/HeadlessStateService.cs @@ -6,7 +6,7 @@ using Libplanet.Types.Blocks; using StrawberryShake; -namespace NineChroniclesUtilBackend.Services; +namespace Mimir.Services; public class HeadlessStateService(IHeadlessGQLClient client) : IStateService { diff --git a/NineChroniclesUtilBackend/Services/IStateService.cs b/Mimir/Services/IStateService.cs similarity index 88% rename from NineChroniclesUtilBackend/Services/IStateService.cs rename to Mimir/Services/IStateService.cs index 928d05dd..4ddd0a3f 100644 --- a/NineChroniclesUtilBackend/Services/IStateService.cs +++ b/Mimir/Services/IStateService.cs @@ -2,7 +2,7 @@ using Bencodex.Types; using Libplanet.Crypto; -namespace NineChroniclesUtilBackend.Services; +namespace Mimir.Services; public interface IStateService { diff --git a/NineChroniclesUtilBackend/Services/MongoDBCollectionService.cs b/Mimir/Services/MongoDBCollectionService.cs similarity index 85% rename from NineChroniclesUtilBackend/Services/MongoDBCollectionService.cs rename to Mimir/Services/MongoDBCollectionService.cs index 2566ce41..862ad08a 100644 --- a/NineChroniclesUtilBackend/Services/MongoDBCollectionService.cs +++ b/Mimir/Services/MongoDBCollectionService.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.Options; using MongoDB.Driver; -using NineChroniclesUtilBackend.Options; +using Mimir.Options; -namespace NineChroniclesUtilBackend.Services; +namespace Mimir.Services; public class MongoDBCollectionService(IOptions databaseOption) { diff --git a/NineChroniclesUtilBackend/Util/StateGetter.cs b/Mimir/Util/StateGetter.cs similarity index 98% rename from NineChroniclesUtilBackend/Util/StateGetter.cs rename to Mimir/Util/StateGetter.cs index 0fc2bef5..21db3ee0 100644 --- a/NineChroniclesUtilBackend/Util/StateGetter.cs +++ b/Mimir/Util/StateGetter.cs @@ -6,9 +6,9 @@ using Nekoyume.Model.EnumType; using Nekoyume.Model.Item; using Nekoyume.Model.State; -using NineChroniclesUtilBackend.Services; +using Mimir.Services; -namespace NineChroniclesUtilBackend.Util; +namespace Mimir.Util; public class StateGetter(IStateService stateService) { diff --git a/NineChroniclesUtilBackend/appsettings.Development.json b/Mimir/appsettings.Development.json similarity index 100% rename from NineChroniclesUtilBackend/appsettings.Development.json rename to Mimir/appsettings.Development.json diff --git a/NineChroniclesUtilBackend/appsettings.json b/Mimir/appsettings.json similarity index 100% rename from NineChroniclesUtilBackend/appsettings.json rename to Mimir/appsettings.json diff --git a/NineChroniclesUtilBackend/schema.extensions.graphql b/Mimir/schema.extensions.graphql similarity index 100% rename from NineChroniclesUtilBackend/schema.extensions.graphql rename to Mimir/schema.extensions.graphql diff --git a/NineChroniclesUtilBackend/schema.graphql b/Mimir/schema.graphql similarity index 100% rename from NineChroniclesUtilBackend/schema.graphql rename to Mimir/schema.graphql diff --git a/NineChroniclesUtilBackend/NineChroniclesUtilBackend.http b/NineChroniclesUtilBackend/NineChroniclesUtilBackend.http deleted file mode 100644 index 080370a8..00000000 --- a/NineChroniclesUtilBackend/NineChroniclesUtilBackend.http +++ /dev/null @@ -1,6 +0,0 @@ -@NineChroniclesUtilBackend_HostAddress = http://localhost:5195 - -GET {{NineChroniclesUtilBackend_HostAddress}}/weatherforecast/ -Accept: application/json - -### diff --git a/README.md b/README.md index bf0a6f3b..a451db3d 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# 9cutil-backend +# mimir A backend service that provides 9c-related utility APIs. ## Build ``` dotnet tool restore -dotnet graphql generate NineChroniclesUtilBackend -dotnet graphql generate NineChroniclesUtilBackend.Store +dotnet graphql generate Mimir +dotnet graphql generate Mimir.Store dotnet build ```