main
Co-authored-by: Copilot <copilot@github.com>
All You Can GET AI
A multi-modal AI web application. Users can choose between different AI models for text generation, text-to-image, text-to-video, and image-to-video generation, powered by openrouter.ai.
Key features:
- Multi-modal AI generation (text, images, videos)
- User authentication and role-based access control
- Admin dashboard for managing users, models, and video jobs
- Gallery for viewing generated images and videos
- Chat interface with message history
- Image upload and preview functionality
Components
| Component | Technology | Description |
|---|---|---|
| Backend | FastAPI + uvicorn | REST API for auth, user management, and AI generation |
| Database | DuckDB | Lightweight embedded storage for users and session data |
| Frontend | Flask + Jinja2 | Server-rendered UI served at https://ai.allucanget.biz |
Getting Started
Prerequisites
- Python 3.12+
- An openrouter.ai API key
Setup
# Clone the repo
git clone https://git.allucanget.biz/allucanget/ai.allucanget.biz.git
cd ai.allucanget.biz
# Create and activate virtual environment
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/macOS
source .venv/bin/activate
# Install core dependencies
pip install -r requirements.txt
# Install development dependencies
pip install -r backend/requirements-dev.txt
pip install -r frontend/requirements-dev.txt
# Copy environment variables file
cp .env.example .env
# Edit .env file and add your OpenRouter API key and configure other settings
nano .env
Running the application locally
Backend (FastAPI + Uvicorn)
cd backend
uvicorn app.main:app --reload --port 12015
Frontend (Flask)
cd frontend
flask --app app.main run --port 12016 --debug
Running tests
# Run all tests
pytest
# Run backend tests only
pytest backend/tests/
# Run frontend tests only
pytest frontend/tests/
Available Environment Variables
| Variable | Description | Default |
|---|---|---|
OPENROUTER_API_KEY |
Your OpenRouter API key | Required |
ADMIN_EMAIL |
Default admin user email | ai@allucanget.biz |
ADMIN_PASSWORD |
Default admin user password | admin123 |
DATABASE_URL |
DuckDB database path | ../data/app.db |
Default admin user
On first startup a default admin account is created:
| Field | Value |
|---|---|
ai@allucanget.biz |
|
| Password | admin123 |
| Role | admin |
Override via environment variables ADMIN_EMAIL and ADMIN_PASSWORD before first run.
Deployment
Deployed on Coolify using Nixpacks. See docs/deployment/coolify.md for full instructions.
Project Structure
backend/ FastAPI backend
app/
__init__.py Package initialization
db.py Database connection and operations
dependencies.py Dependency injection
main.py FastAPI application entrypoint
models/ Pydantic and database models
routers/ API route handlers (auth, users, admin, generate, gallery)
services/ Business logic for AI generation, users, admin, etc.
tests/ Backend test suite
frontend/ Flask frontend
app/
__init__.py Package initialization
main.py Flask application entrypoint
templates/ Jinja2 HTML templates
static/ CSS, JS, images
tests/ Frontend test suite
data/ DuckDB database files, uploaded media, and generated content
logs/ Application logs
docs/ Architecture documentation (arc42 template)
nginx/ Nginx configuration for Coolify deployment
Documentation
For the full architecture documentation see docs/ARCHITECTURE.md, which links to all 12 arc42 sections.
Description
Languages
Python
70.2%
HTML
21.4%
CSS
5.7%
JavaScript
2.4%
Dockerfile
0.3%