Skip to content

Latest commit

 

History

76 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


FotoGen

AI-powered custom model training and image generation platform
Explore the docs »

View Demo

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Architecture
  5. Contributing
  6. License
  7. Contact

About The Project

FotoGen is an advanced AI-powered platform that enables users to create custom image generation models and generate personalized AI images. The application leverages Replicate's infrastructure for model training and integrates with Azure services for scalable cloud deployment.

Key Features

  • Custom Model Training: Upload your images and train personalized AI models
  • AI Image Generation: Generate high-quality images using your trained custom models
  • Email Notifications: Receive automated email notifications when model training completes
  • Secure Authentication: Microsoft Entra ID integration for secure authentication
  • Cloud-native Architecture: Built on Azure with scalable infrastructure
  • Modern UI/UX: Responsive React frontend with Shadcn/UI components

(back to top)

Built With

Frontend:

  • React
  • TypeScript
  • Vite
  • TailwindCSS
  • Shadcn/UI

Backend:

  • .NET
  • C#

Infrastructure & AI:

  • Azure
  • Replicate

(back to top)

Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

  • .NET 9.0 SDK

    # Download from https://dotnet.microsoft.com/download/dotnet/9.0
    dotnet --version
  • Node.js (20+)

    # Install Node.js from https://nodejs.org/
    node --version
    npm --version
  • Azure Account with the following services:

    • Azure Storage Account
    • Azure Communication Services (for email notifications)
    • Microsoft Entra ID (for authentication)
  • Replicate Account for AI model training and inference

Installation

  1. Clone the repository

    git clone https://github.com/ips-ag/FotoGen.git
    cd FotoGen
  2. Backend Setup

    cd src/api
    dotnet restore
  3. Frontend Setup

    cd src/app
    npm install
  4. Configure Environment Variables

    Create src/api/FotoGen.Api/secrets.json:

    {
      "Replicate": {
        "Token": "your_replicate_token",
        "Owner": "your_replicate_account_owner",
      },
      "AzureStorage": {
        "ConnectionString": "your_azure_storage_connection_string"
      },
      "Authentication": {
        "ClientId": "your_entra_id_client_id",
        "Authority": "your_entra_id_authority"
      }
    }
  5. Run the Application

    Backend:

    cd src/api
    dotnet run --project FotoGen.Api

    Frontend:

    cd src/app
    npm run dev

(back to top)

Usage

Training a Custom Model

  1. Upload Images: Upload 10-20 high-quality images of your subject
  2. Start Training: Initiate the model training process on Replicate
  3. Receive Notification: Get email notification when training completes

Generating Images

  1. Enter Prompt: Describe the image you want to generate using your trained model
  2. Generate: Create AI images using your custom model
  3. Download: Save generated images to your device

Note: You have one personal model available. Training a new model will overwrite your previous version.

(back to top)

Architecture

FotoGen follows a clean architecture pattern with clear separation of concerns:

Backend Structure

src/api/
├── FotoGen.Api/              # Web API layer
├── FotoGen.Application/      # Application logic & use cases
├── FotoGen.Domain/          # Domain entities & interfaces
└── FotoGen.Infrastructure/  # External services & data access

Key Components

  • Clean Architecture: Separation of concerns with dependency inversion
  • CQRS Pattern: Command and Query Responsibility Segregation using MediatR
  • Background Services: Automated model training monitoring and email notifications
  • Repository Pattern: Data access abstraction
  • Azure Integration: Storage, Communication Services, and Authentication

Technology Stack

Layer Technology
Frontend React + TypeScript + Vite + TailwindCSS
Backend .NET 9 + ASP.NET Core Web API
Authentication Microsoft Entra ID + MSAL
Storage Azure Blob Storage
Email Azure Communication Services
AI Platform Replicate (Flux models)
Infrastructure Azure Bicep templates

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

IPS AG - @ips-ag

Project Link: https://github.com/ips-ag/FotoGen

(back to top)

About

App for creating custom models and generating AI images

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages