Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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 cache/options
.vs/
.vscode/

# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates

# NuGet Packages
*.nupkg
*.snupkg
**/packages/*
!**/packages/build/
*.nuget.props
*.nuget.targets

# Test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*.VisualState.xml
TestResult.xml
[Dd]ebug[Pp]ublic/

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# Rider
.idea/
*.sln.iml

# Coverage
coverage/
*.coverage
*.coveragexml

# Others
*.log
*.tmp
.DS_Store
Thumbs.db
20 changes: 20 additions & 0 deletions src/AncientWisdom.API/AncientWisdom.API.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.20" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AncientWisdom.Application\AncientWisdom.Application.csproj" />
<ProjectReference Include="..\AncientWisdom.Infrastructure\AncientWisdom.Infrastructure.csproj" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions src/AncientWisdom.API/AncientWisdom.API.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@AncientWisdom.API_HostAddress = http://localhost:5002

GET {{AncientWisdom.API_HostAddress}}/weatherforecast/
Accept: application/json

###
31 changes: 31 additions & 0 deletions src/AncientWisdom.API/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Serilog;

var builder = WebApplication.CreateBuilder(args);

// Configure Serilog
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(builder.Configuration)
.CreateLogger();

builder.Host.UseSerilog();

// Add services
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddHealthChecks();

var app = builder.Build();

// Configure middleware
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();

// Health check endpoint
app.MapHealthChecks("/api/health");

app.Run();
41 changes: 41 additions & 0 deletions src/AncientWisdom.API/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:43431",
"sslPort": 44390
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5002",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7047;http://localhost:5002",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
8 changes: 8 additions & 0 deletions src/AncientWisdom.API/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
9 changes: 9 additions & 0 deletions src/AncientWisdom.API/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
13 changes: 13 additions & 0 deletions src/AncientWisdom.Application/AncientWisdom.Application.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\AncientWisdom.Domain\AncientWisdom.Domain.csproj" />
</ItemGroup>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Empty file.
Empty file.
Empty file.
9 changes: 9 additions & 0 deletions src/AncientWisdom.Domain/AncientWisdom.Domain.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\AncientWisdom.Domain\AncientWisdom.Domain.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.10">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
20 changes: 20 additions & 0 deletions src/AncientWisdom.Infrastructure/Data/ApplicationDbContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Microsoft.EntityFrameworkCore;

namespace AncientWisdom.Infrastructure.Data;

public class ApplicationDbContext : DbContext
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
: base(options)
{
}

// DbSets will be added as entities are created

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);

// Configurations will be added here
}
}
Empty file.
118 changes: 118 additions & 0 deletions src/AncientWisdom.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@

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}") = "AncientWisdom.Domain", "AncientWisdom.Domain\AncientWisdom.Domain.csproj", "{03682CB5-3FA2-4737-AD4C-61561DB44DA2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AncientWisdom.Application", "AncientWisdom.Application\AncientWisdom.Application.csproj", "{D806288C-3C49-4B5F-8A9E-9F07C0093544}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AncientWisdom.Infrastructure", "AncientWisdom.Infrastructure\AncientWisdom.Infrastructure.csproj", "{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AncientWisdom.API", "AncientWisdom.API\AncientWisdom.API.csproj", "{725FB6CA-4566-4796-8A29-1B4D4A2130F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AncientWisdom.UnitTests", "..\tests\AncientWisdom.UnitTests\AncientWisdom.UnitTests.csproj", "{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AncientWisdom.IntegrationTests", "..\tests\AncientWisdom.IntegrationTests\AncientWisdom.IntegrationTests.csproj", "{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AncientWisdom.BDD.Tests", "..\tests\AncientWisdom.BDD.Tests\AncientWisdom.BDD.Tests.csproj", "{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Debug|x64.ActiveCfg = Debug|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Debug|x64.Build.0 = Debug|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Debug|x86.ActiveCfg = Debug|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Debug|x86.Build.0 = Debug|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Release|Any CPU.Build.0 = Release|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Release|x64.ActiveCfg = Release|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Release|x64.Build.0 = Release|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Release|x86.ActiveCfg = Release|Any CPU
{03682CB5-3FA2-4737-AD4C-61561DB44DA2}.Release|x86.Build.0 = Release|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Debug|x64.ActiveCfg = Debug|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Debug|x64.Build.0 = Debug|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Debug|x86.ActiveCfg = Debug|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Debug|x86.Build.0 = Debug|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Release|Any CPU.Build.0 = Release|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Release|x64.ActiveCfg = Release|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Release|x64.Build.0 = Release|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Release|x86.ActiveCfg = Release|Any CPU
{D806288C-3C49-4B5F-8A9E-9F07C0093544}.Release|x86.Build.0 = Release|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Debug|x64.ActiveCfg = Debug|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Debug|x64.Build.0 = Debug|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Debug|x86.ActiveCfg = Debug|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Debug|x86.Build.0 = Debug|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Release|Any CPU.Build.0 = Release|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Release|x64.ActiveCfg = Release|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Release|x64.Build.0 = Release|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Release|x86.ActiveCfg = Release|Any CPU
{7EFADA54-5B09-4B5E-A912-C7DA24D7F948}.Release|x86.Build.0 = Release|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Debug|x64.ActiveCfg = Debug|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Debug|x64.Build.0 = Debug|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Debug|x86.ActiveCfg = Debug|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Debug|x86.Build.0 = Debug|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Release|Any CPU.Build.0 = Release|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Release|x64.ActiveCfg = Release|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Release|x64.Build.0 = Release|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Release|x86.ActiveCfg = Release|Any CPU
{725FB6CA-4566-4796-8A29-1B4D4A2130F3}.Release|x86.Build.0 = Release|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Debug|x64.ActiveCfg = Debug|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Debug|x64.Build.0 = Debug|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Debug|x86.ActiveCfg = Debug|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Debug|x86.Build.0 = Debug|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Release|Any CPU.Build.0 = Release|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Release|x64.ActiveCfg = Release|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Release|x64.Build.0 = Release|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Release|x86.ActiveCfg = Release|Any CPU
{F9143F7A-F3AB-4F81-8A67-19A2BFDCDF91}.Release|x86.Build.0 = Release|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Debug|x64.ActiveCfg = Debug|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Debug|x64.Build.0 = Debug|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Debug|x86.ActiveCfg = Debug|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Debug|x86.Build.0 = Debug|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Release|Any CPU.Build.0 = Release|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Release|x64.ActiveCfg = Release|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Release|x64.Build.0 = Release|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Release|x86.ActiveCfg = Release|Any CPU
{EFBBAACC-81E4-4C80-A278-FC47F94E32BF}.Release|x86.Build.0 = Release|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Debug|x64.ActiveCfg = Debug|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Debug|x64.Build.0 = Debug|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Debug|x86.ActiveCfg = Debug|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Debug|x86.Build.0 = Debug|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Release|Any CPU.Build.0 = Release|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Release|x64.ActiveCfg = Release|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Release|x64.Build.0 = Release|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Release|x86.ActiveCfg = Release|Any CPU
{A58C5AAC-2EB7-4583-BF66-9B74B310AFBC}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
25 changes: 25 additions & 0 deletions tests/AncientWisdom.BDD.Tests/AncientWisdom.BDD.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="SpecFlow" Version="3.9.74" />
<PackageReference Include="SpecFlow.xUnit" Version="3.9.74" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

</Project>
Empty file.
Empty file.
Loading
Loading