Inspiration

This project was born out of a deep concern for the safety and well-being of children. Many children face abuse but lack the knowledge or confidence to speak up, while parents often struggle to recognize signs or initiate difficult conversations. In countries like Pakistan, where such subjects are often considered taboo, it is even more difficult to guide the children in an effective manner. We wanted to create a resource that educates children in a gentle, age-appropriate way about what abuse is and how to protect themselves. At the same time, it supports parents with practical guidance to foster open communication and ensure their child's safety. By bridging this gap, the project aims to build stronger, safer families and empower children to grow up with confidence and security.

What it does

Core Features

1. 🔐 Authentication & Authorization

  • User Registration: Email-based signup for parents and children
  • Role-Based Access Control: Separate permissions for parents and children

2. 🤖 AI Chatbot System

👶 Child Chatbot ("SafeMigo")

  • Friendly Interface: Child-appropriate language and tone
  • Safety Education: Interactive learning conversations
  • Distress Detection: AI identifies concerning messages and alerts parents

👨‍👩‍👧 Parent Chatbot ("Parent Assistant")

  • Parenting Guidance: Expert advice on child safety
  • Context-Aware Responses: RAG-enhanced knowledge base with data from reliable sources
  • Resource Recommendations: Curated safety resources

3. 🎮 Interactive Learning System

🧠 Game-Based Learning

  • Body Safety Game: Interactive clickable body diagram
  • Color-Coded Zones: Visual learning (green/yellow/red)
  • Zone Information: Detailed explanations for each body part
  • Engaging UI: Animations and interactive elements

📚 Structured Lessons

  • Multiple Lessons: Various safety topics
  • Interactive Quizzes: Multiple-choice questions
  • Instant Feedback: Real-time answer validation
  • Pass/Fail System: 70% threshold for completion

4. 📊 Progress Tracking & Analytics

👦 Child Dashboard

  • Personal Progress: Individual lesson completion
  • Achievement Levels: Dynamic badges based on performance
  • Detailed Statistics: Completion rates and accuracy
  • Learning History: Timeline of completed lessons

👨‍👩‍👧 Parent Dashboard

  • Child Progress Overview: Monitor all linked children
  • Detailed Analytics: Per-child statistics
  • Lesson-Level Details: Individual quiz scores
  • Activity Timeline: Chronological learning history

5. 🚨 Emergency & Safety Features

🆘 Emergency Alert System

  • Quick Access Button: Floating emergency button for children
  • Custom Messages: Describe the situation
  • Location Sharing: Location information shared
  • Parent Notifications: Instant alerts to linked parents
  • Distress Detection: AI monitoring in chat conversations

📚 Safety Resources

  • Hotlines Database: Emergency contact numbers
  • Educational Articles: Safety guides and tips
  • Organization Links: Child protection organizations
  • Counseling Requests: Connect with professionals

6. 🎨 User Interface Features

🖼️ Visual Design

  • Responsive Design: Mobile and desktop optimized
  • Smooth Animations: Transitions and hover effects
  • Accessible UI: Screen reader friendly
  • Gamified UI: Child-friendly interface

7. 🗂️ Data Management

👤 Profile Management

  • User Profiles: View and manage account information
  • Parent-Child Linking: Connect family accounts

8. 📦 Content Management

📘 Lesson System

  • Pre-loaded Lessons: Database-driven content
  • Dynamic Questions: Randomizable quiz order

📚 Resource Library

  • Curated Content: Vetted safety resources
  • Multiple Categories: Hotlines, articles, organizations
  • External Links: Direct access to help services
  • Regular Updates: Expandable resource database

How we built it

Frontend

Core Framework

  • Next.js - React framework with App Router
  • React - UI library
  • React DOM - React renderer for web

Styling & UI

  • Tailwind CSS 4 - Utility-first CSS framework
  • PostCSS - CSS processing
  • Lucide React - Modern icon library

Utilities

  • JavaScript/JSX - Frontend programming
  • Next.js App Router - File-based routing system
  • Client-side Storage - LocalStorage for auth tokens and user data

