Skip to content
Swaraksha

Swaraksha

Heal Without Fear

Created on 25th January 2026

•

Swaraksha

Swaraksha

Heal Without Fear

The problem Swaraksha solves

The problem it solves

Mental health support today faces two massive walls: fear and access.

We realized that even when people want help, they often don't seek it because they are afraid of being judged or leaving a digital paper trail. On top of that, professional therapy is expensive and often has long waiting lists. If you're having a panic attack at 3 AM, you can't just "book an appointment."

Swaraksha (which means "Self-Protection") bridges this gap by offering immediate, anonymous, and judgment-free support.

  • It removes the fear of entry: By eliminating logins and emails, we created a "Zero-Knowledge" system. Users can start healing the second they open the page, knowing their identity is completely protected.
  • It acts as a "Therapeutic Jarvis": Sometimes, typing is too hard when you're overwhelmed. Our voice-enabled AI allows users to just speak to a supportive companion that listens and responds instantly, making support feel like a natural conversation rather than a clinical intake form.
  • It empowers self-regulation: We moved beyond just "chatting" to include active coping mechanisms. Whether it's "popping" a stressful thought in our mini-game, tracking mood trends to build self-awareness, or finding a nearby park to cool down, Swaraksha gives users tangible tools to manage their own mental state before it escalates.

Challenges we ran into

1. Latency Bottlenecks in Voice Conversational Flow

  • The Technical Hurdle: Our initial prototype relied on standard CPU-based inference, resulting in a Time-To-First-Token (TTFT) of ~3-4 seconds. In a text-based chat, this is acceptable latency. However, in a full-duplex voice interface, this delay caused "turn-taking" errors where users would speak over the AI, breaking the conversational state.
  • The Solution: We migrated our inference pipeline to Groq’s LPU (Language Processing Unit) architecture. This reduced our TTFT to <300ms, allowing us to process Speech-to-Text and generate LLM responses in near real-time, effectively solving the synchronization issues in the voice loop.

2. Architecting "Zero-Knowledge" Persistence

  • The Technical Hurdle: We needed to maintain conversational context and mood analytics (PostgreSQL relational data) without linking it to a user identity (Auth tables). The challenge was creating a persistent session that survives browser refreshes but leaves no PII (Personally Identifiable Information) on our servers.
  • The Solution: We implemented a client-side session generation strategy. instead of a server-issued cookie, the frontend generates a cryptographically secure UUID upon first load and stores it in localStorage. The backend treats this UUID as an ephemeral key to associate vector memory and mood logs, validating the session existence without ever requiring an authentication handshake or email linkage.

3. Mitigating Non-Deterministic LLM Output in Crisis Scenarios

  • The Technical Hurdle: LLMs are inherently probabilistic. Relying on a prompt system instruction (e.g., "If user is sad, help them") was insufficient for high-stakes crisis scenarios (e.g., self-harm ideation), where the model might hallucinate metaphors instead of providing helpline numbers.
  • The Solution: We built a deterministic middleware interceptor (crisisService.js) that sits upstream of the AI service. This service runs input payloads against a weighted keyword and regex pattern matcher. If a threshold is breached, the request is short-circuited bypassing the LLM entirely to return a hard-coded, clinically safe JSON response containing local emergency resources. This ensures safety is algorithmic, not probabilistic.

4. Managing Global State for "Fluid" Transitions

  • The Technical Hurdle: We wanted the app to feel like a native SPA (Single Page Application) with zero layout shifts, but our heavy use of graphical assets (charts, animations) caused render blocking during route changes.
  • The Solution: We utilized React Query for aggressive pre-fetching of session data and Framer Motion’s AnimatePresence to handle component unmounting lifecycles. We wrapped the router outlet in a motion component that manages the exit/entry animations of the DOM tree, ensuring the UI thread remains unblocked even while fetching new chat contexts.

Discussion

Builders also viewed

See more projects on Devfolio