Sona is a medical appointment scheduling application composed of three main parts:
- A modern landing page
- An intelligent web chatbot
- A backend that handles business logic and integrates with WhatsApp
The project is structured into three main components:
sona-backend/
├── front-end copy/ # Landing page (Next.js)
├── frontend/ # Web chatbot (Next.js)
└── src/ # Backend (Node.js/Express)
- Backend:
3000
- Landing Page:
3001
- Chatbot:
3002
- Node.js (v14 or higher)
- npm or yarn
- Twilio account (for WhatsApp integration)
- OpenAI account
- Mistral AI account
Create a .env
file at the project root with the following structure:
# Server Configuration
PORT=3000
# Twilio Configuration
TWILIO_ACCOUNT_SID=your_account_sid
TWILIO_AUTH_TOKEN=your_auth_token
TWILIO_PHONE_NUMBER=whatsapp:+1234567890
# Mistral AI Configuration
MISTRAL_API_KEY=your_mistral_api_key
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key
cd sona-backend
npm install
cd "front-end copy"
npm install
cd frontend
npm install
cd sona-backend
npm run dev
cd "front-end copy"
npm run dev
cd frontend
npm run dev
src/
├── config/ # Configuration (Twilio, OpenAI, Mistral)
├── controllers/ # Controllers
├── routes/ # API routes
├── services/ # Business logic services
└── lib/ # Utilities and helpers
front-end copy/
├── app/ # Next.js pages
├── components/ # React components
├── lib/ # Utilities
└── public/ # Static assets
frontend/
├── app/ # Next.js pages
├── components/ # React components
├── hooks/ # Custom hooks
└── types/ # TypeScript types
- The user sends a message on WhatsApp.
- Twilio forwards the message to the backend.
- The backend uses Mistral AI to generate a response.
- The response is sent back to the user via WhatsApp.
- The user interacts with the chatbot.
- Messages are processed by the backend.
- Responses are generated using Mistral AI.
- Supports both text and voice messages.
- Frontend: Next.js, TypeScript, Tailwind CSS
- Backend: Node.js, Express, TypeScript
- AI: Mistral AI, OpenAI (for audio transcription)
- Communication: Twilio (WhatsApp)
- Schedule medical appointments via WhatsApp or web chatbot.
- Modern and responsive user interface.
- Multilingual support.
- Speech-to-text transcription.
- Medical office geolocation.
- Intelligent appointment management.
- Fork the project.
- Create your branch (
git checkout -b feature/AmazingFeature
). - Commit your changes (
git commit -m 'Add some AmazingFeature'
). - Push to the branch (
git push origin feature/AmazingFeature
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE
file for more details.
🚀 Developed with passion by the Sona team!