Backend

Core Framework

  • FastAPI - Modern Python web framework
  • Uvicorn - ASGI server for FastAPI
  • Python 3.10+ - Backend programming language

Data Validation & Models

  • Pydantic - Data validation and serialization
  • Pydantic Settings - Configuration management

Authentication & Security

  • Bcrypt - Secure password hashing algorithm

Database

  • SQLite3 - Lightweight relational database

AI & Machine Learning

LangChain Ecosystem

  • LangChain - Framework for RAG-based LLM applications

AI Model Providers

  • *Google Gemini *

    • langchain-google-genai - LangChain integration
    • google-generativeai - Google AI SDK
    • Model: gemini-2.5-flash-lite
  • HuggingFace (Alternative)

    • langchain-huggingface - LangChain integration
    • huggingface-hub - Model repository access

Challenges we ran into

🧠 Technical Challenges

1. AI Distress Detection Accuracy

  • Ensuring the child chatbot correctly identifies signs of distress and sends an emergency signal to parents.

2. Child-Friendly UX Design

  • Designing interfaces that are intuitive and engaging for children.
  • Balancing fun visuals with clarity and emotional safety.

3. Scalable RAG System

  • Managing a growing knowledge base with trusted sources.
  • Delivering fast, context-aware responses without overwhelming users.

📚 Educational & Content Challenges

4. Age-Appropriate Safety Education

  • Creating content that educates without causing fear.
  • Tailoring lessons to different developmental stages.

5. Cultural Sensitivity

  • Respecting diverse cultural norms and parenting styles.
  • Avoiding content that may be misinterpreted or rejected.

👨‍👩‍👧‍👦 User Engagement Challenges

6. Parent-Child Collaboration

  • Encouraging parents to participate actively.
  • Helping children feel empowered rather than monitored.

7. Gamification Balance

  • Making learning fun without trivializing serious topics.
  • Ensuring badges and progress tracking motivate positively.

🛠️ Development & Maintenance Challenges

8. Content Updates & Expansion

  • Keeping safety resources and lessons up to date.
  • Scaling content as new threats or topics emerge.

Accomplishments that we're proud of

  • Developed a child-friendly AI chatbot that teaches body safety in a safe and engaging way
  • Built an emergency alert system with location sharing that notifies parents
  • Created a gamified learning system with interactive body diagrams and quizzes
  • Integrated RAG-based AI responses using trusted safety resources and expert guidance

What we learned

  • The importance of child-centric design: Creating interfaces and content for children requires empathy, simplicity, and a deep understanding of their cognitive and emotional development.

  • The power of AI in education and safety: We learned how AI, when used responsibly, can be a powerful tool for both educating children and supporting parents in real-time.

  • Challenges of content sensitivity: Teaching about child abuse requires careful language and tone. We learned to craft content that is informative yet gentle, avoiding fear while promoting awareness.

  • Parent-child dynamics in digital tools: Designing a system that supports both children and parents helped us understand the importance of building trust and encouraging open communication.

  • Technical integration of modern stacks: Working with tools like FastAPI, Next.js, LangChain, and ChromaDB gave us hands-on experience in building scalable, AI-powered applications.

What's next for Safe Net

Future Enhancements

  1. Real-time Notifications and Child Location support - WebSocket support
  2. Multi-language Support - Internationalization by supporting multiple languages (particularly Urdu)
  3. Mobile Apps - React Native versions
  4. Advanced Analytics - ML-based insights
  5. Video Content - Interactive safety videos
  6. Gamification - Points, badges, and leaderboards
  7. Admin Dashboard - Content management system

Built With

  • chromadb
  • fastapi
  • googlegemini
  • huggingface
  • javascript/jsx
  • langchian
  • luicdereact
  • next.js
  • passlib
  • postcss
  • pydantic
  • pyjwt
  • python
  • react
  • reactdom
  • sqlite
  • tailwindcss
  • unicorn
Share this project:

Updates