Skip to content

Afaq300/Java-AI-Based-Content-Generator

 
 

Repository files navigation

AI-Based Content Generation Application

Introduction

This repository contains an AI-based content generation application with three core services:

  • Backend Service: Exposes customer, product, and product vector APIs (for finding similar products) via backend API Management (APIM).
  • Middleware Service: Provides content generation and embedding vector APIs, using OpenAI services to process user queries.
  • Frontend Service: A ReactJS application offering a chat interface where users can submit queries, interact with the system, and receive AI-generated content.

Each service uses Azure Key Vault and Managed Identity for secrets management in production environments. For local development, specific environment variables are required to authenticate against Key Vault.

Architecture Diagrams

Include the architecture diagrams here:

  1. Azure App Service Architecture

App Service Architecture

  1. Azure Kubernetes Service (AKS) Architecture AKS Architecture

Data Flow Diagram

Illustrates the interaction between frontend, middleware, backend, and external services such as OpenAI and Azure resources.

Data Flow Diagram

Getting Started

Prerequisites

  • Azure account with necessary permissions
  • Managed Identity configured for accessing Key Vault secrets
  • Azure API Management configured for both backend and middleware services
  • Node.js and React for frontend service
  • Java Spring Boot for backend and middleware services

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/Azure-Samples/Java-AI-Based-Content-Generator
    cd Java-AI-Based-Content-Generator
  2. Service Setup:

Running Locally

Each service can be run locally with specific instructions provided in each service folder.

Local Version Architecture Local Architecture

Local Environment Variables

To run locally, set the following environment variables to access Azure Key Vault:

export AZURE_KEYVAULT_URL=<your_keyvault_url>

Key Vault Setup

CI/CD Pipeline Configuration

We have a detailed guide on how to set up the CI/CD pipeline for this project, including building, testing, and deploying the applications to Azure services using Azure DevOps.

The CI/CD Pipeline Setup Guide provides a step-by-step walkthrough of the YAML configuration, variable groups, and service connections required to automate the build and deployment process.

You can find the guide here.

Prerequisites

  • Azure Subscription with access to Azure App Service and AKS.
  • Azure DevOps account for creating and running pipelines.
  • GitHub repository linked with Azure DevOps.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 71.9%
  • JavaScript 18.8%
  • SCSS 6.8%
  • HTML 1.3%
  • Other 1.2%