Skip to content

Commit 1594d07

Browse files
committed
Initial commit
0 parents  commit 1594d07

36 files changed

+2624
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"image": "mcr.microsoft.com/devcontainers/dotnet:10.0-preview-noble",
3+
"features": {
4+
"ghcr.io/devcontainers/features/docker-in-docker": {},
5+
"ghcr.io/devcontainers/features/node": {
6+
"version": "lts/iron"
7+
}
8+
},
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"ms-dotnettools.csdevkit"
13+
]
14+
}
15+
}
16+
}

.github/CODE_OF_CONDUCT.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Microsoft Open Source Code of Conduct
2+
3+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4+
5+
Resources:
6+
7+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9+
- Contact [[email protected]](mailto:[email protected]) with questions or concerns

.github/CONTRIBUTING.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributing to Azure Samples
2+
3+
This project welcomes contributions and suggestions. Most contributions require you to agree to a
4+
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
5+
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
6+
7+
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
8+
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
9+
provided by the bot. You will only need to do this once across all repos using our CLA.
10+
11+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
12+
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
13+
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
14+
15+
- [Code of Conduct](#coc)
16+
- [Issues and Bugs](#issue)
17+
- [Feature Requests](#feature)
18+
- [Submission Guidelines](#submit)
19+
20+
## <a name="coc"></a> Code of Conduct
21+
Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
22+
23+
## <a name="issue"></a> Found an Issue?
24+
If you find a bug in the source code or a mistake in the documentation, you can help us by
25+
[submitting an issue](#submit-issue) to the GitHub Repository. Even better, you can
26+
[submit a Pull Request](#submit-pr) with a fix.
27+
28+
## <a name="feature"></a> Want a Feature?
29+
You can *request* a new feature by [submitting an issue](#submit-issue) to the GitHub
30+
Repository. If you would like to *implement* a new feature, please submit an issue with
31+
a proposal for your work first, to be sure that we can use it.
32+
33+
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
34+
35+
## <a name="submit"></a> Submission Guidelines
36+
37+
### <a name="submit-issue"></a> Submitting an Issue
38+
Before you submit an issue, search the archive, maybe your question was already answered.
39+
40+
If your issue appears to be a bug, and hasn't been reported, open a new issue.
41+
Help us to maximize the effort we can spend fixing issues and adding new
42+
features, by not reporting duplicate issues. Providing the following information will increase the
43+
chances of your issue being dealt with quickly:
44+
45+
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
46+
* **Version** - what version is affected (e.g. 0.1.2)
47+
* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
48+
* **Browsers and Operating System** - is this a problem with all browsers?
49+
* **Reproduce the Error** - provide a live example or a unambiguous set of steps
50+
* **Related Issues** - has a similar issue been reported before?
51+
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
52+
causing the problem (line of code or commit)
53+
54+
You can file new issues by providing the above information at the corresponding [repository's issues](../../../issues/new).
55+
56+
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
57+
Before you submit your Pull Request (PR) consider the following guidelines:
58+
59+
* Search the repository [pull requests](../../../pulls) for an open or closed PR
60+
that relates to your submission. You don't want to duplicate effort.
61+
62+
* Make your changes in a new git fork:
63+
64+
* Commit your changes using a descriptive commit message
65+
* Push your fork to GitHub:
66+
* In GitHub, create a pull request
67+
* If we suggest changes then:
68+
* Make the required updates.
69+
* Rebase your fork and force push to your GitHub repository (this will update your Pull Request):
70+
71+
```shell
72+
git rebase master -i
73+
git push -f
74+
```
75+
76+
That's it! Thank you for your contribution!
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: 🐞 Bug report
2+
description: File a bug report for this sample application.
3+
title: "[BUG] "
4+
labels: ["bug"]
5+
assignees:
6+
- seesharprun
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Please fill out this bug report form so we can resolve your request.
12+
13+
> [!TIP]
14+
> Providing additional context and repo steps helps us resolve your issue quickly.
15+
- type: textarea
16+
id: description
17+
attributes:
18+
label: Description
19+
description: Provide a clear and concise description of the bug.
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: repro-steps
24+
attributes:
25+
label: Repro steps
26+
description: Provide steps to reproduce the bug in numbered format.
27+
value: |
28+
1. Go to '...'
29+
2. Click on '....'
30+
3. Scroll down to '....'
31+
4. See error
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: expected-behavior
36+
attributes:
37+
label: Expected behavior
38+
description: Provide an explanation of the behavior you expected.
39+
validations:
40+
required: true
41+
- type: textarea
42+
id: screenshots
43+
attributes:
44+
label: Screenshots
45+
description: If applicable, add screenshots to help explain your problem.
46+
validations:
47+
required: false
48+
- type: textarea
49+
id: environment
50+
attributes:
51+
label: Environment
52+
description: Tell us about your environment, if possible.
53+
render: shell
54+
validations:
55+
required: false
56+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Microsoft Q&A
4+
url: https://learn.microsoft.com/answers/tags/187/azure-cosmos-db
5+
about: Please ask and answer questions about Azure Cosmos DB.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 🎫 Feature request
2+
description: Suggest a new feature for this sample application.
3+
title: "[FEATURE] "
4+
labels: ["new-feature"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Use this form to request new features.
10+
11+
> [!IMPORTANT]
12+
> These requests will be reviewed and prioritized.
13+
- type: textarea
14+
id: description
15+
attributes:
16+
label: Description
17+
description: Provide some context here on the functionality you would like to see in this sample application.
18+
validations:
19+
required: true

.github/SECURITY.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->
2+
3+
## Security
4+
5+
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).
6+
7+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.
8+
9+
## Reporting Security Issues
10+
11+
**Please do not report security vulnerabilities through public GitHub issues.**
12+
13+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).
14+
15+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
16+
17+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18+
19+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20+
21+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22+
* Full paths of source file(s) related to the manifestation of the issue
23+
* The location of the affected source code (tag/branch/commit or direct URL)
24+
* Any special configuration required to reproduce the issue
25+
* Step-by-step instructions to reproduce the issue
26+
* Proof-of-concept or exploit code (if possible)
27+
* Impact of the issue, including how an attacker might exploit the issue
28+
29+
This information will help us triage your report more quickly.
30+
31+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.
32+
33+
## Preferred Languages
34+
35+
We prefer all communications to be in English.
36+
37+
## Policy
38+
39+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).
40+
41+
<!-- END MICROSOFT SECURITY.MD BLOCK -->

.github/workflows/codeql.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: "CodeQL Advanced"
2+
on:
3+
push:
4+
branches: [ "main" ]
5+
pull_request:
6+
branches: [ "main" ]
7+
schedule:
8+
- cron: '36 9 * * 5'
9+
jobs:
10+
analyze:
11+
name: Analyze (${{ matrix.language }})
12+
runs-on: 'ubuntu-latest'
13+
permissions:
14+
security-events: write
15+
packages: read
16+
actions: read
17+
contents: read
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- language: actions
23+
build-mode: none
24+
- language: csharp
25+
build-mode: manual
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v3
31+
with:
32+
languages: ${{ matrix.language }}
33+
build-mode: ${{ matrix.build-mode }}
34+
- name: Setup .NET
35+
if: matrix.language == 'csharp'
36+
uses: actions/setup-dotnet@v4
37+
with:
38+
dotnet-version: '10.0.x'
39+
dotnet-quality: 'preview'
40+
- name: Setup Node.js
41+
if: matrix.language == 'csharp'
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: lts/iron
45+
- name: Install dependencies
46+
if: matrix.language == 'csharp'
47+
run: |
48+
npm install tailwindcss @tailwindcss/cli
49+
- name: Manually build code
50+
if: matrix.build-mode == 'manual' && matrix.language == 'csharp'
51+
working-directory: ./src
52+
run: |
53+
dotnet build --configuration release
54+
dotnet format --verify-no-changes --severity info
55+
- name: Manually build container image
56+
if: matrix.build-mode == 'manual' && matrix.language == 'csharp'
57+
working-directory: ./src
58+
run: |
59+
dotnet publish --os linux --arch x64 --configuration release
60+
- name: Perform CodeQL Analysis
61+
uses: github/codeql-action/analyze@v3
62+
with:
63+
category: "/language:${{matrix.language}}"

.github/workflows/registry.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy Docker container image to GitHub Container Registry
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
IMAGE_TAGS: 'latest;${{ github.ref_name }};${{ github.sha }}'
11+
jobs:
12+
build-and-push-image:
13+
name: Build and push Docker container image
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
attestations: write
19+
id-token: write
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
- name: Setup .NET
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: '10.0.x'
27+
dotnet-quality: 'preview'
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22.x
32+
- name: Configure Tailwind CSS
33+
run: |
34+
npm install tailwindcss @tailwindcss/cli
35+
- name: Log in to the Container registry
36+
uses: docker/login-action@v3
37+
with:
38+
registry: ${{ env.REGISTRY }}
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
- name: Publish Docker container image
42+
id: publish-image
43+
working-directory: src/web/
44+
env:
45+
ContainerImageTags: ${{ env.IMAGE_TAGS }}
46+
run: |
47+
dotnet publish --os linux --arch x64 --configuration release \
48+
-p:PublishProfile=DefaultContainer \
49+
-p:ContainerRegistry=${{ env.REGISTRY }} \
50+
-p:ContainerRepository=${{ env.IMAGE_NAME }}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Microsoft Corporation.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE

0 commit comments

Comments
 (0)