+47
@@ -0,0 +1,47 @@
|
|||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*.pyo
|
||||||
|
*.pyd
|
||||||
|
.Python
|
||||||
|
*.egg
|
||||||
|
*.egg-info/
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
eggs/
|
||||||
|
parts/
|
||||||
|
var/
|
||||||
|
sdist/
|
||||||
|
wheels/
|
||||||
|
pip-wheel-metadata/
|
||||||
|
|
||||||
|
# Virtual environments
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
ENV/
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# DuckDB data files
|
||||||
|
data/*.db
|
||||||
|
data/*.duckdb
|
||||||
|
|
||||||
|
# pytest
|
||||||
|
.pytest_cache/
|
||||||
|
.coverage
|
||||||
|
htmlcov/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# instructions
|
||||||
|
.github/instructions/
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
# 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](https://openrouter.ai).
|
||||||
|
|
||||||
|
## 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.11+
|
||||||
|
- An [openrouter.ai](https://openrouter.ai) API key
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone the repo
|
||||||
|
git clone <repo-url>
|
||||||
|
cd 12-ai.allucanget.biz
|
||||||
|
|
||||||
|
# Create and activate virtual environment
|
||||||
|
python -m venv .venv
|
||||||
|
# Windows
|
||||||
|
.venv\Scripts\activate
|
||||||
|
# Linux/macOS
|
||||||
|
source .venv/bin/activate
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
# Copy and fill in environment variables
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running the backend
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd backend
|
||||||
|
uvicorn app.main:app --reload --port 8000
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running the frontend
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd frontend
|
||||||
|
flask --app app.main run --port 5000
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running tests
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pytest
|
||||||
|
```
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
backend/ FastAPI backend
|
||||||
|
app/
|
||||||
|
routers/ API route handlers
|
||||||
|
services/ Business logic
|
||||||
|
models/ Pydantic models
|
||||||
|
tests/
|
||||||
|
frontend/ Flask frontend
|
||||||
|
app/
|
||||||
|
templates/ Jinja2 HTML templates
|
||||||
|
static/ CSS, JS, images
|
||||||
|
tests/
|
||||||
|
data/ DuckDB database files (gitignored)
|
||||||
|
docs/ Architecture documentation
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
For the full architecture documentation see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md), which links to all 12 arc42 sections.
|
||||||
Reference in New Issue
Block a user