Ga naar inhoud

AMA Architectuur

Overzicht

LoJoDesktop (Tauri/React)

    |

    | HTTPS API calls

    v

AMA Backend (FastAPI) - ama.jhold.nl

    |

    |-- PostgreSQL (database)

    |-- OpenAI API (classificatie)

    |-- IMAP (jhold.nl, lula-cafe.com)

    |-- Microsoft Graph (Outlook) [gepland]

    |-- Telegram Bot (notificaties)

Codestructuur

/opt/ama/

    docker-compose.yml

    Caddyfile

    .env

    backend/

        app/

            main.py           FastAPI app + scheduler

            config.py         Alle instellingen via .env

            deps.py           API secret verificatie

            models/           Database modellen

            routes/           API endpoints

            services/

                classifier.py     AI classificatie

                imap_sync.py      IMAP email ophalen

                telegram.py       Notificaties

                prompts.py        AI prompts

            data/

                mailboxes.py      Mailbox definities

API Endpoints

| Endpoint | Methode | Beschrijving |

|----------|---------|-------------|

| /health | GET | Status check |

| /api/v1/accounts | GET/POST | Mailboxen beheren |

| /api/v1/messages | GET | Emails ophalen |

| /api/v1/messages/classify | POST | Email classificeren |

| /api/v1/invoices/pending | GET | Openstaande facturen |

| /api/v1/invoices/{id}/forward | POST | Factuur doorsturen |

| /api/v1/sync/trigger | POST | Handmatige sync |

| /admin | GET | Admin webpagina |