From e9f444e5b41557374d37bf0d9d20323de4377d10 Mon Sep 17 00:00:00 2001 From: Fishandchips321 Date: Mon, 22 Dec 2025 20:23:27 +0000 Subject: [PATCH] Refactored project layout to correct onion model --- backend/Repositories/ItemRepository.cs | 0 backend/Repositories/LibraryRepository.cs | 0 backend/Repositories/ServerRepository.cs | 0 backend/Services/ItemService.cs | 0 backend/backend.http | 6 - backend/src/.gitignore | 484 ++++++++++++++++++ .../Application/Application.csproj} | 12 +- .../src/Application/Services/ItemService.cs | 1 + .../Application}/Services/LibraryService.cs | 0 .../Application}/Services/ServerService.cs | 0 backend/src/Core/Core.csproj | 9 + backend/{Models => src/Core/Entities}/Item.cs | 2 +- .../{Models => src/Core/Entities}/Library.cs | 2 +- .../{Models => src/Core/Entities}/Server.cs | 2 +- .../Core/Interfaces}/IItemRepository.cs | 4 +- .../Core/Interfaces}/IItemService.cs | 4 +- .../Core/Interfaces}/ILibraryRepository.cs | 4 +- .../Core/Interfaces}/ILibraryService.cs | 4 +- .../Core/Interfaces}/IServerRepository.cs | 4 +- .../Core/Interfaces}/IServerService.cs | 4 +- .../src/Infrastructure/Infrastructure.csproj | 14 + .../Repositories/ItemRepository.cs | 4 + .../Repositories/LibraryRepository.cs | 12 + .../Repositories/ServerRepository.cs | 4 + .../Services/JellyfinApiClient.cs | 1 + backend/src/JellyGlass.sln | 40 ++ .../WebApi}/Controllers/ItemController.cs | 4 +- .../WebApi}/Controllers/LibraryController.cs | 4 +- .../WebApi}/Controllers/ServerController.cs | 4 +- backend/{ => src/WebApi}/Program.cs | 0 .../WebApi}/Properties/launchSettings.json | 4 +- backend/src/WebApi/WebApi.csproj | 19 + backend/src/WebApi/WebApi.http | 6 + .../WebApi}/appsettings.Development.json | 0 backend/{ => src/WebApi}/appsettings.json | 0 35 files changed, 623 insertions(+), 35 deletions(-) delete mode 100644 backend/Repositories/ItemRepository.cs delete mode 100644 backend/Repositories/LibraryRepository.cs delete mode 100644 backend/Repositories/ServerRepository.cs delete mode 100644 backend/Services/ItemService.cs delete mode 100644 backend/backend.http create mode 100644 backend/src/.gitignore rename backend/{backend.csproj => src/Application/Application.csproj} (62%) create mode 100644 backend/src/Application/Services/ItemService.cs rename backend/{ => src/Application}/Services/LibraryService.cs (100%) rename backend/{ => src/Application}/Services/ServerService.cs (100%) create mode 100644 backend/src/Core/Core.csproj rename backend/{Models => src/Core/Entities}/Item.cs (81%) rename backend/{Models => src/Core/Entities}/Library.cs (78%) rename backend/{Models => src/Core/Entities}/Server.cs (71%) rename backend/{Repositories => src/Core/Interfaces}/IItemRepository.cs (58%) rename backend/{Services => src/Core/Interfaces}/IItemService.cs (57%) rename backend/{Repositories => src/Core/Interfaces}/ILibraryRepository.cs (53%) rename backend/{Services => src/Core/Interfaces}/ILibraryService.cs (52%) rename backend/{Repositories => src/Core/Interfaces}/IServerRepository.cs (52%) rename backend/{Services => src/Core/Interfaces}/IServerService.cs (51%) create mode 100644 backend/src/Infrastructure/Infrastructure.csproj create mode 100644 backend/src/Infrastructure/Repositories/ItemRepository.cs create mode 100644 backend/src/Infrastructure/Repositories/LibraryRepository.cs create mode 100644 backend/src/Infrastructure/Repositories/ServerRepository.cs create mode 100644 backend/src/Infrastructure/Services/JellyfinApiClient.cs create mode 100644 backend/src/JellyGlass.sln rename backend/{ => src/WebApi}/Controllers/ItemController.cs (86%) rename backend/{ => src/WebApi}/Controllers/LibraryController.cs (86%) rename backend/{ => src/WebApi}/Controllers/ServerController.cs (85%) rename backend/{ => src/WebApi}/Program.cs (100%) rename backend/{ => src/WebApi}/Properties/launchSettings.json (80%) create mode 100644 backend/src/WebApi/WebApi.csproj create mode 100644 backend/src/WebApi/WebApi.http rename backend/{ => src/WebApi}/appsettings.Development.json (100%) rename backend/{ => src/WebApi}/appsettings.json (100%) diff --git a/backend/Repositories/ItemRepository.cs b/backend/Repositories/ItemRepository.cs deleted file mode 100644 index e69de29..0000000 diff --git a/backend/Repositories/LibraryRepository.cs b/backend/Repositories/LibraryRepository.cs deleted file mode 100644 index e69de29..0000000 diff --git a/backend/Repositories/ServerRepository.cs b/backend/Repositories/ServerRepository.cs deleted file mode 100644 index e69de29..0000000 diff --git a/backend/Services/ItemService.cs b/backend/Services/ItemService.cs deleted file mode 100644 index e69de29..0000000 diff --git a/backend/backend.http b/backend/backend.http deleted file mode 100644 index 33b1ba6..0000000 --- a/backend/backend.http +++ /dev/null @@ -1,6 +0,0 @@ -@backend_HostAddress = http://localhost:5097 - -GET {{backend_HostAddress}}/weatherforecast/ -Accept: application/json - -### diff --git a/backend/src/.gitignore b/backend/src/.gitignore new file mode 100644 index 0000000..bc78471 --- /dev/null +++ b/backend/src/.gitignore @@ -0,0 +1,484 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from `dotnet new gitignore` + +# dotenv files +.env + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea/ + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim temporary swap files +*.swp diff --git a/backend/backend.csproj b/backend/src/Application/Application.csproj similarity index 62% rename from backend/backend.csproj rename to backend/src/Application/Application.csproj index 0077099..64eb85d 100644 --- a/backend/backend.csproj +++ b/backend/src/Application/Application.csproj @@ -1,13 +1,13 @@ - + + + + + net9.0 - enable enable + enable - - - - diff --git a/backend/src/Application/Services/ItemService.cs b/backend/src/Application/Services/ItemService.cs new file mode 100644 index 0000000..ac5e840 --- /dev/null +++ b/backend/src/Application/Services/ItemService.cs @@ -0,0 +1 @@ +namespace JellyGlass.Application.Services; \ No newline at end of file diff --git a/backend/Services/LibraryService.cs b/backend/src/Application/Services/LibraryService.cs similarity index 100% rename from backend/Services/LibraryService.cs rename to backend/src/Application/Services/LibraryService.cs diff --git a/backend/Services/ServerService.cs b/backend/src/Application/Services/ServerService.cs similarity index 100% rename from backend/Services/ServerService.cs rename to backend/src/Application/Services/ServerService.cs diff --git a/backend/src/Core/Core.csproj b/backend/src/Core/Core.csproj new file mode 100644 index 0000000..125f4c9 --- /dev/null +++ b/backend/src/Core/Core.csproj @@ -0,0 +1,9 @@ + + + + net9.0 + enable + enable + + + diff --git a/backend/Models/Item.cs b/backend/src/Core/Entities/Item.cs similarity index 81% rename from backend/Models/Item.cs rename to backend/src/Core/Entities/Item.cs index b80e2a2..0352276 100644 --- a/backend/Models/Item.cs +++ b/backend/src/Core/Entities/Item.cs @@ -1,4 +1,4 @@ -namespace JellyGlass.Models; +namespace JellyGlass.Core.Entities; public class Item { diff --git a/backend/Models/Library.cs b/backend/src/Core/Entities/Library.cs similarity index 78% rename from backend/Models/Library.cs rename to backend/src/Core/Entities/Library.cs index a007eb1..cf0ee35 100644 --- a/backend/Models/Library.cs +++ b/backend/src/Core/Entities/Library.cs @@ -1,4 +1,4 @@ -namespace JellyGlass.Models; +namespace JellyGlass.Core.Entities; public class Library { diff --git a/backend/Models/Server.cs b/backend/src/Core/Entities/Server.cs similarity index 71% rename from backend/Models/Server.cs rename to backend/src/Core/Entities/Server.cs index b907131..91181d0 100644 --- a/backend/Models/Server.cs +++ b/backend/src/Core/Entities/Server.cs @@ -1,4 +1,4 @@ -namespace JellyGlass.Models; +namespace JellyGlass.Core.Entities; public class Server { diff --git a/backend/Repositories/IItemRepository.cs b/backend/src/Core/Interfaces/IItemRepository.cs similarity index 58% rename from backend/Repositories/IItemRepository.cs rename to backend/src/Core/Interfaces/IItemRepository.cs index 6ee8db2..3502a94 100644 --- a/backend/Repositories/IItemRepository.cs +++ b/backend/src/Core/Interfaces/IItemRepository.cs @@ -1,6 +1,6 @@ -using JellyGlass.Models; +using JellyGlass.Core.Entities; -namespace JellyGlass.Repositories; +namespace JellyGlass.Core.Interfaces; public interface IItemRepository { diff --git a/backend/Services/IItemService.cs b/backend/src/Core/Interfaces/IItemService.cs similarity index 57% rename from backend/Services/IItemService.cs rename to backend/src/Core/Interfaces/IItemService.cs index 8df7a73..3d32dbb 100644 --- a/backend/Services/IItemService.cs +++ b/backend/src/Core/Interfaces/IItemService.cs @@ -1,6 +1,6 @@ -using JellyGlass.Models; +using JellyGlass.Core.Entities; -namespace JellyGlass.Services; +namespace JellyGlass.Core.Interfaces; public interface IItemService { diff --git a/backend/Repositories/ILibraryRepository.cs b/backend/src/Core/Interfaces/ILibraryRepository.cs similarity index 53% rename from backend/Repositories/ILibraryRepository.cs rename to backend/src/Core/Interfaces/ILibraryRepository.cs index 351ea87..1c47580 100644 --- a/backend/Repositories/ILibraryRepository.cs +++ b/backend/src/Core/Interfaces/ILibraryRepository.cs @@ -1,6 +1,6 @@ -using JellyGlass.Models; +using JellyGlass.Core.Entities; -namespace JellyGlass.Repositories; +namespace JellyGlass.Core.Interfaces; public interface ILibraryRepository { diff --git a/backend/Services/ILibraryService.cs b/backend/src/Core/Interfaces/ILibraryService.cs similarity index 52% rename from backend/Services/ILibraryService.cs rename to backend/src/Core/Interfaces/ILibraryService.cs index f09dab9..b775085 100644 --- a/backend/Services/ILibraryService.cs +++ b/backend/src/Core/Interfaces/ILibraryService.cs @@ -1,6 +1,6 @@ -using JellyGlass.Models; +using JellyGlass.Core.Entities; -namespace JellyGlass.Services; +namespace JellyGlass.Core.Interfaces; public interface ILibraryService { diff --git a/backend/Repositories/IServerRepository.cs b/backend/src/Core/Interfaces/IServerRepository.cs similarity index 52% rename from backend/Repositories/IServerRepository.cs rename to backend/src/Core/Interfaces/IServerRepository.cs index 489985f..3f4fbd8 100644 --- a/backend/Repositories/IServerRepository.cs +++ b/backend/src/Core/Interfaces/IServerRepository.cs @@ -1,6 +1,6 @@ -using JellyGlass.Models; +using JellyGlass.Core.Entities; -namespace JellyGlass.Repositories; +namespace JellyGlass.Core.Interfaces; public interface IServerRepository { diff --git a/backend/Services/IServerService.cs b/backend/src/Core/Interfaces/IServerService.cs similarity index 51% rename from backend/Services/IServerService.cs rename to backend/src/Core/Interfaces/IServerService.cs index 920f696..238da9c 100644 --- a/backend/Services/IServerService.cs +++ b/backend/src/Core/Interfaces/IServerService.cs @@ -1,6 +1,6 @@ -using JellyGlass.Models; +using JellyGlass.Core.Entities; -namespace JellyGlass.Services; +namespace JellyGlass.Core.Interfaces; public interface IServerService { diff --git a/backend/src/Infrastructure/Infrastructure.csproj b/backend/src/Infrastructure/Infrastructure.csproj new file mode 100644 index 0000000..8a49582 --- /dev/null +++ b/backend/src/Infrastructure/Infrastructure.csproj @@ -0,0 +1,14 @@ + + + + + + + + + net9.0 + enable + enable + + + diff --git a/backend/src/Infrastructure/Repositories/ItemRepository.cs b/backend/src/Infrastructure/Repositories/ItemRepository.cs new file mode 100644 index 0000000..129e431 --- /dev/null +++ b/backend/src/Infrastructure/Repositories/ItemRepository.cs @@ -0,0 +1,4 @@ +using JellyGlass.Core.Entities; +using JellyGlass.Core.Interfaces; + +namespace JellyGlass.Infrastructure.Repositories; \ No newline at end of file diff --git a/backend/src/Infrastructure/Repositories/LibraryRepository.cs b/backend/src/Infrastructure/Repositories/LibraryRepository.cs new file mode 100644 index 0000000..49c02d5 --- /dev/null +++ b/backend/src/Infrastructure/Repositories/LibraryRepository.cs @@ -0,0 +1,12 @@ +using JellyGlass.Core.Entities; +using JellyGlass.Core.Interfaces; + +namespace JellyGlass.Infrastructure.Repositories; + +public class LibraryRepository : ILibraryRepository +{ + public Task GetLibraries() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/backend/src/Infrastructure/Repositories/ServerRepository.cs b/backend/src/Infrastructure/Repositories/ServerRepository.cs new file mode 100644 index 0000000..129e431 --- /dev/null +++ b/backend/src/Infrastructure/Repositories/ServerRepository.cs @@ -0,0 +1,4 @@ +using JellyGlass.Core.Entities; +using JellyGlass.Core.Interfaces; + +namespace JellyGlass.Infrastructure.Repositories; \ No newline at end of file diff --git a/backend/src/Infrastructure/Services/JellyfinApiClient.cs b/backend/src/Infrastructure/Services/JellyfinApiClient.cs new file mode 100644 index 0000000..572a1a2 --- /dev/null +++ b/backend/src/Infrastructure/Services/JellyfinApiClient.cs @@ -0,0 +1 @@ +namespace JellyGlass.Infrastructure.Services; \ No newline at end of file diff --git a/backend/src/JellyGlass.sln b/backend/src/JellyGlass.sln new file mode 100644 index 0000000..2d83437 --- /dev/null +++ b/backend/src/JellyGlass.sln @@ -0,0 +1,40 @@ + +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}") = "WebApi", "WebApi\WebApi.csproj", "{870696BA-371D-455E-B39A-7B3B14FDE62D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "Application\Application.csproj", "{5C6D5937-49DA-4758-9AE5-C1290975DBB4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "Infrastructure\Infrastructure.csproj", "{DFE2D8D3-3174-44D9-AC91-C129D208A37B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Core.csproj", "{7BA1276D-3AF5-4E09-B996-2D91556F8939}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {870696BA-371D-455E-B39A-7B3B14FDE62D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {870696BA-371D-455E-B39A-7B3B14FDE62D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {870696BA-371D-455E-B39A-7B3B14FDE62D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {870696BA-371D-455E-B39A-7B3B14FDE62D}.Release|Any CPU.Build.0 = Release|Any CPU + {5C6D5937-49DA-4758-9AE5-C1290975DBB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C6D5937-49DA-4758-9AE5-C1290975DBB4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C6D5937-49DA-4758-9AE5-C1290975DBB4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C6D5937-49DA-4758-9AE5-C1290975DBB4}.Release|Any CPU.Build.0 = Release|Any CPU + {DFE2D8D3-3174-44D9-AC91-C129D208A37B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DFE2D8D3-3174-44D9-AC91-C129D208A37B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DFE2D8D3-3174-44D9-AC91-C129D208A37B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DFE2D8D3-3174-44D9-AC91-C129D208A37B}.Release|Any CPU.Build.0 = Release|Any CPU + {7BA1276D-3AF5-4E09-B996-2D91556F8939}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7BA1276D-3AF5-4E09-B996-2D91556F8939}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7BA1276D-3AF5-4E09-B996-2D91556F8939}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7BA1276D-3AF5-4E09-B996-2D91556F8939}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/backend/Controllers/ItemController.cs b/backend/src/WebApi/Controllers/ItemController.cs similarity index 86% rename from backend/Controllers/ItemController.cs rename to backend/src/WebApi/Controllers/ItemController.cs index 9991096..289e173 100644 --- a/backend/Controllers/ItemController.cs +++ b/backend/src/WebApi/Controllers/ItemController.cs @@ -1,7 +1,7 @@ -using JellyGlass.Services; using Microsoft.AspNetCore.Mvc; +using JellyGlass.Core.Interfaces; -namespace JellyGlass.Controllers; +namespace JellyGlass.WebApi.Controllers; [ApiController] [Route("[controller]")] diff --git a/backend/Controllers/LibraryController.cs b/backend/src/WebApi/Controllers/LibraryController.cs similarity index 86% rename from backend/Controllers/LibraryController.cs rename to backend/src/WebApi/Controllers/LibraryController.cs index b249f3b..b10fb75 100644 --- a/backend/Controllers/LibraryController.cs +++ b/backend/src/WebApi/Controllers/LibraryController.cs @@ -1,7 +1,7 @@ -using JellyGlass.Services; using Microsoft.AspNetCore.Mvc; +using JellyGlass.Core.Interfaces; -namespace JellyGlass.Controllers; +namespace JellyGlass.WebApi.Controllers; [ApiController] [Route("[controller]")] diff --git a/backend/Controllers/ServerController.cs b/backend/src/WebApi/Controllers/ServerController.cs similarity index 85% rename from backend/Controllers/ServerController.cs rename to backend/src/WebApi/Controllers/ServerController.cs index 5afd779..9aa7147 100644 --- a/backend/Controllers/ServerController.cs +++ b/backend/src/WebApi/Controllers/ServerController.cs @@ -1,7 +1,7 @@ -using JellyGlass.Services; using Microsoft.AspNetCore.Mvc; +using JellyGlass.Core.Interfaces; -namespace JellyGlass.Controllers; +namespace JellyGlass.WebApi.Controllers; [ApiController] [Route("[controller]")] diff --git a/backend/Program.cs b/backend/src/WebApi/Program.cs similarity index 100% rename from backend/Program.cs rename to backend/src/WebApi/Program.cs diff --git a/backend/Properties/launchSettings.json b/backend/src/WebApi/Properties/launchSettings.json similarity index 80% rename from backend/Properties/launchSettings.json rename to backend/src/WebApi/Properties/launchSettings.json index eb90a59..89549ba 100644 --- a/backend/Properties/launchSettings.json +++ b/backend/src/WebApi/Properties/launchSettings.json @@ -5,7 +5,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "applicationUrl": "http://localhost:5097", + "applicationUrl": "http://localhost:5152", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -14,7 +14,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "applicationUrl": "https://localhost:7139;http://localhost:5097", + "applicationUrl": "https://localhost:7106;http://localhost:5152", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/backend/src/WebApi/WebApi.csproj b/backend/src/WebApi/WebApi.csproj new file mode 100644 index 0000000..b5cfb60 --- /dev/null +++ b/backend/src/WebApi/WebApi.csproj @@ -0,0 +1,19 @@ + + + + net9.0 + enable + enable + + + + + + + + + + + + + diff --git a/backend/src/WebApi/WebApi.http b/backend/src/WebApi/WebApi.http new file mode 100644 index 0000000..f3e4d2c --- /dev/null +++ b/backend/src/WebApi/WebApi.http @@ -0,0 +1,6 @@ +@WebApi_HostAddress = http://localhost:5152 + +GET {{WebApi_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/backend/appsettings.Development.json b/backend/src/WebApi/appsettings.Development.json similarity index 100% rename from backend/appsettings.Development.json rename to backend/src/WebApi/appsettings.Development.json diff --git a/backend/appsettings.json b/backend/src/WebApi/appsettings.json similarity index 100% rename from backend/appsettings.json rename to backend/src/WebApi/appsettings.json