Skip to content

jcmdsbr/cicd-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IFSP API - Name Analysis Service

CI/CD

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.

🚀 Features

  • 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

📋 Prerequisites

🛠️ Configuration

Environment Variables

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"
  }
}

Docker Environment Variables

When running with Docker, configure the following environment variables in the container:

  • OpenAi__BaseUrl: OpenAI API base URL
  • OpenAi__ApiKey: Your OpenAI API key
  • ASPNETCORE_ENVIRONMENT: Application environment (Development, Production, etc.)

🚀 Running the Application

Local Development

  1. Clone the repository:

    git clone https://github.com/jcmdsbr/cicd-sample.git
    cd Ifsp.Api
  2. Restore dependencies:

    dotnet restore
  3. Run the application:

    dotnet run --project src/Ifsp.Api/Ifsp.Api.csproj

Using Docker

  1. Build the container:

    docker build -t ifsp.api ./src
  2. 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

Using Docker Compose

docker-compose -f src/compose.yaml up -d

🔌 API Endpoints

Get Name Analysis

GET /v1/whats-meaning-name/{name}

Parameters

Parameter Type Description
name string Required. Name to analyze

Response

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)

🛠️ Built With

👥 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

✨ Author

  • Jean Carlos M. da Silva - GitHub

About

Projeto voltado para apresentar o processo de CI/CD

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors