coalesce-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/template/.editorconfig +10 -0
- package/dist/template/.gitattributes +4 -0
- package/dist/template/.github/workflows/build-test-and-deploy.yml +104 -0
- package/dist/template/.mcp.json +9 -0
- package/dist/template/.template.config/template.json +418 -0
- package/dist/template/.vscode/extensions.json +15 -0
- package/dist/template/.vscode/mcp.json +8 -0
- package/dist/template/.vscode/settings.json +12 -0
- package/dist/template/Coalesce.Starter.Vue.AppHost/AppHost.cs +31 -0
- package/dist/template/Coalesce.Starter.Vue.AppHost/Coalesce.Starter.Vue.AppHost.csproj +27 -0
- package/dist/template/Coalesce.Starter.Vue.AppHost/Properties/launchSettings.json +21 -0
- package/dist/template/Coalesce.Starter.Vue.AppHost/appsettings.json +13 -0
- package/dist/template/Coalesce.Starter.Vue.Data/AppDbContext.cs +332 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Auth/AppClaimTypes.cs +27 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Auth/ClaimsPrincipalExtensions.cs +33 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Auth/ClaimsPrincipalFactory.cs +96 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Auth/DbContextFactoryExtensions.cs +18 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Auth/InvitationService.cs +117 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Auth/Permission.cs +20 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Auth/SecurityService.cs +43 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Auth/UserInfo.cs +20 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Auth/UserInvitation.cs +12 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Auth/UserManagementService.cs +102 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Coalesce/AppBehaviors.cs +9 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Coalesce/AppDataSource.cs +9 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Coalesce/AuditOperationContext.cs +33 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Coalesce.Starter.Vue.Data.csproj +36 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Communication/AzureEmailOptions.cs +15 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Communication/AzureEmailService.cs +56 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Communication/IEmailService.cs +6 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Communication/NoOpEmailService.cs +24 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Communication/SendGridEmailOptions.cs +8 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Communication/SendGridEmailService.cs +63 -0
- package/dist/template/Coalesce.Starter.Vue.Data/DatabaseSeeder.cs +91 -0
- package/dist/template/Coalesce.Starter.Vue.Data/DevelopmentAppDbContextFactory.cs +18 -0
- package/dist/template/Coalesce.Starter.Vue.Data/GlobalUsings.cs +19 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/AuditLog.cs +47 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/Role.cs +119 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/Tenancy/ITenanted.cs +10 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/Tenancy/Tenant.cs +69 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/Tenancy/TenantMembership.cs +13 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/Tenancy/TenantedBase.cs +14 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/TrackingBase.cs +49 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/User.cs +294 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/UserPhoto.cs +20 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/UserRole.cs +101 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Models/Widget.cs +30 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Services/AIAgentService.cs +93 -0
- package/dist/template/Coalesce.Starter.Vue.Data/Utilities/QueryableExtensions.cs +13 -0
- package/dist/template/Coalesce.Starter.Vue.Data.Test/Coalesce.Starter.Vue.Data.Test.csproj +35 -0
- package/dist/template/Coalesce.Starter.Vue.Data.Test/UnitTest1.cs +27 -0
- package/dist/template/Coalesce.Starter.Vue.Data.Test/Utilities/AppDbContextForSqlite.cs +25 -0
- package/dist/template/Coalesce.Starter.Vue.Data.Test/Utilities/AssertionExtensions.cs +71 -0
- package/dist/template/Coalesce.Starter.Vue.Data.Test/Utilities/SqliteDatabaseFixture.cs +64 -0
- package/dist/template/Coalesce.Starter.Vue.Data.Test/Utilities/TestBase.cs +137 -0
- package/dist/template/Coalesce.Starter.Vue.Web/.vscode/extensions.json +15 -0
- package/dist/template/Coalesce.Starter.Vue.Web/.vscode/mcp.json +8 -0
- package/dist/template/Coalesce.Starter.Vue.Web/.vscode/settings.json +10 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Coalesce.Starter.Vue.Web.csproj +53 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Controllers/HomeController.cs +54 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/ConfirmEmail.cshtml +18 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/ConfirmEmail.cshtml.cs +52 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/CreateTenant.cshtml +21 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/CreateTenant.cshtml.cs +43 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/ExternalLogin.cshtml +19 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/ExternalLogin.cshtml.cs +379 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/ForgotPassword.cshtml +31 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/ForgotPassword.cshtml.cs +46 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/Invitation.cshtml +34 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/Invitation.cshtml.cs +78 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/Register.cshtml +60 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/Register.cshtml.cs +79 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/ResetPassword.cshtml +38 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/ResetPassword.cshtml.cs +76 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/SelectTenant.cshtml +51 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/SelectTenant.cshtml.cs +56 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/SignIn.cshtml +75 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/SignIn.cshtml.cs +47 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/SignOut.cshtml +7 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/SignOut.cshtml.cs +21 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/_Layout.cshtml +80 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/_ViewImports.cshtml +3 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Pages/_ViewStart.cshtml +3 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Program.cs +232 -0
- package/dist/template/Coalesce.Starter.Vue.Web/ProgramAuthConfiguration.cs +171 -0
- package/dist/template/Coalesce.Starter.Vue.Web/ProgramServiceDefaults.cs +131 -0
- package/dist/template/Coalesce.Starter.Vue.Web/Properties/launchSettings.json +16 -0
- package/dist/template/Coalesce.Starter.Vue.Web/appsettings.json +59 -0
- package/dist/template/Coalesce.Starter.Vue.Web/eslint.config.mjs +54 -0
- package/dist/template/Coalesce.Starter.Vue.Web/index.html +73 -0
- package/dist/template/Coalesce.Starter.Vue.Web/package-lock.json +6054 -0
- package/dist/template/Coalesce.Starter.Vue.Web/package.json +47 -0
- package/dist/template/Coalesce.Starter.Vue.Web/public/favicon.ico +0 -0
- package/dist/template/Coalesce.Starter.Vue.Web/public/google-logo.svg +1 -0
- package/dist/template/Coalesce.Starter.Vue.Web/public/microsoft-logo.svg +1 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/App.vue +218 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/assets/logo.png +0 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/components/AIChat.vue +337 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/components/HelloWorld.spec.ts +12 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/components/HelloWorld.vue +283 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/components/display/UserAvatar.vue +66 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/composables/useForm.ts +23 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/composables/useTitle.ts +45 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/composables/useUser.ts +15 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/main.ts +116 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/router.ts +143 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/styles/site.scss +39 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/test-utils.ts +33 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/types/auto-imports.d.ts +79 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/types/env.d.ts +9 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/user-service.ts +88 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/views/Admin.vue +141 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/views/Home.vue +11 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/views/OpenAPI.vue +28 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/views/UserProfile.vue +294 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/views/WidgetEdit.spec.ts +28 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/views/WidgetEdit.vue +72 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/views/errors/Forbidden.vue +58 -0
- package/dist/template/Coalesce.Starter.Vue.Web/src/views/errors/NotFound.vue +4 -0
- package/dist/template/Coalesce.Starter.Vue.Web/tsconfig.json +27 -0
- package/dist/template/Coalesce.Starter.Vue.Web/tsconfig.node.json +10 -0
- package/dist/template/Coalesce.Starter.Vue.Web/vite.config.ts +109 -0
- package/dist/template/Coalesce.Starter.Vue.Web/web.config +14 -0
- package/dist/template/Coalesce.Starter.Vue.sln +97 -0
- package/dist/template/Directory.Build.props +21 -0
- package/dist/template/azure-pipelines.yml +85 -0
- package/dist/template/coalesce.json +16 -0
- package/dist/tools/coalesce-generate.d.ts +5 -0
- package/dist/tools/coalesce-generate.d.ts.map +1 -0
- package/dist/tools/coalesce-generate.js +94 -0
- package/dist/tools/coalesce-generate.js.map +1 -0
- package/dist/tools/template-features.d.ts +5 -0
- package/dist/tools/template-features.d.ts.map +1 -0
- package/dist/tools/template-features.js +330 -0
- package/dist/tools/template-features.js.map +1 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# coalesce-mcp
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server for [Coalesce](https://github.com/IntelliTect/Coalesce), providing AI assistants with code generation tools and template resources.
|
|
4
|
+
|
|
5
|
+
- Tool `coalesce_generate` - Runs Coalesce code generation
|
|
6
|
+
- Tool `coalesce_get_template_features` - Get files for Coalesce template features or list all available features
|
|
7
|
+
- Resource `coalesce://template-file/{filePath}` - Access Coalesce template files by path
|
|
8
|
+
|
|
9
|
+
Learn more about Coalesce [on GitHub](https://github.com/IntelliTect/Coalesce), or [read the documentation](https://intellitect.github.io/Coalesce/).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "tmcp";
|
|
3
|
+
import { ZodV3JsonSchemaAdapter } from "@tmcp/adapter-zod-v3";
|
|
4
|
+
import { StdioTransport } from "@tmcp/transport-stdio";
|
|
5
|
+
import { registerCoalesceCodeGenTool } from "./tools/coalesce-generate.js";
|
|
6
|
+
import { registerTemplateFeatureResource } from "./tools/template-features.js";
|
|
7
|
+
import packageJson from "../package.json" with { type: "json" };
|
|
8
|
+
// Create the adapter for Zod schema validation
|
|
9
|
+
const adapter = new ZodV3JsonSchemaAdapter();
|
|
10
|
+
// Create the MCP server
|
|
11
|
+
const server = new McpServer({
|
|
12
|
+
name: "coalesce-mcp",
|
|
13
|
+
version: packageJson.version,
|
|
14
|
+
description: "MCP server for IntelliTect's Coalesce framework.",
|
|
15
|
+
}, {
|
|
16
|
+
adapter,
|
|
17
|
+
capabilities: {
|
|
18
|
+
tools: { listChanged: true },
|
|
19
|
+
resources: { listChanged: true },
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
// Register tools and resources
|
|
23
|
+
registerCoalesceCodeGenTool(server);
|
|
24
|
+
registerTemplateFeatureResource(server);
|
|
25
|
+
// Start the server
|
|
26
|
+
const transport = new StdioTransport(server);
|
|
27
|
+
transport.listen();
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEhE,+CAA+C;AAC/C,MAAM,OAAO,GAAG,IAAI,sBAAsB,EAAE,CAAC;AAE7C,wBAAwB;AACxB,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B;IACE,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,WAAW,CAAC,OAAO;IAC5B,WAAW,EAAE,kDAAkD;CAChE,EACD;IACE,OAAO;IACP,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;QAC5B,SAAS,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;KACjC;CACF,CACF,CAAC;AAEF,+BAA+B;AAC/B,2BAA2B,CAAC,MAAM,CAAC,CAAC;AACpC,+BAA+B,CAAC,MAAM,CAAC,CAAC;AAExC,mBAAmB;AACnB,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;AAC7C,SAAS,CAAC,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
name: Build, Test, and Deploy Coalesce.Starter.Vue
|
|
2
|
+
|
|
3
|
+
# https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
pull_request:
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
# CONFIGURATION
|
|
12
|
+
# For help, go to https://github.com/Azure/Actions
|
|
13
|
+
#
|
|
14
|
+
# 1. Set up the production Environment in the GitHub Repository Settings.
|
|
15
|
+
# Environment Protection Rules are recommended to prevent accidental deployments.
|
|
16
|
+
# https://docs.github.com/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment#deployment-protection-rules
|
|
17
|
+
#
|
|
18
|
+
# 2. Set up the following secrets in your repository - https://docs.github.com/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-an-environment
|
|
19
|
+
# AZURE_WEBAPP_PUBLISH_PROFILE
|
|
20
|
+
#
|
|
21
|
+
# 3. Change these variables for your configuration:
|
|
22
|
+
env:
|
|
23
|
+
AZURE_WEBAPP_NAME: MY_WEBAPP_NAME # set this to your app service name
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
build-and-test:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
with:
|
|
32
|
+
lfs: true
|
|
33
|
+
|
|
34
|
+
- name: Use .NET SDK
|
|
35
|
+
uses: actions/setup-dotnet@v4
|
|
36
|
+
with:
|
|
37
|
+
dotnet-version: 9.x
|
|
38
|
+
dotnet-quality: preview
|
|
39
|
+
|
|
40
|
+
- name: Use Node.js
|
|
41
|
+
uses: actions/setup-node@v4
|
|
42
|
+
with:
|
|
43
|
+
node-version: 22.x
|
|
44
|
+
|
|
45
|
+
- name: npm ci
|
|
46
|
+
run: npm ci
|
|
47
|
+
working-directory: Coalesce.Starter.Vue.Web
|
|
48
|
+
|
|
49
|
+
- name: Restore Nuget packages
|
|
50
|
+
run: dotnet restore
|
|
51
|
+
|
|
52
|
+
- name: Check Coalesce has been run
|
|
53
|
+
run: dotnet coalesce --what-if --verify
|
|
54
|
+
working-directory: Coalesce.Starter.Vue.Web
|
|
55
|
+
|
|
56
|
+
- name: npm run lint
|
|
57
|
+
run: npm run lint
|
|
58
|
+
working-directory: Coalesce.Starter.Vue.Web
|
|
59
|
+
|
|
60
|
+
- name: npm run build
|
|
61
|
+
run: npm run build
|
|
62
|
+
working-directory: Coalesce.Starter.Vue.Web
|
|
63
|
+
|
|
64
|
+
- name: dotnet build
|
|
65
|
+
run: dotnet build --configuration Release --no-restore --no-incremental
|
|
66
|
+
|
|
67
|
+
- name: dotnet test
|
|
68
|
+
run: dotnet test --configuration Release --no-restore --no-build
|
|
69
|
+
|
|
70
|
+
- name: dotnet publish
|
|
71
|
+
run: dotnet publish ${{ github.workspace }}/Coalesce.Starter.Vue.Web/Coalesce.Starter.Vue.Web.csproj --configuration Release --output ${{ github.workspace }}/publish --no-restore --no-build
|
|
72
|
+
|
|
73
|
+
- name: Upload artifact for deployment
|
|
74
|
+
if: github.event_name != 'pull_request'
|
|
75
|
+
uses: actions/upload-artifact@v4
|
|
76
|
+
with:
|
|
77
|
+
name: web-app
|
|
78
|
+
path: ${{ github.workspace }}/publish
|
|
79
|
+
if-no-files-found: error
|
|
80
|
+
|
|
81
|
+
# Deploys the app to Azure App Service
|
|
82
|
+
# https://docs.github.com/actions/use-cases-and-examples/deploying/deploying-net-to-azure-app-service
|
|
83
|
+
deploy-production:
|
|
84
|
+
needs: build-and-test
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
if: github.event_name != 'pull_request'
|
|
87
|
+
environment:
|
|
88
|
+
name: "production"
|
|
89
|
+
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
|
|
90
|
+
|
|
91
|
+
steps:
|
|
92
|
+
- name: Download artifact for deployment
|
|
93
|
+
uses: actions/download-artifact@v5
|
|
94
|
+
with:
|
|
95
|
+
name: web-app
|
|
96
|
+
|
|
97
|
+
- name: Deploy to Azure Web App
|
|
98
|
+
uses: azure/webapps-deploy@v3
|
|
99
|
+
id: deploy-to-webapp
|
|
100
|
+
with:
|
|
101
|
+
app-name: ${{ env.AZURE_WEBAPP_NAME }}
|
|
102
|
+
slot-name: "production"
|
|
103
|
+
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
|
|
104
|
+
package: .
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json.schemastore.org/template",
|
|
3
|
+
"author": "IntelliTect",
|
|
4
|
+
"classifications": ["Web", "MVC", "Vue"],
|
|
5
|
+
"identity": "IntelliTect.Coalesce.Vue.Template",
|
|
6
|
+
"name": "IntelliTect Coalesce Web App Vue Template",
|
|
7
|
+
"shortName": "coalescevue",
|
|
8
|
+
"tags": {
|
|
9
|
+
"language": "C#",
|
|
10
|
+
"type": "project"
|
|
11
|
+
},
|
|
12
|
+
"sourceName": "Coalesce.Starter.Vue",
|
|
13
|
+
"preferNameDirectory": true,
|
|
14
|
+
"guids": [
|
|
15
|
+
"a0519206-1884-46ae-9307-ec95105646e5",
|
|
16
|
+
"8474a2d7-c044-4e5e-81dd-55e78596f186"
|
|
17
|
+
],
|
|
18
|
+
"symbols": {
|
|
19
|
+
"KestrelPortGenerated": {
|
|
20
|
+
"type": "generated",
|
|
21
|
+
"generator": "port",
|
|
22
|
+
"parameters": {
|
|
23
|
+
"fallback": 5001
|
|
24
|
+
},
|
|
25
|
+
"replaces": "5001"
|
|
26
|
+
},
|
|
27
|
+
"VitePortGenerated": {
|
|
28
|
+
"type": "generated",
|
|
29
|
+
"generator": "port",
|
|
30
|
+
"parameters": {
|
|
31
|
+
"fallback": 5002
|
|
32
|
+
},
|
|
33
|
+
"replaces": "5002"
|
|
34
|
+
},
|
|
35
|
+
"AspirePortGenerated": {
|
|
36
|
+
"type": "generated",
|
|
37
|
+
"generator": "port",
|
|
38
|
+
"parameters": {
|
|
39
|
+
"fallback": 5003
|
|
40
|
+
},
|
|
41
|
+
"replaces": "5003"
|
|
42
|
+
},
|
|
43
|
+
"AspireOtlpPortGenerated": {
|
|
44
|
+
"type": "generated",
|
|
45
|
+
"generator": "port",
|
|
46
|
+
"parameters": {
|
|
47
|
+
"fallback": 5004
|
|
48
|
+
},
|
|
49
|
+
"replaces": "5004"
|
|
50
|
+
},
|
|
51
|
+
"AspireServicePortGenerated": {
|
|
52
|
+
"type": "generated",
|
|
53
|
+
"generator": "port",
|
|
54
|
+
"parameters": {
|
|
55
|
+
"fallback": 5005
|
|
56
|
+
},
|
|
57
|
+
"replaces": "5005"
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
"Identity": {
|
|
61
|
+
"type": "parameter",
|
|
62
|
+
"datatype": "bool",
|
|
63
|
+
"displayName": "ASP.NET Core Identity",
|
|
64
|
+
"description": "Adds ASP.NET Core Identity, providing user storage, authentication, and authorization mechanisms. Also includes a permission-based security model. If you don't include Identity, you'll have to build your auth stack from scratch.",
|
|
65
|
+
"$coalesceLink": "https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity"
|
|
66
|
+
},
|
|
67
|
+
"MicrosoftAuth": {
|
|
68
|
+
"type": "parameter",
|
|
69
|
+
"datatype": "bool",
|
|
70
|
+
"displayName": "Sign-in with Microsoft",
|
|
71
|
+
"description": "Adds Microsoft as an external authentication and account provider for Identity.",
|
|
72
|
+
"$coalesceRequires": ["and", "Identity"],
|
|
73
|
+
"$coalesceLink": "https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/microsoft-logins"
|
|
74
|
+
},
|
|
75
|
+
"GoogleAuth": {
|
|
76
|
+
"type": "parameter",
|
|
77
|
+
"datatype": "bool",
|
|
78
|
+
"displayName": "Sign-in with Google",
|
|
79
|
+
"description": "Adds Google as an external authentication and account provider for Identity.",
|
|
80
|
+
"$coalesceRequires": ["and", "Identity"],
|
|
81
|
+
"$coalesceLink": "https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/google-logins"
|
|
82
|
+
},
|
|
83
|
+
"OtherOAuth": {
|
|
84
|
+
"type": "parameter",
|
|
85
|
+
"datatype": "bool",
|
|
86
|
+
"displayName": "Sign-in with other OAuth/OIDC",
|
|
87
|
+
"description": "Adds generic code to help you add a different OAuth/OIDC external authentication and account provider for Identity.",
|
|
88
|
+
"$coalesceRequires": ["and", "Identity"],
|
|
89
|
+
"$coalesceLink": "https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/other-logins"
|
|
90
|
+
},
|
|
91
|
+
"LocalAuth": {
|
|
92
|
+
"type": "parameter",
|
|
93
|
+
"datatype": "bool",
|
|
94
|
+
"displayName": "Sign-in with Username/Password",
|
|
95
|
+
"description": "Adds infrastructure for supporting individual user accounts with first-party usernames and passwords.",
|
|
96
|
+
"$coalesceRequires": ["and", "Identity"],
|
|
97
|
+
"$coalesceLink": "https://learn.microsoft.com/en-us/aspnet/core/security/authentication/individual"
|
|
98
|
+
},
|
|
99
|
+
"UserPictures": {
|
|
100
|
+
"type": "parameter",
|
|
101
|
+
"datatype": "bool",
|
|
102
|
+
"displayName": "User Profile Pictures",
|
|
103
|
+
"description": "Adds infrastructure for acquiring, saving, and displaying user profile pictures.",
|
|
104
|
+
"$coalesceRequires": ["and", "Identity"]
|
|
105
|
+
},
|
|
106
|
+
"TrackingBase": {
|
|
107
|
+
"type": "parameter",
|
|
108
|
+
"datatype": "bool",
|
|
109
|
+
"displayName": "Tracking Base",
|
|
110
|
+
"description": "Include a base entity class for tracking created/modified by and date stamps on each entity, and infrastructure for automatically setting those fields."
|
|
111
|
+
},
|
|
112
|
+
"AuditLogs": {
|
|
113
|
+
"type": "parameter",
|
|
114
|
+
"datatype": "bool",
|
|
115
|
+
"displayName": "Audit Logging",
|
|
116
|
+
"description": "Adds Coalesce audit logging infrastructure, logging each change made to the database through Entity Framework.",
|
|
117
|
+
"$coalesceLink": "/topics/audit-logging.html"
|
|
118
|
+
},
|
|
119
|
+
"DarkMode": {
|
|
120
|
+
"type": "parameter",
|
|
121
|
+
"datatype": "bool",
|
|
122
|
+
"displayName": "Dark Mode Toggle",
|
|
123
|
+
"description": "Adds features for user-togglable dark mode. Don't use if you're developing a light-only or dark-only application."
|
|
124
|
+
},
|
|
125
|
+
"ExampleModel": {
|
|
126
|
+
"type": "parameter",
|
|
127
|
+
"datatype": "bool",
|
|
128
|
+
"displayName": "Sample Page",
|
|
129
|
+
"description": "Includes a 'Widget' example model with a basic Vue page, frontend tests, and backend tests."
|
|
130
|
+
},
|
|
131
|
+
"OpenAPI": {
|
|
132
|
+
"type": "parameter",
|
|
133
|
+
"datatype": "bool",
|
|
134
|
+
"displayName": "OpenAPI",
|
|
135
|
+
"description": "Include configuration to expose an OpenAPI document, and interactive UI with Scalar."
|
|
136
|
+
},
|
|
137
|
+
"Tenancy": {
|
|
138
|
+
"type": "parameter",
|
|
139
|
+
"datatype": "bool",
|
|
140
|
+
"displayName": "Tenancy: Core",
|
|
141
|
+
"description": "Includes core infrastructure for supporting multiple tenants within one shared database, with shared user accounts.",
|
|
142
|
+
"$coalesceLink": "/topics/template-features.html#tenancy",
|
|
143
|
+
"$coalesceRequires": ["and", "Identity"]
|
|
144
|
+
},
|
|
145
|
+
"TenantCreateSelf": {
|
|
146
|
+
"type": "parameter",
|
|
147
|
+
"datatype": "bool",
|
|
148
|
+
"displayName": "Tenancy: Creation by Self-service",
|
|
149
|
+
"description": "Allows any signed in user to create additional tenants.",
|
|
150
|
+
"$coalesceRequires": ["and", "Tenancy"]
|
|
151
|
+
},
|
|
152
|
+
"TenantCreateAdmin": {
|
|
153
|
+
"type": "parameter",
|
|
154
|
+
"datatype": "bool",
|
|
155
|
+
"displayName": "Tenancy: Creation by Global Admin",
|
|
156
|
+
"description": "Allows global admins to create new tenants.",
|
|
157
|
+
"$coalesceRequires": ["and", "Tenancy"]
|
|
158
|
+
},
|
|
159
|
+
"TenantCreateExternal": {
|
|
160
|
+
"type": "parameter",
|
|
161
|
+
"datatype": "bool",
|
|
162
|
+
"displayName": "Tenancy: Creation/Membership by OIDC",
|
|
163
|
+
"description": "Automatically creates a new tenant for external organizations (Microsoft Entra, Google GSuite), and grants automatic tenant membership to other users within those organizations.",
|
|
164
|
+
"$coalesceRequires": [
|
|
165
|
+
"and",
|
|
166
|
+
"Tenancy",
|
|
167
|
+
["or", "MicrosoftAuth", "GoogleAuth", "OtherOAuth"]
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
"TenantMemberInvites": {
|
|
171
|
+
"type": "parameter",
|
|
172
|
+
"datatype": "bool",
|
|
173
|
+
"displayName": "Tenancy: Membership by Invitation",
|
|
174
|
+
"description": "Allows administrators within a tenant to create invitation links to grant membership to their tenant.",
|
|
175
|
+
"$coalesceRequires": ["and", "Tenancy"]
|
|
176
|
+
},
|
|
177
|
+
"AppInsights": {
|
|
178
|
+
"type": "parameter",
|
|
179
|
+
"datatype": "bool",
|
|
180
|
+
"displayName": "Azure Application Insights",
|
|
181
|
+
"description": "Include configuration and integrations for Application Insights, both front-end and back-end.",
|
|
182
|
+
"$coalesceLink": "https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview"
|
|
183
|
+
},
|
|
184
|
+
"Hangfire": {
|
|
185
|
+
"type": "parameter",
|
|
186
|
+
"datatype": "bool",
|
|
187
|
+
"displayName": "Hangfire",
|
|
188
|
+
"description": "Add packages, configuration, and telemetry for Hangfire, a background job runner.",
|
|
189
|
+
"$coalesceLink": "https://www.hangfire.io/"
|
|
190
|
+
},
|
|
191
|
+
"AIChat": {
|
|
192
|
+
"type": "parameter",
|
|
193
|
+
"datatype": "bool",
|
|
194
|
+
"displayName": "AI Chat with Semantic Kernel + Azure Open AI",
|
|
195
|
+
"description": "Add packages and configuration for creating an AI chat assistant in your application.",
|
|
196
|
+
"$coalesceLink": "/topics/template-features.html#ai-chat"
|
|
197
|
+
},
|
|
198
|
+
"EmailAzure": {
|
|
199
|
+
"type": "parameter",
|
|
200
|
+
"datatype": "bool",
|
|
201
|
+
"displayName": "Email: Azure Communication Services",
|
|
202
|
+
"description": "Include basic code for sending email with Azure Communication Services. See instructions in appsettings.json - the official ACS documentation is very confusing.",
|
|
203
|
+
"$coalesceLink": "https://learn.microsoft.com/en-us/azure/communication-services/concepts/email/prepare-email-communication-resource"
|
|
204
|
+
},
|
|
205
|
+
"EmailSendGrid": {
|
|
206
|
+
"type": "parameter",
|
|
207
|
+
"datatype": "bool",
|
|
208
|
+
"displayName": "Email: Twilio SendGrid",
|
|
209
|
+
"description": "Include basic code for sending email with Twilio SendGrid.",
|
|
210
|
+
"$coalesceLink": "https://www.twilio.com/docs/sendgrid/for-developers/sending-email/email-api-quickstart-for-c"
|
|
211
|
+
},
|
|
212
|
+
"AzurePipelines": {
|
|
213
|
+
"type": "parameter",
|
|
214
|
+
"datatype": "bool",
|
|
215
|
+
"displayName": "CI: Azure Pipelines",
|
|
216
|
+
"description": "Include an azure-pipelines.yml build template. For deployments, a release pipeline is recommended (which don't support YAML config files).",
|
|
217
|
+
"$coalesceLink": "https://learn.microsoft.com/en-us/azure/devops/pipelines/create-first-pipeline?view=azure-devops&tabs=net%2Cbrowser"
|
|
218
|
+
},
|
|
219
|
+
"GithubActions": {
|
|
220
|
+
"type": "parameter",
|
|
221
|
+
"datatype": "bool",
|
|
222
|
+
"displayName": "CI: Github Actions",
|
|
223
|
+
"description": "Include an build-test-and-deploy.yml github action file template.",
|
|
224
|
+
"$coalesceLink": "https://docs.github.com/actions/use-cases-and-examples/deploying/deploying-net-to-azure-app-service"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"sources": [
|
|
228
|
+
{
|
|
229
|
+
"modifiers": [
|
|
230
|
+
{
|
|
231
|
+
"exclude": [
|
|
232
|
+
"**/[Bb]in/**",
|
|
233
|
+
"**/[Oo]bj/**",
|
|
234
|
+
"**/node_modules/**",
|
|
235
|
+
".template.config/**/*",
|
|
236
|
+
"**/*.filelist",
|
|
237
|
+
"**/*.user",
|
|
238
|
+
"**/*.g.cs",
|
|
239
|
+
"**/*.g.ts",
|
|
240
|
+
"**/*.lock.json"
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"condition": "!Identity",
|
|
245
|
+
"exclude": [
|
|
246
|
+
"**/ProgramAuthConfiguration.cs",
|
|
247
|
+
"**/Forbidden.vue",
|
|
248
|
+
"**/UserAvatar.vue",
|
|
249
|
+
"**/UserProfile.vue",
|
|
250
|
+
"**/SignIn.*",
|
|
251
|
+
"**/SignOut.*",
|
|
252
|
+
"**/AppClaimTypes.cs",
|
|
253
|
+
"**/ClaimsPrincipalFactory.cs",
|
|
254
|
+
"**/Permission.cs",
|
|
255
|
+
"**/User.cs",
|
|
256
|
+
"**/UserRole.cs",
|
|
257
|
+
"**/Role.cs"
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"condition": "!(MicrosoftAuth || GoogleAuth || OtherOAuth)",
|
|
262
|
+
"exclude": ["**/ExternalLogin.*"]
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"condition": "!LocalAuth",
|
|
266
|
+
"exclude": [
|
|
267
|
+
"**/ResetPassword.*",
|
|
268
|
+
"**/Register.*",
|
|
269
|
+
"**/ForgotPassword.*",
|
|
270
|
+
"**/ConfirmEmail.*",
|
|
271
|
+
"**/UserManagementService.cs"
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"condition": "!(LocalAuth || TenantMemberInvites || TenantCreateAdmin || EmailSendGrid || EmailAzure)",
|
|
276
|
+
"exclude": ["**/NoOpEmailService.*", "**/IEmailService.*"]
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"condition": "!Tenancy",
|
|
280
|
+
"exclude": [
|
|
281
|
+
"**/Tenant.cs",
|
|
282
|
+
"**/DbContextFactoryExtensions.cs",
|
|
283
|
+
"**/TenantMembership.cs",
|
|
284
|
+
"**/ITenanted.cs",
|
|
285
|
+
"**/TenantedBase.cs",
|
|
286
|
+
"**/SelectTenant.*"
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"condition": "!TenantCreateSelf",
|
|
291
|
+
"exclude": ["**/CreateTenant.*"]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"condition": "!(TenantMemberInvites || TenantCreateAdmin)",
|
|
295
|
+
"exclude": [
|
|
296
|
+
"**/Invitation.*",
|
|
297
|
+
"**/InvitationService.*",
|
|
298
|
+
"**/UserInvitation.*"
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"condition": "!(UserPictures && Identity)",
|
|
303
|
+
"exclude": ["Coalesce.Starter.Vue.Data/Models/UserPhoto.cs"]
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"condition": "!AuditLogs",
|
|
307
|
+
"exclude": ["**/AuditOperationContext.cs", "**/AuditLog.cs"]
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"condition": "!TrackingBase",
|
|
311
|
+
"exclude": ["**/TrackingBase.cs"]
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"condition": "!AppInsights",
|
|
315
|
+
"exclude": ["**/AppInsightsTelemetryEnricher.cs"]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"condition": "!GoogleAuth",
|
|
319
|
+
"exclude": ["**/google-logo.svg"]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"condition": "!MicrosoftAuth",
|
|
323
|
+
"exclude": ["**/microsoft-logo.svg"]
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"condition": "!EmailAzure",
|
|
327
|
+
"exclude": ["**/AzureEmailOptions.cs", "**/AzureEmailService.cs"]
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"condition": "!EmailSendGrid",
|
|
331
|
+
"exclude": [
|
|
332
|
+
"**/SendGridEmailOptions.cs",
|
|
333
|
+
"**/SendGridEmailService.cs"
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"condition": "!ExampleModel",
|
|
338
|
+
"exclude": [
|
|
339
|
+
"**/WidgetEdit.vue",
|
|
340
|
+
"**/WidgetEdit.spec.ts",
|
|
341
|
+
"**/Widget.cs"
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"condition": "!OpenAPI",
|
|
346
|
+
"exclude": ["**/OpenAPI.vue"]
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"condition": "!AIChat",
|
|
350
|
+
"exclude": ["**/AIChat.vue", "**/AIAgentService.cs"]
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"condition": "!AzurePipelines",
|
|
354
|
+
"exclude": ["**/azure-pipelines.yml"]
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"condition": "!GithubActions",
|
|
358
|
+
"exclude": ["**/.github/workflows/build-test-and-deploy.yml"]
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
"SpecialCustomOperations": {
|
|
364
|
+
"**.vue": {
|
|
365
|
+
"operations": [
|
|
366
|
+
{
|
|
367
|
+
"type": "conditional",
|
|
368
|
+
"configuration": {
|
|
369
|
+
"if": ["//#if"],
|
|
370
|
+
"else": ["//#else"],
|
|
371
|
+
"elseif": ["//#elseif"],
|
|
372
|
+
"endif": ["//#endif"],
|
|
373
|
+
"actionableIf": ["////#if"],
|
|
374
|
+
"actionableElse": ["////#else"],
|
|
375
|
+
"actionableElseif": ["////#elseif"],
|
|
376
|
+
"actions": ["cStyleUncomment", "cStyleReduceComment"],
|
|
377
|
+
"trim": true,
|
|
378
|
+
"wholeLine": true,
|
|
379
|
+
"evaluator": "C++"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"type": "conditional",
|
|
384
|
+
"configuration": {
|
|
385
|
+
"endif": ["#endif", "<!--#endif"],
|
|
386
|
+
"actionableIf": ["<!--#if"],
|
|
387
|
+
"actionableElse": ["#else", "<!--#else"],
|
|
388
|
+
"actionableElseif": [
|
|
389
|
+
"#elseif",
|
|
390
|
+
"<!--#elseif",
|
|
391
|
+
"#elif",
|
|
392
|
+
"<!--#elif"
|
|
393
|
+
],
|
|
394
|
+
"trim": true,
|
|
395
|
+
"wholeLine": true,
|
|
396
|
+
"evaluator": "C++"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"type": "replacement",
|
|
401
|
+
"configuration": {
|
|
402
|
+
"original": "//",
|
|
403
|
+
"replacement": "",
|
|
404
|
+
"id": "cStyleUncomment"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"type": "replacement",
|
|
409
|
+
"configuration": {
|
|
410
|
+
"original": "////",
|
|
411
|
+
"replacement": "//",
|
|
412
|
+
"id": "cStyleReduceComment"
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
|
3
|
+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
|
4
|
+
|
|
5
|
+
// List of extensions which should be recommended for users of this workspace.
|
|
6
|
+
"recommendations": [
|
|
7
|
+
"streetsidesoftware.code-spell-checker",
|
|
8
|
+
"dbaeumer.vscode-eslint",
|
|
9
|
+
"vue.volar",
|
|
10
|
+
"esbenp.prettier-vscode",
|
|
11
|
+
"antfu.goto-alias"
|
|
12
|
+
],
|
|
13
|
+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
|
14
|
+
"unwantedRecommendations": []
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"typescript.tsdk": "Coalesce.Starter.Vue.Web\\node_modules\\typescript\\lib",
|
|
3
|
+
"dotnet.defaultSolution": "Coalesce.Starter.Vue.sln",
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"editor.codeActionsOnSave": {
|
|
6
|
+
"source.fixAll.eslint": "explicit"
|
|
7
|
+
},
|
|
8
|
+
"cSpell.words": ["Vite", "unplugin", "iconsets", "viewmodels", "composables"],
|
|
9
|
+
// XML element content is often whitespace sensitive.
|
|
10
|
+
// Introducing wrapping breaks some csproj elements.
|
|
11
|
+
"xml.format.maxLineWidth": 0
|
|
12
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
using Projects;
|
|
2
|
+
using System.Runtime.InteropServices;
|
|
3
|
+
using static System.Runtime.InteropServices.RuntimeInformation;
|
|
4
|
+
|
|
5
|
+
var builder = DistributedApplication.CreateBuilder(args);
|
|
6
|
+
|
|
7
|
+
// Add SQL Server
|
|
8
|
+
var sqlDb = OperatingSystem.IsWindows() && OSArchitecture != Architecture.Arm64
|
|
9
|
+
// Assume that localdb is available on Windows (non-ARM)
|
|
10
|
+
? builder.AddConnectionString("DefaultConnection")
|
|
11
|
+
// Fall back to a container
|
|
12
|
+
: builder.AddSqlServer("sql").WithLifetime(ContainerLifetime.Persistent).AddDatabase(nameof(Coalesce_Starter_Vue_Web));
|
|
13
|
+
|
|
14
|
+
#if AIChat
|
|
15
|
+
// https://learn.microsoft.com/en-us/dotnet/aspire/azureai/azureai-openai-integration
|
|
16
|
+
var openAi = builder.AddAzureOpenAI("OpenAI");
|
|
17
|
+
openAi.AddDeployment(name: "chat", modelName: "gpt-4.1", modelVersion: "2025-04-14")
|
|
18
|
+
.WithProperties(c => c.SkuName = "GlobalStandard");
|
|
19
|
+
|
|
20
|
+
#endif
|
|
21
|
+
var app = builder.AddProject<Coalesce_Starter_Vue_Web>("app")
|
|
22
|
+
.WithReference(sqlDb, "DefaultConnection")
|
|
23
|
+
.WaitFor(sqlDb)
|
|
24
|
+
#if AIChat
|
|
25
|
+
.WithReference(openAi)
|
|
26
|
+
.WaitFor(openAi)
|
|
27
|
+
#endif
|
|
28
|
+
.WithHttpHealthCheck("/health")
|
|
29
|
+
.WithExternalHttpEndpoints();
|
|
30
|
+
|
|
31
|
+
builder.Build().Run();
|