Astarly is built on an event-driven asynchronous architecture, structured around the user lifecycle: lead → payment → access → progress. The backend is implemented using FastAPI with PostgreSQL via SQLAlchemy ORM. Secure authentication is ensured through JWT tokens, two-factor authentication (2FA), and time-based one-time passwords (TOTP), including email verification. The AI component relies on an external API (OpenAI / DeepSeek) and internal moderation logic, using a risk-prefilter based on heuristics [1]. The decision-making process of the chat assistant is formalized through a probabilistic relevance model: