Inspiration
Mental health is taking the lives of young Ghanaians, especially university students, yet it's not properly addressed. The stigma around seeking help, the fear of being identified, and the lack of accessible support channels mean many students suffer in silence. We've seen peers struggle with academic pressure, loneliness, anxiety, and grief with nowhere anonymous and safe to turn. That inspired us to build SafeSpace UG , a platform where students at the University of Ghana can get mental health support without ever revealing who they are.
What it does
SafeSpace UG is a mobile-first web app that lets UG students anonymously track their mood, journal, chat in peer support groups, and connect to crisis resources. Every day, students complete a mandatory check-in with a free-text mood description and a 5-question clinical survey, which gives counselling staff an instant intake overview before any in-person session. An AI-powered flagging engine (Claude Haiku 4.5) continuously monitors mood trends, journal entries, and activity patterns for signs of distress , in English, Ghanaian Pidgin, and Twi, and alerts the UG Counselling Directorate via structured email so staff can intervene early. Staff can review flags, initiate anonymous chats, and generate one-time session tokens so students can walk into the Counselling Centre with just a code, no name needed.
How we built it
We built the backend with Flask (Python) and MongoDB Atlas for storage. The frontend is vanilla JS with custom CSS using a dark glassmorphism theme, designed mobile-first. The daily check-in generates clinical summaries locally for instant results with zero latency. The periodic flagging engine sends mood and journal data to the Anthropic Claude API (Haiku 4.5), which returns structured JSON risk assessments. Email alerts go out via SMTP SSL with styled HTML containing the anonymous token, severity, mood trends, and a direct link to the staff dashboard. Staff authentication uses access codes, and students never provide any personal information — they enter anonymously and receive a generated identity like "Anon-BraveRiver" with a token like #UG-7742.
Challenges we ran into
Getting the AI flagging to work across three languages — English, Ghanaian Pidgin, and Twi — was a major challenge. Phrases like "I no fit again" or "me pe se me wu" carry deep distress but would be missed by keyword-based systems. We also had to balance sensitivity with false positives — "I killed it on the exam" shouldn't trigger an alert. Designing the two separate flagging systems (instant check-in flags vs. periodic AI pattern detection) without overlap or alert spam required careful deduplication logic. Making the email alerts work reliably with both Gmail and institutional SMTP while keeping the recipient swappable live from the dashboard also took significant iteration.
Accomplishments that we're proud of
We're proud that the entire platform requires zero personal data — no signup, no email, no name. The mandatory daily check-in gives counsellors a clinical summary and the student's own words before they ever meet face-to-face, which is something UG Counselling didn't have before. The one-time session token system bridges digital anonymity to in-person care seamlessly. We're also proud of the multilingual AI flagging — Claude understands context and dialect, so it catches compound distress signals across English, Pidgin, and Twi without fragile regex lists or keyword maintenance.
What we learned
We learned that privacy isn't just a feature — it's the foundation that makes everything else work. Students won't use a mental health tool if they fear being identified. We also learned that AI-powered analysis vastly outperforms hardcoded keyword rules for sensitive, multilingual contexts. On the technical side, we learned to separate fast local computation (check-in summaries) from thorough AI analysis (periodic flagging) to give users instant feedback while still running deep pattern detection in the background. Building for counselling staff taught us that integration matters — using email as the notification layer meant zero new software for staff to adopt.
What's next for safespace_ug
We plan to add scheduled automatic flagging with APScheduler or Celery instead of manual triggers, replace the 5-second chat polling with WebSocket real-time messaging via Socket.IO, and encrypt journal entries and check-in text at rest with AES-256. We want to integrate with UG's SSO/LDAP for proper staff authentication and add a keyword-based fallback if the Claude API is ever unreachable. Persistent identity, letting students re-enter their token to resume a previous session , is a key next step. Long-term, we want to deploy with HTTPS, add rate limiting, and work with the UG Counselling Directorate to pilot SafeSpace UG across campus.
Log in or sign up for Devpost to join the conversation.