Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Nandini-13/PsycheIT/llms.txt

Use this file to discover all available pages before exploring further.

SHANTI (Student Help and Nurturing Through Intelligent Interaction) is PsycheIT’s always-available mental health companion built specifically for Indian college students. Powered by a Naive Bayes text classifier trained on the Express.js backend, SHANTI listens to how you feel, identifies the type of distress you’re experiencing, and responds instantly with empathetic first-aid guidance and actionable coping tips — no appointment, no waiting room, no judgment.

How SHANTI Works

Every message you send travels through a lightweight NLP pipeline:
  1. You type a message in the chat input (e.g., "I can't sleep and keep overthinking").
  2. The frontend sends a POST request to the Express.js classifier endpoint:
POST http://localhost:5000/classify
Content-Type: application/json

{
  "message": "I can't sleep and keep overthinking"
}
  1. The Naive Bayes classifier (trained with the natural library) evaluates the message against 10 intent categories and returns the best-matching intent along with the top classification scores:
{
  "intent": "sleep",
  "classifications": [
    { "label": "sleep",   "value": 0.42 },
    { "label": "anxiety", "value": 0.31 },
    { "label": "general", "value": 0.11 }
  ]
}
  1. The frontend maps the intent to a pre-written reply and a tips array, then renders both in the chat window. Bot messages with tips display a “Try:” list beneath the reply text.

Supported Intents

IntentDescriptionExample MessageResponse Type
greetingCasual greetings and check-ins”Hi there” / “Good morning”Warm welcome prompt inviting the student to share
academicExam pressure, study stress, grade anxiety”I’m stressed about exams”Pomodoro 25/5 study tips, short walks
familyFamily conflicts, parental pressure, home issues”My parents keep fighting”Journaling suggestion, trusted-person prompt
socialLoneliness, rejection, relationship trouble”I feel left out”Peer forum referral, breathing exercise
sleepInsomnia, poor sleep schedule, night overthinking”I can’t sleep at night”Wind-down routine, no-screens tip, calming audio
anxietyPanic attacks, racing thoughts, constant worry”I feel anxious and panic”5-4-3-2-1 grounding exercise, slow breathing
highriskSuicidal ideation, hopelessness, self-harm”I want to disappear”Crisis helplines + counselor booking prompt
depressionPersistent sadness, loss of interest, emptiness”I don’t enjoy anything”Encouragement to talk to a trusted person
generalNeutral check-ins, feeling okay”I feel okay”Daily check-in prompt, optional coping tip
counselorRequesting professional help or therapy”I need a counselor”Direct redirect to /book counselor section

High-Risk Detection

When SHANTI detects the highrisk intent — messages expressing suicidal thoughts, hopelessness, or a desire to disappear — it immediately surfaces the following crisis resources in the chat:
  • Kiran Mental Health Helpline: 9152987821 (24/7, free, multilingual)
  • Prompt to call emergency services if in immediate danger
  • Offer to navigate directly to the Book a Counselor section
SHANTI will never minimize or redirect away from a high-risk message. If you or someone you know is in crisis, please call 9152987821 now.

Chat History

The left sidebar displays a list of Previous Chats. On first load, two pre-seeded example conversations — labelled “Chat on 11 Sep” and “Chat on 10 Sep” — are populated from the component’s initial useState value to illustrate the UI. Clicking any entry in the list loads its messages into the main chat window.
Chat history is held in client-side React state only — it is not accumulated across sessions or persisted to the server or a database. Refreshing the page or opening a new tab resets the sidebar to the original pre-seeded example entries and starts a blank active chat. An anonymous ID (e.g., Student#4821) is separately saved to localStorage to maintain a consistent display name within the same browser.

Using the Chatbot

1

Log in and navigate to the chatbot

Sign in to PsycheIT and go to /chatbot. SHANTI greets you with: “Hi 👋 I’m your mental health buddy. What’s on your mind?”
2

Type your message

Enter how you feel in the input field at the bottom of the chat. You can use plain, informal language — SHANTI understands colloquial Indian English. Example: "exam stress is killing me" or "can't stop overthinking at night".
3

Send the message

Press Enter or click the Send button. Your message appears on the right side of the chat as a user bubble. SHANTI calls POST /classify and displays a typing response within milliseconds.
4

Read the response and coping tips

SHANTI’s reply appears as a bot bubble on the left. If the detected intent includes coping strategies, a “Try:” section lists them beneath the reply — for example, “Pomodoro 25/5”, “Short walk”, or “5-4-3-2-1 grounding”. You can act on these immediately or continue the conversation.

Disclaimer

SHANTI provides mental health first-aid guidance only — it is not a licensed therapist, psychiatrist, or diagnostic instrument. Its responses are generated from pattern-matched intents and should not replace professional clinical assessment. For emergencies, call local emergency services or the Kiran Helpline at 9152987821.

Build docs developers (and LLMs) love