For this codebase to run properly, the followings are required:
- Google Gemini AI API key
- Google Cloud Platform Credential file
https://dotnet.microsoft.com/en-us/download/dotnet/8.0
https://learn.microsoft.com/en-us/ef/core/cli/dotnet
dotnet tool install --global dotnet-ef
Direct install: https://www.postgresql.org/download/
or
Using Docker: https://hub.docker.com/_/postgres/
Setup PostgreSQL and update the connection string in appsettings.Development.json accordingly:
appsettings.Development.json
...
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Port=5432;Database=app-bootstrap;User Id=postgres;Password=admin123;"
},
...
git clone https://github.com/AnNguyenLe/LearningMate.git
- Go to Google AI Studio.
- Log in with your Google account.
- Create an API key.
- Add Gemini API key to
appsettings.Development.json
"GeminiFlashOptions": {
"BaseUrl": "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent",
"ApiKey": "your-gemini-flash-api-key-here"
},
(Reference: Learn how to get API Key for GCP TTS)
-
Store and get file path to GCP Crendential on local machine
-
Paste file path into
appsettings.Development.json
"GoogleCreadentialOptions": {
"FilePath": "your-json-google-credential-file-path-here"
}
From root folder LearningMate (Terminal view):
Step 1:
LearningMate % cd src/LearningMate.Infrastructure
Step 2:
LearningMate.Infrastructure % dotnet ef database update --startup-project ../LearningMate.WebAPI
From root folder LearningMate (Terminal view):
Step 1:
LearningMate % cd src/LearningMate.WebAPI
Step 2:
LearningMate.WebAPI % dotnet build
Step 3:
LearningMate.WebAPI % dotnet watch