๐ŸŒŸ Inspiration Mental health tools often feel like two extremes: either they are too clinical and scary, or they are "black box" AI models that feel impersonal and untrustworthy. We wanted to build a "middle ground"โ€”a digital check-in tool that is transparent, fast, and private. Our goal was to create a digital mirror that helps people visualize their stress levels using clear logic they can actually understand.

๐Ÿ› ๏ธ What it does The app takes a user's text input and analyzes the emotional weight of their words. It doesn't just look for "bad" words; it balances stress and depressive signals against positive ones to give a nuanced score.

The Stress Meter: Provides a visual gauge of current tension.

Smart Quotes: Offers grounding advice based on the detected mood.

Safety Net: The most critical feature is the "Critical Override." If high-risk language is detected, the app stops the analysis and immediately displays verified crisis helplines.

โš™๏ธ How we built it We prioritized a "Low Code, High Reliability" stack:

Python & FastAPI: For a lightning-fast backend that handles the logic.

CSV-Driven Logic: Instead of a heavy AI model, we used weighted CSV files. This makes the "brain" of the app easy to update and audit.

Vanilla JavaScript & Bootstrap: For a responsive, clean frontend that works on any device without a long loading screen.

๐Ÿšง Challenges we ran into The biggest hurdle was context. Words like "pressure" can be negative (work pressure) or neutral. We spent a lot of time "tuning" the weights in our CSV files to ensure the math reflected real human emotions. Another challenge was deploymentโ€”making sure the frontend on Vercel could securely talk to our backend on Render while handling the "cold start" delay of free-tier hosting.

๐Ÿ† Accomplishments that we're proud of We are incredibly proud of the Critical Override logic. It was vital to us that the app was responsible. If a user is in a dark place, the app doesn't just give them a "score"โ€”it acts as a bridge to real-world help. We also succeeded in keeping the entire app under two main code files, making it incredibly maintainable.

๐Ÿ“š What we learned We learned that you don't always need a massive Neural Network to solve a human problem. Sometimes, deterministic logic (if/then/else) is better because it is 100% predictable and safe. We also deepened our understanding of CORS, environment variables for cloud ports, and how to build "stateless" applications that protect user privacy by design.

๐Ÿš€ What's next for Text-Based-Stress-Analyzer The next step is to expand our lexicons to include multi-language support, specifically focusing on regional Indian languages. We also want to add a "Trend Tracker" that allows users to download a local file of their scores over a week so they can see patterns in their stress without their data ever touching a database.

Built With

  • and-pandas-for-a-logic-driven-backend
  • bootstrap-5
  • bootstrap-5-and-vanilla-js-for-a-responsive-frontend
  • fastapi
  • github
  • javascript
  • pandas
  • python
  • render
  • vercel
Share this project:

Updates