https://github.com/codurance/sherpa
https://github.com/codurance/sherpa
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codurance/sherpa
- Owner: codurance
- Created: 2023-04-03T08:45:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-19T10:01:08.000Z (almost 2 years ago)
- Last Synced: 2024-07-19T11:03:01.236Z (almost 2 years ago)
- Language: JavaScript
- Size: 2.37 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sherpa
## Important โ ๏ธ
This README.md is just a quick reference, but if you are onboarding, take a look at the [onboarding documentation](https://codurance.atlassian.net/wiki/spaces/RD/pages/754515969/Technical+Onboarding) to set up the project properly.
## Requirements ๐ป
- .NET 6.0
- Docker
- Used for running test containers while testing
- Also used for running MongoDB [locally for dev environment](#running-local-db).
- Node.js LTS
- Used for running the TailwindCSS compiler.
## .NET dependencies
After opening the project, install all needed dependencies (IDE should do it by itself*).
*If not, run the following command:
```bash
dotnet restore
```
## Important Authentication Related Notes!
- As Blazor 6 is outdated and we don't expect patching comming from the DotNet team, we've had to patch the Blazor Authentication library to support Cognito, you can see that in `index.html` we've switched the default `Authentication.js` file for the patched one, present in our js folder. To see the patches, look for `//PATCH: ...` in the code. Brief summary of the patches
- Disable silent login using Iframe, as Cognito doesn't support it and Blazor will wait for **10 SECONDS** before trying the redirect login
- Tweak the logout params as Blazor was not using the previous fix on `Authentication.razor` file and using the default parameters instead, being those not supported by Cognito.
## To run ๐
Execute the project
```bash
cd SherpaBackend && dotnet run
```
or in watch mode
```bash
cd SherpaBackend && dotnet watch
```
###
Working with local database
You can use the following command:
```bash
docker run --name mongo -p 27017:27017 -d mongodb/mongodb-community-server:latest
```
For this DB, the connection string would be: `mongodb://localhost:27017/`
## To test ๐งช
Run the following command:
```bash
dotnet test
```
### Note
While executing the SherpaBackend tests some docker containers will open and close. This is normal, check (https://dotnet.testcontainers.org/) for more info.