Tirthankara is a web application that creates retrofuturistic artwork using AI. Built with Flask and deployed on a home Kubernetes cluster, it provides a web interface for users to generate images by entering text prompts. The project demonstrates modern deployment practices using container orchestration on affordable hardware. There is also a GitHub Actions workflow for CI/CD in progress.
Users can interact with Tirthankara in two ways:
- Through the web interface, where they can enter prompts and see generated images displayed with a carefully crafted gold-and-dark theme
- Through direct API calls, allowing programmatic access for automation or integration into other applications
The application handles all communication with Stable Diffusion using a single API key, so users don't need their own credentials.
The application is built using:
- Flask for the web server
- A custom-designed HTML/CSS interface
- Kubernetes (K3s) for deployment
- Two Orange Pi 3B boards for the computing cluster
Tirthankara/
├── src/
│ └── webapp.py
├── kubernetes/
│ ├── deployment.yaml
│ └── service.yaml
├── .github/workflows/deploy.yml
├── Dockerfile
├── requirements.txt
└── README.md
To use Tirthankara, simply:
- Visit the web interface at 'http://' (exact address will be updated after deployment -- currently the model is only deployed on a local network)
- Enter your prompt in the text field
- Click "Generate" to create your artwork
For programmatic access:
import requests
response = requests.post(
"http://<cluster-ip>/generate",
json={"prompt": "your artistic vision here"}
)If you want to run your own instance of Tirthankara:
- Clone the repository
- Set up a Kubernetes cluster (the project uses K3s on Orange Pi 3B boards)
- Create a secret with your Stable Diffusion API key:
kubectl create secret generic stability-api-secret \
--from-literal=api-key='your-api-key'- Deploy the application:
kubectl apply -f kubernetes/deployment.yaml
kubectl apply -f kubernetes/service.yamlFor local development:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtCreate a .env file with your API key and run:
STABILITY_API_KEY=your-api-key
python src/webapp.pyThis project demonstrates:
- Containerized application deployment
- Kubernetes orchestration on affordable hardware
- Secure API key management
- Modern web interface design
- Dual-mode access (web and API)