AI-powered custom model training and image generation platform
Explore the docs »
View Demo
Table of Contents
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.
- 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
Frontend:
Backend:
Infrastructure & AI:
To get a local copy up and running, follow these simple steps.
-
.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
-
Clone the repository
git clone https://github.com/ips-ag/FotoGen.git cd FotoGen -
Backend Setup
cd src/api dotnet restore -
Frontend Setup
cd src/app npm install -
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" } } -
Run the Application
Backend:
cd src/api dotnet run --project FotoGen.ApiFrontend:
cd src/app npm run dev
- Upload Images: Upload 10-20 high-quality images of your subject
- Start Training: Initiate the model training process on Replicate
- Receive Notification: Get email notification when training completes
- Enter Prompt: Describe the image you want to generate using your trained model
- Generate: Create AI images using your custom model
- Download: Save generated images to your device
Note: You have one personal model available. Training a new model will overwrite your previous version.
FotoGen follows a clean architecture pattern with clear separation of concerns:
src/api/
├── FotoGen.Api/ # Web API layer
├── FotoGen.Application/ # Application logic & use cases
├── FotoGen.Domain/ # Domain entities & interfaces
└── FotoGen.Infrastructure/ # External services & data access
- 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
| Layer | Technology |
|---|---|
| Frontend | React + TypeScript + Vite + TailwindCSS |
| Backend | .NET 9 + ASP.NET Core Web API |
| Authentication | Microsoft Entra ID + MSAL |
| Storage | Azure Blob Storage |
| Azure Communication Services | |
| AI Platform | Replicate (Flux models) |
| Infrastructure | Azure Bicep templates |
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
IPS AG - @ips-ag
Project Link: https://github.com/ips-ag/FotoGen