clean-architecture-azure-cosmos-db
A starting point to build a web API to work with Azure Cosmos DB using .NET 5 and Azure Cosmos DB .NET SDK V3, based on Clean Architecture and repository design pattern. Partition key is also implemented through the repository pattern.
File Explorer
Download Latest Version (.zip)- SystemDesign.jpg
- serviceDependencies.json
- serviceDependencies.local.json
- .gitignore
- CleanArchitectureCosmosDB.AzureFunctions.csproj
- host.json
- local.settings.json
- README.md
- StarterFunction.cs
- Startup.cs
- favicon.ico
- index.html
- logo192.png
- logo512.png
- manifest.json
- robots.txt
- ToDoDataTable.tsx
- Alert.tsx
- LoadingProgress.tsx
- TextFieldWithFormikValidation.tsx
- ApiClientFactory.ts
- Resources.ts
- Sidebar.tsx
- DashboardLayout.tsx
- Dashboard.tsx
- ToDoCreate.tsx
- TodoList.tsx
- App.css
- App.test.tsx
- App.tsx
- index.css
- index.tsx
- logo.svg
- react-app-env.d.ts
- reportWebVitals.ts
- setupTests.ts
- .gitignore
- CleanArchitectureCosmosDB.API.nswag
- package.json
- README.md
- tsconfig.json
- yarn.lock
- ApplicationIdentityConstants.cs
- Audit.cs
- BaseEntity.cs
- ToDoItem.cs
- EntityAlreadyExistsException.cs
- EntityNotFoundException.cs
- InvalidCredentialsException.cs
- ICachedToDoItemsService.cs
- IEmailService.cs
- IAuditRepository.cs
- IRepository.cs
- IToDoItemRepository.cs
- IStorageService.cs
- CosmosDbSpecificationEvaluator.cs
- ISearchQuery.cs
- AuditFilterSpecification.cs
- ToDoItemGetAllSpecification.cs
- ToDoItemSearchAggregationSpecification.cs
- ToDoItemSearchSpecification.cs
- CleanArchitectureCosmosDB.Core.csproj
- README.md
- CosmosDbSettings.cs
- SendGridEmailSettings.cs
- CosmosDbConfigConstants.cs
- IContainerContext.cs
- ICosmosDbContainer.cs
- ICosmosDbContainerFactory.cs
- AuditRepository.cs
- CosmosDbRepository.cs
- ToDoItemRepository.cs
- CosmosDbContainer.cs
- CosmosDbContainerFactory.cs
- CacheHelpers.cs
- IApplicationBuilderExtensions.cs
- IServiceCollectionExtensions.cs
- ApplicationDbContext.cs
- DesignTimeDbContextFactory.cs
- 20210108033404_InitialIdentityDbCreation.cs
- 20210108033404_InitialIdentityDbCreation.Designer.cs
- ApplicationDbContextModelSnapshot.cs
- Token.cs
- TokenRequest.cs
- TokenResponse.cs
- ApplicationDbContext.cs
- ApplicationUser.cs
- RefreshToken.cs
- ApplicationDbContextDataSeed.cs
- ITokenService.cs
- TokenService.cs
- README_Identity.md
- TokenServiceProvider.cs
- AzureBlobStorageService.cs
- SendGridEmailService.cs
- appsettings.json
- CleanArchitectureCosmosDB.Infrastructure.csproj
- README.md
- AuthenticationConfig.cs
- AuthorizationConfig.cs
- CachingConfig.cs
- DatabaseConfig.cs
- MediatrConfig.cs
- MvcConfig.cs
- ODataConfig.cs
- SwaggerConfig.cs
- AttachmentController.cs
- ToDoItemController.cs
- TokenController.cs
- ApiModelValidationException.cs
- UnhandledExceptionBehaviour.cs
- ValidationBehaviour.cs
- ApiExceptionFilterAttribute.cs
- InMemoryCachedToDoItemsService.cs
- AttachmentModel.cs
- Download.cs
- Upload.cs
- UploadMultiple.cs
- DataTablesResponse.cs
- Create.cs
- Delete.cs
- Get.cs
- GetAll.cs
- GetAuditHistory.cs
- MappingProfile.cs
- Search.cs
- ToDoItemAuditModel.cs
- ToDoItemModel.cs
- Update.cs
- Authenticate.cs
- launchSettings.json
- appsettings.Development.json
- appsettings.json
- appsettings.Production.json
- CleanArchitectureCosmosDB.WebAPI.csproj
- Program.cs
- README.md
- Startup.cs
- ToDoItemTest.cs
- CleanArchitectureCosmosDB.UnitTests.csproj
- .gitignore
- CleanArchitectureCosmosDB.sln
- LICENSE
- README.md
# Installation Guide
1. Get the code
git clone https://github.com/ShawnShiSS/clean-architecture-azure-cosmos-db
Downloads the entire project code from GitHub to your computer.
cd clean-architecture-azure-cosmos-db
Moves into the project folder you just downloaded.
2. .NET
Medium RecommendedPrerequisites
dotnet restore
Downloads the packages the project depends on.
dotnet run
Builds the project and runs it immediately.
After dotnet run, check the message or address shown in the terminal.
3. Node.js
EasyPrerequisites
โ ๏ธ This is a large repository, so this method may point to an internal sub-package rather than the actual core product. Check the full README as well.
cd src/CleanArchitectureCosmosDB.ClientApp
This project's files live in a subfolder, so move into it first.
npm install
Downloads and installs the libraries listed in package.json.
npm start
Starts the development/run server.
After running the command, open the address shown in the terminal (usually something like http://localhost:3000) in your browser.
// repository documentation
Was this content helpful?
(0 ratings)
