How charls362/clinicaia works
Project type and purpose
• From the README and file structure, we see this is a full-stack web application (“EMERAL DENT CLINICA”) that lets dental patients register/login, view/manage appointments, chat with the doctor, and—crucially—use a voice-enabled AI agent to schedule via natural language commands.
File structure
• Top-level entries:
• README.md (project description)
• bot/ (AI–agent integration code)
• node_modules/ (all Node.js dependencies)
• Although we don’t see explicit frontend/ backend folders, the presence of node_modules and a “bot” folder implies a JavaScript/TypeScript Node.js backend and a dedicated submodule for the voice-agent logic. The frontend code may live at root or be in a client folder not shown here.
README for additional insights
• Authentication: registration & login
• Appointment CRUD: manual booking, deletion
• AI-powered voice scheduling via an “agent”
• Chat with doctor feature
• Mobile-responsive web UI
Main components
a. Frontend (Web/Mobile UI)
– Renders registration/login screens
– Shows user profile and appointments
– Provides manual booking forms and chat widget
– Captures voice input and streams to the AI agent
b. Backend API Server
– Exposes REST/GraphQL endpoints for auth, appointments, chat
– Implements business logic and validation
– Coordinates calls between the database and the AI agent
c. Database
– Stores user profiles, authentication credentials, appointment records
– Could be a relational DB (PostgreSQL/MySQL) or document DB (MongoDB)
d. AI Agent Service (bot/)
– Voice-to-text processing (e.g., Google Speech-to-Text, Azure)
– Natural language understanding (NLP) to extract date/time/dentist
– Maps parsed intent into booking API calls on the backend
e. Optional External Services
– Auth provider (JWT or OAuth)
– Third-party chat or messaging service for “chat with doctor”
– SMS/Email gateway for appointment reminders
Relationships and interactions
• User ↔ Frontend: UI events, form submissions, voice streams
• Frontend → Backend: HTTP(S) calls for login, CRUD operations
• Backend ↔ Database: CRUD on users & appointments
• Backend ↔ AI Agent: gRPC/HTTP calls sending audio or text snippets
• AI Agent → Speech-to-Text & NLP APIs: external cloud calls
• Frontend ↔ Chat Service: bi-directional WebSocket or HTTP polling
Architectural patterns and design principles
• Client-Server separation: clear boundary between UI and business logic
• Microservice or modular subcomponent for AI agent (bot/)
• RESTful (or GraphQL) API layer for all data operations
• Stateless backend nodes; state persisted in the database
• Use of cloud-hosted speech/NLP for scalable AI processing