https://github.com/bobbylite/dotnet-realmikefacts
RealMikeFacts is back in dotnet
https://github.com/bobbylite/dotnet-realmikefacts
Last synced: 8 months ago
JSON representation
RealMikeFacts is back in dotnet
- Host: GitHub
- URL: https://github.com/bobbylite/dotnet-realmikefacts
- Owner: bobbylite
- License: gpl-3.0
- Created: 2023-10-19T02:57:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-03T20:51:41.000Z (over 1 year ago)
- Last Synced: 2025-01-02T15:19:04.644Z (over 1 year ago)
- Language: C#
- Size: 639 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# dotnet-realmikefacts
This repository serves as a IAM demo that leverages OpenAI's training models.
## Technical Deep Dive
This project was created with Microsoft asp.net 8. More information can be found here: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-new-sdk-templates#web-options
RealMikeFacts leverages the power of AI with OpenAI's powerfully trained models. More information can be found here: https://platform.openai.com/
* AI Solution: Open AI
* IAM Solution: Microsoft AzureAD B2C
* Hosting Solution: Microsoft Azure web services
* Database Soluiton: Microsoft Comsos Mongo DB
## App configuration
Edit `appsettings.json` to customize the behavior of OOTB features.
```json
{
"OpenAI": {
"BaseUrl": "https://api.openai.com/",
"AccessToken": "...",
"MaxTokens": 250,
"temperature": 0.7,
"model": "..."
},
"Twitter": {
"BaseUrl": "https://api.twitter.com/",
"ClientId": "...",
"ClientSecret": "..."
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"AzureAd": {
"Instance": "https://{domain}.b2clogin.com/",
"Domain": "{domain}.onmicrosoft.com",
"ClientId": "...",
"TenantId": "...",
"ClientSecret": "...",
"ClientCertificates": [
],
"SignUpSignInPolicyId": "{name_of_policy_flow}",
"CallbackPath": "/signin-oidc"
},
"Authorization": {
"Policies": {
"Users": {
"RequiredClaims": [
{
"ClaimType": "tfp",
"AllowedValues": [
"{name_of_policy_flow}"
]
}
]
}
}
}
}
```
## How to run project
```sh
dotnet build release -c
dotnet run --launch-profile "https"
```
## How to authorize a new page in the application for a custom group policy.
```csharp
[Authorize(Policy = PolicyNames.AdministratorsGroup)] // Must configure group policy in AzureAD B2C tenant.
public class AdministratorsModel : PageModel
{
public AdministratorsModel()
{
}
public void OnGet()
{
}
}
```
## Documentation
The following documentation is available in this repository.
* `README.md` - the steps for configuring the application.
## RealMikeFacts Live
Please check out RealMikeFacts at https://realmikefacts.azurewebsites.net