About This Architecture
Mental health screening chatbot using a five-phase sequence architecture that routes user input through message analysis, screening logic, and AI response generation. The system implements PHQ-9 and GAD-7 questionnaire scoring in the Screening Logic Engine, routes conversation through OpenAI GPT for empathetic responses, and persists all session data and assessment scores in PostgreSQL. This architecture separates concerns across Client, Application Server (Node.js/Express), Processing, and Database layers to ensure scalability and maintainability. Fork this diagram on Diagrams.so to customize screening instruments, integrate alternative AI providers, or adapt the sequence for your mental health platform.