An API service that provides cultural and linguistic analysis of names using OpenAI's GPT model. This project is built with .NET 9.0 and follows cloud-native principles with Docker containerization.
- RESTful API endpoint for name analysis
- Cultural and linguistic meaning analysis across multiple cultures
- Docker containerization support
- CI/CD pipeline with GitHub Actions
- Markdown to plain text conversion for responses
- .NET 9.0 SDK
- Docker
- OpenAI API Key
The application uses the following configuration parameters that can be set in appsettings.json or through environment variables:
{
"OpenAi": {
"BaseUrl": "YOUR_OPENAI_BASE_URL",
"ApiKey": "YOUR_OPENAI_API_KEY"
}
}When running with Docker, configure the following environment variables in the container:
OpenAi__BaseUrl: OpenAI API base URLOpenAi__ApiKey: Your OpenAI API keyASPNETCORE_ENVIRONMENT: Application environment (Development, Production, etc.)
-
Clone the repository:
git clone https://github.com/jcmdsbr/cicd-sample.git cd Ifsp.Api -
Restore dependencies:
dotnet restore
-
Run the application:
dotnet run --project src/Ifsp.Api/Ifsp.Api.csproj
-
Build the container:
docker build -t ifsp.api ./src
-
Run the container:
docker run -d -p 8080:80 \ -e OpenAi__BaseUrl=YOUR_OPENAI_BASE_URL \ -e OpenAi__ApiKey=YOUR_OPENAI_API_KEY \ --name ifsp.api ifsp.api
docker-compose -f src/compose.yaml up -dGET /v1/whats-meaning-name/{name}| Parameter | Type | Description |
|---|---|---|
name |
string |
Required. Name to analyze |
The endpoint returns a detailed analysis of the name's meaning across different cultures:
- Indigenous cultures (focusing on Latin America)
- European cultures
- Asian cultures
- American cultures (North and South America)
- .NET 9.0 - Framework
- OpenAI API - AI service for name analysis
- Markdig - Markdown processing
- Docker - Containerization
- GitHub Actions - CI/CD
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Jean Carlos M. da Silva - GitHub