diff --git a/.github/template/apply.sh b/.github/template/apply.sh
deleted file mode 100755
index 974b2f1..0000000
--- a/.github/template/apply.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-repository=$1
-
-REPO_NAME=$(echo "${repository}" | awk -F '/' '{print $2}')
-REPO_NAME_PASCAL_CASE=$(echo "$REPO_NAME" | sed -r 's/(^|-)([a-z])/\U\2/g')
-
-echo "applying template..."
-
-echo "renaming cdp-dotnet-backend-template -> ${REPO_NAME}"
-find . -name .git -prune -o -name .github -prune -o -type f -exec sed -i "s/cdp-dotnet-backend-template/${REPO_NAME}/g" {} \;
-
-echo "Backend.Api -> ${REPO_NAME_PASCAL_CASE}"
-find . -name .git -prune -o -name .github -prune -o -type f -exec sed -i "s/Backend\.Api/${REPO_NAME_PASCAL_CASE}/g" {} \;
-
-echo "CDP C# ASP\.NET Backend Template -> ${REPO_NAME}"
-find . -name .git -prune -o -name .github -prune -o -type f -exec sed -i "s/CDP C# ASP\.NET Backend Template/${REPO_NAME}/g" {} \;
-
-echo "Moving Backend\.Api* -> ${REPO_NAME_PASCAL_CASE}"
-mv './Backend.Api/Backend.Api.csproj' "./Backend.Api/${REPO_NAME_PASCAL_CASE}.csproj"
-mv './Backend.Api.Test/Backend.Api.Test.csproj' "./Backend.Api.Test/${REPO_NAME_PASCAL_CASE}.Test.csproj"
-mv './Backend.Api' "${REPO_NAME_PASCAL_CASE}"
-mv './Backend.Api.Test' "${REPO_NAME_PASCAL_CASE}.Test"
-
-echo "Renaming CdpDotnetBackendTemplate.sln -> ${REPO_NAME_PASCAL_CASE}.sln"
-mv CdpDotnetBackendTemplate.sln "${REPO_NAME_PASCAL_CASE}".sln
-
-tree
\ No newline at end of file
diff --git a/.github/template/cleanup.sh b/.github/template/cleanup.sh
deleted file mode 100755
index 0a0b421..0000000
--- a/.github/template/cleanup.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-rm .github/workflows/template.yml
-rm .github/workflows/validate-template.yml
-rm -rf .github/template/
diff --git a/.github/template/template-compose.yml b/.github/template/template-compose.yml
deleted file mode 100644
index 9ab8147..0000000
--- a/.github/template/template-compose.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-services:
- mongodb:
- container_name: mongodb
- networks:
- - cdp-network
- image: mongo:6.0.13
- volumes:
- - ./ssl:/etc/ssl:ro
- command: [
- "--tlsMode", "requireTLS",
- "--tlsCertificateKeyFile", "etc/ssl/mongodb.pem"
- ]
- service:
- build:
- context: ../..
- container_name: cdp-dotnet-backend-template
- image: cdp-dotnet-backend-template
- networks:
- - cdp-network
- ports:
- - "8085:8085"
- depends_on:
- - mongodb
- environment:
- ASPNETCORE_URLS: "http://+:8085"
- Mongo__DatabaseUri: "mongodb://mongodb:27017/?tls=true"
- TRUSTSTORE_MONGO: ${MONGODB_TEST_CA_PEM}
-
-networks:
- cdp-network:
- driver: bridge
-
diff --git a/.github/template/validate.sh b/.github/template/validate.sh
deleted file mode 100755
index 936db84..0000000
--- a/.github/template/validate.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/bash
-
-compose_file='.github/template/template-compose.yml'
-
-checkUrl() {
- URL=$1
-
- set +e
- # Call the URL and get the HTTP status code
- HTTP_STATUS=$(curl -o /dev/null -s -w "%{http_code}\n" "$URL")
- set -e
-
- # Check if the HTTP status code is 200
- if [ "$HTTP_STATUS" -eq 200 ]; then
- echo " ✔ $URL returned a 200 OK status."
- return 0
- else
- echo " ❌ $URL returned a status of $HTTP_STATUS. Exiting with code 1."
- return 1
- fi
-}
-
-checkLogSchema() {
- set +e
- local log
- log=$(docker compose -f "$compose_file" logs service -n 1 --no-color --no-log-prefix 2>/dev/null)
-
- # Check if jq validation was successful
- if echo "$log" | jq empty > /dev/null; then
- echo " ✔ Log entry is valid JSON."
- set -e
- return 0
- else
- echo " ❌ Log entry is not valid JSON."
- set -e
- return 1
- fi
-}
-
-setup() {
- set -e
- # Generate Self Signed Certs
- mkdir -p .github/template/ssl
- openssl req -newkey rsa:2048 -new -x509 -days 365 -nodes -out .github/template/ssl/mongodb-cert.crt -keyout .github/template/ssl/mongodb-cert.key \
- -subj "/C=UK/ST=STATE/L=CITY/O=ORG_NAME/OU=OU_NAME/CN=mongodb" \
- -addext "subjectAltName = DNS:localhost, DNS:mongodb"
- cat .github/template/ssl/mongodb-cert.key .github/template/ssl/mongodb-cert.crt > .github/template/ssl/mongodb.pem
- mongodbTestCaPem="$(cat .github/template/ssl/mongodb.pem | base64)"
- export MONGODB_TEST_CA_PEM=$mongodbTestCaPem
-
- # Start mongodb + templated service
- docker compose -f "$compose_file" up --wait --wait-timeout 60 -d --quiet-pull
- sleep 3
-}
-
-# Stop docker on exist and cleanup tmp files
-cleanup() {
- rv=$?
- echo "cleaning up $rv"
- rm -f .github/template/ssl/*
- docker compose -f "$compose_file" down
- exit $rv
-}
-trap cleanup EXIT
-
-run_tests() {
- # Run the tests
- echo "-- Running template tests ---"
-
- # Check endpoints respond
- checkUrl "http://localhost:8085/health"
- checkUrl "http://localhost:8085/example"
-
- # Check its using ECS
- checkLogSchema
-}
-
-# Start Docker
-setup
-run_tests
-
diff --git a/.github/workflows/template.yml b/.github/workflows/template.yml
deleted file mode 100644
index 22d4091..0000000
--- a/.github/workflows/template.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-name: Templating
-
-on:
- push:
- branches:
- - main
-
-permissions:
- id-token: write
- contents: write
- pull-requests: write
-
-jobs:
- templating:
- if: github.run_number == 1 && github.repository != 'cdp-dotnet-backend-template'
- name: CDP-templating-workflow
- runs-on: ubuntu-latest
- steps:
- - name: Check out code
- uses: actions/checkout@v3
- - name: Apply template
- run: |
- .github/template/apply.sh ${{ github.repository }}
- - name: Cleanup
- run: |
- .github/template/cleanup.sh
- - name: Commit and push changes
- run: |
- git config --global user.name 'GitHub Actions'
- git config --global user.email 'github-actions@github.com'
- git add -A
- git commit -m "Applying template changes"
- git push origin main
diff --git a/.github/workflows/validate-template.yml b/.github/workflows/validate-template.yml
deleted file mode 100644
index a3b211a..0000000
--- a/.github/workflows/validate-template.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: Validate Template
-
-on:
- pull_request:
- branches:
- - main
- types:
- - opened
- - edited
- - reopened
- - synchronize
- - ready_for_review
-
-jobs:
- pr-validator:
- name: Run Pull Request Checks
- runs-on: ubuntu-latest
- steps:
- - name: Check out code
- uses: actions/checkout@v4
- - name: Apply template
- run: .github/template/apply.sh DEFRA/service-backend
- - name: Check container starts in production-like mode
- run: .github/template/validate.sh
diff --git a/Backend.Api.Test/Backend.Api.Test.csproj b/BtmsBackend.Test/BtmsBackend.Test.csproj
similarity index 94%
rename from Backend.Api.Test/Backend.Api.Test.csproj
rename to BtmsBackend.Test/BtmsBackend.Test.csproj
index eb5bd83..e18e371 100644
--- a/Backend.Api.Test/Backend.Api.Test.csproj
+++ b/BtmsBackend.Test/BtmsBackend.Test.csproj
@@ -28,6 +28,6 @@
-
+
diff --git a/Backend.Api.Test/Config/EnvironmentTest.cs b/BtmsBackend.Test/Config/EnvironmentTest.cs
similarity index 68%
rename from Backend.Api.Test/Config/EnvironmentTest.cs
rename to BtmsBackend.Test/Config/EnvironmentTest.cs
index dddc229..925e56b 100644
--- a/Backend.Api.Test/Config/EnvironmentTest.cs
+++ b/BtmsBackend.Test/Config/EnvironmentTest.cs
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Builder;
-namespace Backend.Api.Test.Config;
+namespace BtmsBackend.Test.Config;
public class EnvironmentTest
{
@@ -10,7 +10,7 @@ public void IsNotDevModeByDefault()
{
var _builder = WebApplication.CreateBuilder();
- var isDev = Backend.Api.Config.Environment.IsDevMode(_builder);
+ var isDev = BtmsBackend.Config.Environment.IsDevMode(_builder);
Assert.False(isDev);
}
diff --git a/Backend.Api.Test/Example/Services/ExamplePersistenceTests.cs b/BtmsBackend.Test/Example/Services/ExamplePersistenceTests.cs
similarity index 94%
rename from Backend.Api.Test/Example/Services/ExamplePersistenceTests.cs
rename to BtmsBackend.Test/Example/Services/ExamplePersistenceTests.cs
index b91b2c4..683f309 100644
--- a/Backend.Api.Test/Example/Services/ExamplePersistenceTests.cs
+++ b/BtmsBackend.Test/Example/Services/ExamplePersistenceTests.cs
@@ -1,14 +1,14 @@
using MongoDB.Driver;
-using Backend.Api.Utils.Mongo;
+using BtmsBackend.Utils.Mongo;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using NSubstitute;
-using Backend.Api.Example.Models;
-using Backend.Api.Example.Services;
+using BtmsBackend.Example.Models;
+using BtmsBackend.Example.Services;
using FluentAssertions;
using MongoDB.Bson;
-namespace Backend.Api.Test.Example.Services;
+namespace BtmsBackend.Test.Example.Services;
public class ExamplePersistenceTests
{
diff --git a/Backend.Api.Test/Example/Validators/ExampleValidatorTests.cs b/BtmsBackend.Test/Example/Validators/ExampleValidatorTests.cs
similarity index 92%
rename from Backend.Api.Test/Example/Validators/ExampleValidatorTests.cs
rename to BtmsBackend.Test/Example/Validators/ExampleValidatorTests.cs
index 25a2589..e721dc2 100644
--- a/Backend.Api.Test/Example/Validators/ExampleValidatorTests.cs
+++ b/BtmsBackend.Test/Example/Validators/ExampleValidatorTests.cs
@@ -1,9 +1,9 @@
-using Backend.Api.Example.Models;
-using Backend.Api.Example.Validators;
+using BtmsBackend.Example.Models;
+using BtmsBackend.Example.Validators;
using FluentValidation.TestHelper;
using MongoDB.Bson;
-namespace Backend.Api.Test.Example.Validators;
+namespace BtmsBackend.Test.Example.Validators;
public class ExampleValidatorTests
{
diff --git a/Backend.Api.Test/Utils/Http/ProxyTest.cs b/BtmsBackend.Test/Utils/Http/ProxyTest.cs
similarity index 97%
rename from Backend.Api.Test/Utils/Http/ProxyTest.cs
rename to BtmsBackend.Test/Utils/Http/ProxyTest.cs
index 7121fa4..5a50726 100644
--- a/Backend.Api.Test/Utils/Http/ProxyTest.cs
+++ b/BtmsBackend.Test/Utils/Http/ProxyTest.cs
@@ -1,4 +1,4 @@
-using Backend.Api.Utils.Http;
+using BtmsBackend.Utils.Http;
using NSubstitute;
using Microsoft.Extensions.Logging.Abstractions;
using FluentAssertions;
@@ -6,7 +6,7 @@
using Elastic.CommonSchema;
using Serilog;
-namespace Backend.Api.Test.Utils.Http;
+namespace BtmsBackend.Test.Utils.Http;
public class ProxyTest
{
diff --git a/Backend.Api.Test/Utils/Mongo/MongoServiceTest.cs b/BtmsBackend.Test/Utils/Mongo/MongoServiceTest.cs
similarity index 98%
rename from Backend.Api.Test/Utils/Mongo/MongoServiceTest.cs
rename to BtmsBackend.Test/Utils/Mongo/MongoServiceTest.cs
index 0ce21ed..93e2ab7 100644
--- a/Backend.Api.Test/Utils/Mongo/MongoServiceTest.cs
+++ b/BtmsBackend.Test/Utils/Mongo/MongoServiceTest.cs
@@ -2,9 +2,9 @@
using MongoDB.Driver;
using NSubstitute;
using Microsoft.Extensions.Logging.Abstractions;
-using Backend.Api.Utils.Mongo;
+using BtmsBackend.Utils.Mongo;
-namespace Backend.Api.Tests.Utils.Mongo
+namespace BtmsBackend.Tests.Utils.Mongo
{
public class MongoServiceTests
{
diff --git a/CdpDotnetBackendTemplate.sln b/BtmsBackend.sln
similarity index 81%
rename from CdpDotnetBackendTemplate.sln
rename to BtmsBackend.sln
index 8cb2d17..514d5dd 100644
--- a/CdpDotnetBackendTemplate.sln
+++ b/BtmsBackend.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}") = "Backend.Api", "Backend.Api\Backend.Api.csproj", "{7D935959-D3BE-4EDC-BAEC-541C72741633}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BtmsBackend", "BtmsBackend\BtmsBackend.csproj", "{7D935959-D3BE-4EDC-BAEC-541C72741633}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Backend.Api.Test", "Backend.Api.Test\Backend.Api.Test.csproj", "{5CB86A4A-162D-4A20-9403-5BB89D671BF6}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BtmsBackend.Test", "BtmsBackend.Test\BtmsBackend.Test.csproj", "{5CB86A4A-162D-4A20-9403-5BB89D671BF6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Backend.Api/Backend.Api.csproj b/BtmsBackend/BtmsBackend.csproj
similarity index 100%
rename from Backend.Api/Backend.Api.csproj
rename to BtmsBackend/BtmsBackend.csproj
diff --git a/Backend.Api/Config/Environment.cs b/BtmsBackend/Config/Environment.cs
similarity index 85%
rename from Backend.Api/Config/Environment.cs
rename to BtmsBackend/Config/Environment.cs
index 35a23d0..6f2b960 100644
--- a/Backend.Api/Config/Environment.cs
+++ b/BtmsBackend/Config/Environment.cs
@@ -1,4 +1,4 @@
-namespace Backend.Api.Config;
+namespace BtmsBackend.Config;
public static class Environment
{
diff --git a/Backend.Api/Example/Endpoints/ExampleEndpoints.cs b/BtmsBackend/Example/Endpoints/ExampleEndpoints.cs
similarity index 95%
rename from Backend.Api/Example/Endpoints/ExampleEndpoints.cs
rename to BtmsBackend/Example/Endpoints/ExampleEndpoints.cs
index 66e246c..140ae07 100644
--- a/Backend.Api/Example/Endpoints/ExampleEndpoints.cs
+++ b/BtmsBackend/Example/Endpoints/ExampleEndpoints.cs
@@ -1,10 +1,10 @@
-using Backend.Api.Example.Models;
-using Backend.Api.Example.Services;
+using BtmsBackend.Example.Models;
+using BtmsBackend.Example.Services;
using FluentValidation;
using FluentValidation.Results;
using System.Diagnostics.CodeAnalysis;
-namespace Backend.Api.Example.Endpoints;
+namespace BtmsBackend.Example.Endpoints;
[ExcludeFromCodeCoverage]
public static class ExampleEndpoints
diff --git a/Backend.Api/Example/Models/ExampleModel.cs b/BtmsBackend/Example/Models/ExampleModel.cs
similarity index 93%
rename from Backend.Api/Example/Models/ExampleModel.cs
rename to BtmsBackend/Example/Models/ExampleModel.cs
index 7d14a61..dd4e8f1 100644
--- a/Backend.Api/Example/Models/ExampleModel.cs
+++ b/BtmsBackend/Example/Models/ExampleModel.cs
@@ -3,7 +3,7 @@
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.IdGenerators;
-namespace Backend.Api.Example.Models;
+namespace BtmsBackend.Example.Models;
public class ExampleModel
{
diff --git a/Backend.Api/Example/Services/ExamplePersistence.cs b/BtmsBackend/Example/Services/ExamplePersistence.cs
similarity index 96%
rename from Backend.Api/Example/Services/ExamplePersistence.cs
rename to BtmsBackend/Example/Services/ExamplePersistence.cs
index dfce81f..b7a9592 100644
--- a/Backend.Api/Example/Services/ExamplePersistence.cs
+++ b/BtmsBackend/Example/Services/ExamplePersistence.cs
@@ -1,9 +1,9 @@
-using Backend.Api.Example.Models;
-using Backend.Api.Utils.Mongo;
+using BtmsBackend.Example.Models;
+using BtmsBackend.Utils.Mongo;
using MongoDB.Driver;
using System.Diagnostics.CodeAnalysis;
-namespace Backend.Api.Example.Services;
+namespace BtmsBackend.Example.Services;
public interface IExamplePersistence
{
diff --git a/Backend.Api/Example/Validators/ExampleValidator.cs b/BtmsBackend/Example/Validators/ExampleValidator.cs
similarity index 87%
rename from Backend.Api/Example/Validators/ExampleValidator.cs
rename to BtmsBackend/Example/Validators/ExampleValidator.cs
index 7240889..f9b0a38 100644
--- a/Backend.Api/Example/Validators/ExampleValidator.cs
+++ b/BtmsBackend/Example/Validators/ExampleValidator.cs
@@ -1,7 +1,7 @@
-using Backend.Api.Example.Models;
+using BtmsBackend.Example.Models;
using FluentValidation;
-namespace Backend.Api.Example.Validators;
+namespace BtmsBackend.Example.Validators;
public class ExampleValidator : AbstractValidator
{
diff --git a/Backend.Api/Program.cs b/BtmsBackend/Program.cs
similarity index 92%
rename from Backend.Api/Program.cs
rename to BtmsBackend/Program.cs
index 485105c..8afa891 100644
--- a/Backend.Api/Program.cs
+++ b/BtmsBackend/Program.cs
@@ -1,9 +1,9 @@
-using Backend.Api.Example.Endpoints;
-using Backend.Api.Example.Services;
-using Backend.Api.Utils;
-using Backend.Api.Utils.Http;
-using Backend.Api.Utils.Logging;
-using Backend.Api.Utils.Mongo;
+using BtmsBackend.Example.Endpoints;
+using BtmsBackend.Example.Services;
+using BtmsBackend.Utils;
+using BtmsBackend.Utils.Http;
+using BtmsBackend.Utils.Logging;
+using BtmsBackend.Utils.Mongo;
using FluentValidation;
using Serilog;
using Serilog.Core;
diff --git a/Backend.Api/Properties/launchSettings.json b/BtmsBackend/Properties/launchSettings.json
similarity index 92%
rename from Backend.Api/Properties/launchSettings.json
rename to BtmsBackend/Properties/launchSettings.json
index d9531c6..f5bf1f3 100644
--- a/Backend.Api/Properties/launchSettings.json
+++ b/BtmsBackend/Properties/launchSettings.json
@@ -1,6 +1,6 @@
{
"profiles": {
- "Backend.Api": {
+ "BtmsBackend": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
diff --git a/Backend.Api/Utils/Http/Proxy.cs b/BtmsBackend/Utils/Http/Proxy.cs
similarity index 98%
rename from Backend.Api/Utils/Http/Proxy.cs
rename to BtmsBackend/Utils/Http/Proxy.cs
index 74b08ae..f338ba3 100644
--- a/Backend.Api/Utils/Http/Proxy.cs
+++ b/BtmsBackend/Utils/Http/Proxy.cs
@@ -2,7 +2,7 @@
using Serilog.Core;
using System.Diagnostics.CodeAnalysis;
-namespace Backend.Api.Utils.Http;
+namespace BtmsBackend.Utils.Http;
public static class Proxy
{
diff --git a/Backend.Api/Utils/Logging/LogLevelMapper.cs b/BtmsBackend/Utils/Logging/LogLevelMapper.cs
similarity index 95%
rename from Backend.Api/Utils/Logging/LogLevelMapper.cs
rename to BtmsBackend/Utils/Logging/LogLevelMapper.cs
index b6b1c5f..0ca854d 100644
--- a/Backend.Api/Utils/Logging/LogLevelMapper.cs
+++ b/BtmsBackend/Utils/Logging/LogLevelMapper.cs
@@ -2,7 +2,7 @@
using Serilog.Events;
using System.Diagnostics.CodeAnalysis;
-namespace Backend.Api.Utils.Logging;
+namespace BtmsBackend.Utils.Logging;
[ExcludeFromCodeCoverage]
/**
diff --git a/Backend.Api/Utils/Mongo/IMongoDbClientFactory.cs b/BtmsBackend/Utils/Mongo/IMongoDbClientFactory.cs
similarity index 81%
rename from Backend.Api/Utils/Mongo/IMongoDbClientFactory.cs
rename to BtmsBackend/Utils/Mongo/IMongoDbClientFactory.cs
index 9e85064..d017e41 100644
--- a/Backend.Api/Utils/Mongo/IMongoDbClientFactory.cs
+++ b/BtmsBackend/Utils/Mongo/IMongoDbClientFactory.cs
@@ -1,6 +1,6 @@
using MongoDB.Driver;
-namespace Backend.Api.Utils.Mongo;
+namespace BtmsBackend.Utils.Mongo;
public interface IMongoDbClientFactory
{
diff --git a/Backend.Api/Utils/Mongo/MongoDbClientFactory.cs b/BtmsBackend/Utils/Mongo/MongoDbClientFactory.cs
similarity index 97%
rename from Backend.Api/Utils/Mongo/MongoDbClientFactory.cs
rename to BtmsBackend/Utils/Mongo/MongoDbClientFactory.cs
index f315f16..a1f6937 100644
--- a/Backend.Api/Utils/Mongo/MongoDbClientFactory.cs
+++ b/BtmsBackend/Utils/Mongo/MongoDbClientFactory.cs
@@ -2,7 +2,7 @@
using MongoDB.Driver;
using System.Diagnostics.CodeAnalysis;
-namespace Backend.Api.Utils.Mongo;
+namespace BtmsBackend.Utils.Mongo;
[ExcludeFromCodeCoverage]
diff --git a/Backend.Api/Utils/Mongo/MongoService.cs b/BtmsBackend/Utils/Mongo/MongoService.cs
similarity index 97%
rename from Backend.Api/Utils/Mongo/MongoService.cs
rename to BtmsBackend/Utils/Mongo/MongoService.cs
index 11cd952..1afe84f 100644
--- a/Backend.Api/Utils/Mongo/MongoService.cs
+++ b/BtmsBackend/Utils/Mongo/MongoService.cs
@@ -1,7 +1,7 @@
using MongoDB.Driver;
using System.Diagnostics.CodeAnalysis;
-namespace Backend.Api.Utils.Mongo;
+namespace BtmsBackend.Utils.Mongo;
[ExcludeFromCodeCoverage]
public abstract class MongoService
diff --git a/Backend.Api/Utils/TrustStore.cs b/BtmsBackend/Utils/TrustStore.cs
similarity index 98%
rename from Backend.Api/Utils/TrustStore.cs
rename to BtmsBackend/Utils/TrustStore.cs
index 239de65..2e64a58 100644
--- a/Backend.Api/Utils/TrustStore.cs
+++ b/BtmsBackend/Utils/TrustStore.cs
@@ -4,7 +4,7 @@
using Serilog.Core;
using System.Diagnostics.CodeAnalysis;
-namespace Backend.Api.Utils;
+namespace BtmsBackend.Utils;
[ExcludeFromCodeCoverage]
public static class TrustStore
diff --git a/Backend.Api/appsettings.Development.json b/BtmsBackend/appsettings.Development.json
similarity index 92%
rename from Backend.Api/appsettings.Development.json
rename to BtmsBackend/appsettings.Development.json
index baee8e1..1ef8d85 100644
--- a/Backend.Api/appsettings.Development.json
+++ b/BtmsBackend/appsettings.Development.json
@@ -1,7 +1,7 @@
{
"Mongo": {
"DatabaseUri": "mongodb://127.0.0.1:27017",
- "DatabaseName": "cdp-dotnet-backend-template"
+ "DatabaseName": "btms-backend"
},
"DetailedErrors": true,
"AllowedHosts": "*",
diff --git a/Backend.Api/appsettings.json b/BtmsBackend/appsettings.json
similarity index 92%
rename from Backend.Api/appsettings.json
rename to BtmsBackend/appsettings.json
index aa16f77..3aa3873 100644
--- a/Backend.Api/appsettings.json
+++ b/BtmsBackend/appsettings.json
@@ -1,7 +1,7 @@
{
"Mongo": {
"DatabaseUri": "mongodb://set-automatically-when-deployed/admin?authSource=$external&authMechanism=MONGODB-AWS",
- "DatabaseName": "cdp-dotnet-backend-template"
+ "DatabaseName": "btms-backend"
},
"AllowedHosts": "*",
"Serilog": {
diff --git a/Dockerfile b/Dockerfile
index 3934eb6..452f7e8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,10 +19,10 @@ COPY . .
WORKDIR "/src"
# unit test and code coverage
-RUN dotnet test Backend.Api.Test
+RUN dotnet test BtmsBackend.Test
FROM build AS publish
-RUN dotnet publish Backend.Api -c Release -o /app/publish /p:UseAppHost=false
+RUN dotnet publish BtmsBackend -c Release -o /app/publish /p:UseAppHost=false
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
@@ -32,4 +32,4 @@ FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
EXPOSE 8085
-ENTRYPOINT ["dotnet", "Backend.Api.dll"]
+ENTRYPOINT ["dotnet", "BtmsBackend.dll"]
diff --git a/README.md b/README.md
index a412893..a6ae9b3 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# CDP C# ASP.NET Backend Template
+# btms-backend
Core delivery C# ASP.NET backend template.
@@ -37,7 +37,7 @@ dotnet test
Run CDP-Deployments application:
```bash
-dotnet run --project Backend.Api --launch-profile Development
+dotnet run --project BtmsBackend --launch-profile Development
```
### SonarCloud