How shlavin/project works
This is a student-focused mental-health support web app: users register or sign in, chat with Rafiki, and can revisit conversations and mood information; the product also offers anxiety resources and mood-boosting content. React routes/pages call a Django API, while the backend exposes authentication, chat, conversation, and mood endpoints. The sampled pipeline detects mood, handles crisis phrases, builds replies, and persists chat messages. The README documents MySQL and transformer-based emotion classification; the endpoint-to-view implementation was not sampled, so uncertain internal dispatch is not expanded here.
Main entry points: App.js React routes · moodhistory.js Mood history · api.js API client · pipeline.py Chat response pipeline
Components 20
Student experience
- React routes
chatbot-frontend/src/App.js - Rafiki chat
chatbot-frontend/src/components/chatbot.js - Account pages
chatbot-frontend/src/pages/login.js - Conversation history
chatbot-frontend/src/pages/Conversations.js - API client
chatbot-frontend/src/services/api.js
Django API
- API routes
chatbot_project/urls.py - Request handlers
chatbot/views.py - API serializers
chatbot/serializers.py
Support and insights
- Wellness pages
chatbot-frontend/src/pages/anxiety-resources.js - Mood history
chatbot-frontend/src/pages/moodhistory.js - Mood boosters
chatbot-frontend/src/pages/moodBoosters.js - Mood visualizations
chatbot-frontend/src/components/MoodBarChart.js - Mood streaks
chatbot-frontend/src/components/MoodStreakTracker.js
Chat intelligence
- Chat response pipeline
chatbot/pipeline.py - Emotion classification
chatbot/pipeline.py - Reply generation service
chatbot/pipeline.py
Persistence and services
- User and messages
chatbot/models.py - MySQL database
- Together API
Other components
- Student
Connections 20
- Student → React routes: uses
- React routes → Rafiki chat: routes to
- React routes → Account pages: routes to
- React routes → Conversation history: routes to
- React routes → Wellness pages: routes to
- React routes → Mood history: routes to
- React routes → Mood boosters: routes to
- Rafiki chat → API client: posts message
- Conversation history → API client: fetches history
- Mood history → API client: requests moods
- API client → API routes: sends HTTP
- API routes → Request handlers: dispatches
- API routes → Request handlers: serves auth and mood
- Chat response pipeline → Emotion classification: classifies mood
- Chat response pipeline → Reply generation service: requests reply
- Reply generation service → Together API: calls
- Chat response pipeline → User and messages: reads and writes messages
- User and messages → MySQL database: stores records
- Mood history → Mood visualizations: renders
- Mood history → Mood streaks: renders