PsycheIT’s backend is a lightweight Express server that powers the core intelligence and identity features of the platform. It exposes three REST endpoints: one for classifying free-text student messages into mental health intents using a Naive Bayes NLP classifier, and two for anonymous authentication — letting students create and verify credentials without revealing any personally identifiable information.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.
Base URL
During local development the server runs on:http://localhost:5000 with your deployment origin in all examples below.
Content Type
Every request must include theContent-Type: application/json header, and every response body is JSON.
Authentication
The/classify endpoint requires no authentication. Both /signup and /login are public endpoints. /login returns a signed JWT token which the PsycheIT frontend stores in localStorage and uses to protect client-side routes. The API itself does not validate the JWT on any endpoint in the current implementation — token verification is handled entirely on the client side.
Endpoints Summary
| Method | Path | Auth Required | Description |
|---|---|---|---|
| POST | /classify | No | Classify a text message into a mental health intent |
| POST | /signup | No | Generate an anonymous userId and password |
| POST | /login | No | Verify credentials and return a JWT token |
Error Format
All error responses return HTTP 4xx status codes with a JSON body containing a singleerror field:
Explore the Endpoints
POST /classify
Detect a student’s mental health intent from free-text input using the onboard Naive Bayes classifier.
Auth Endpoints
Generate anonymous credentials with
/signup and obtain a JWT session token with /login.