Guardian-Net is a revolutionary approach to online child and teenager safety that prioritizes education and empowerment over surveillance. Instead of tracking, recording, and reporting children's private messages to parents, Guardian-Net acts as an on-device, real-time digital safety assistant. It guides young users through context-aware, educational interventions directly at the point of communication, fostering agency and trust.
- π What is Guardian-Net?
- π§ Core Philosophy
- π¦ Project Structure & Components
- β¨ Key Features
- π Detection Engine
- βοΈ Requirements & Dependencies
- π Setup & How to Run
- π§ͺ Test Scenarios
- π Git & GitHub Upload Readiness Check
- π‘οΈ Ethical Considerations & Privacy Commitments
- π License
Guardian-Net is a prototype of an intelligent digital safety keyboard/web application designed to protect minors in real-time. Operating entirely on-device to protect user privacy, it runs incoming text through a hybrid sentiment and semantic analysis engine to classify risk levels and suggest safety interventions when potentially dangerous situations (grooming, direct threats, cyberbullying, self-harm, location leakage) are detected.
Guardian-Net represents a paradigm shift:
- Privacy-First: User messages are never stored, logged, or uploaded to servers. All logic is executed in the user's local runtime.
- Education Over Surveillance: Instead of locking down communication or secretly notifying guardians of specific texts, Guardian-Net teaches the user why a message is risky and allows them to self-correct.
- Trust Building: It avoids parental surveillance loops that lead to kids finding workarounds. It rebuilds healthy communication channels between teens and guardians.
The workspace contains both prototype mockups and a fully functional React web application:
Guardian-Net web app/
βββ .gitignore # Root Git ignore configuration
βββ .vscode/ # VS Code local workspace configurations (ignored by Git)
βββ README.md # Root project documentation (this file)
βββ Project.docx # Project proposal documentation (ignored by Git)
βββ pro.pdf # Comprehensive project proposal/spec PDF (ignored by Git)
βββ files.zip # Archive of core files (ignored by Git)
βββ files/ # Core source files directory
βββ PROJECT_SUMMARY.md # High-level feature summary & roadmap
βββ TECHNICAL_SPEC.md # Technical design & architecture specification
βββ IMPLEMENTATION_GUIDE.md # Detailed step-by-step setup guides
βββ README.md # Component-level documentation
βββ guardian-net.jsx # Standalone React Component prototype
βββ demo.html # Standalone HTML demo (no build required, browser-ready)
βββ package.json # Legacy package.json for Create React App
βββ web-app/ # Complete, modern web application (React 19 + Vite + Tailwind CSS 4)
βββ .gitignore # Web app-specific gitignore
βββ .oxlintrc.json # Oxlint linter settings
βββ package.json # Package configuration & modern dependencies
βββ package-lock.json # Package lockfile
βββ index.html # HTML entry point for Vite
βββ vite.config.js # Vite build configurations (React + Tailwind plugins)
βββ public/ # Static assets (Favicons, SVG icons)
βββ src/ # Application source
βββ main.jsx # Web application mount point
βββ index.css # Global CSS, Google Fonts, Tailwind 4 directives
βββ App.jsx # Interactive main interface & safety engine
βββ App.css # Main layout styles
βββ assets/ # Static images & graphics (hero backgrounds, logos)
- Asynchronous Text Analysis Engine:
- Non-blocking Architecture: Input is debounced at
300msand analyzed asynchronously in the background. The keyboard or text field remains 100% fluid with0mslag. - Hybrid Filtering: Pre-filters obvious phrases instantly, then performs broader semantic evaluation.
- Multi-line Evasion Detection: Input is normalized before analysis β newlines, tabs, and extra whitespace are collapsed into single spaces so phrases split across lines (e.g.
"i\nwill\nkill\nyou") are correctly detected.
- Non-blocking Architecture: Input is debounced at
- 4-Tier Risk Classification System:
SAFE(Green): Standard message. No interventions.NUDGE(Blue): Mild bullying expression or frustration. Gentle check-in and reflection prompt.HIGH(Orange): Cyberbullying (received), solicitation requests. Immediate modal popup with safety guidance.CRITICAL(Red/Pulse): Self-harm patterns, direct threats, grooming. Popup with support resources (hotlines) and guardian alert.
- Dual Detection Engines:
- Child Distress Detector β scans messages typed by the child for self-harm signals, anger, bullying language, and general distress.
- Stranger Threat Detector β scans messages incoming from strangers for grooming, physical threats, solicitation, and cyberbullying.
- Visual Feedback System:
- Visual borders dynamically alert the user. Color borders (Green β Orange/Glow β Yellow β Red) shift in real-time as they type, providing ambient, non-intrusive safety status checks.
- Educational Interventions:
- Modal windows offer clear explanations, reflection prompts, and support resources/hotlines (e.g., Suicide & Crisis Lifeline, NCMEC CyberTipline).
- Gamification & Dashboard:
- Tracks consecutive safe communication streaks, awards badges, and showcases positive choice metrics.
- Guardian Dashboard:
- Privacy-preserving parent alerts (event type only β never message content). Configurable detection sensitivities per threat category.
Common phrases that contain flagged words but are safe in context are whitelisted and never trigger alerts:
"kill it in the game","killing it","die laughing","gonna kill this exam", etc.
Detects distress signals in what the child types. Runs through four ordered tiers:
| Tier | Examples | Response |
|---|---|---|
| Crisis | "i want to die", "kill yourself", "end my life" |
CRITICAL modal + crisis hotlines + breathing exercise |
| Anger / Threat | "i will kill you", "i hate everyone", "i'm going to hurt" |
Empathy check-in modal (no punishment) |
| Bullying Expression | "you're so stupid", "nobody likes you" |
Gentle nudge before sending |
| General Distress | "i feel hopeless", "nobody cares", "i hate my life" |
Support modal with resources |
Detects danger in messages sent to the child from an unknown contact. Four ordered checks:
| Check | Sensitivity Gate | Examples | Alert Level |
|---|---|---|---|
| Grooming | grooming setting |
"don't tell your parents", "send me pics of yourself", "our little secret" |
π¨ CRITICAL |
| Direct Threats | threats setting |
"i will kill you", "i'm at your home", "open the door", "you're dead", "watch your back", "i know where you are" |
π¨ CRITICAL |
| Solicitation | solicitation setting |
"send me some pics", "can we meet", "video call me" |
|
| Bullying / Harassment | Always active | "you are so ugly", "nobody likes you", "you're worthless", "go die" |
π HIGH |
Both engines normalize input before pattern matching:
const lower = text.replace(/[\r\n\t]+/g, ' ').replace(/ +/g, ' ').toLowerCase();This means splitting a phrase across lines is not an evasion technique:
i β detected as
will "i will kill you"
kill
you
- Node.js: version
18.0.0or higher (recommended:20.xor latest LTS). - npm: version
8.0.0or higher. - A modern web browser (Chrome, Firefox, Safari, Edge) with JavaScript enabled.
Guardian-Net relies on a modern frontend stack:
- React:
^19.2.7(UI Component model) - React DOM:
^19.2.7(Browser rendering) - Lucide React:
^1.24.0(Minimalist UI Icons) - Tailwind CSS:
^4.3.2(Modern CSS framework integration) - Vite:
^8.1.1(Next-gen frontend build tool / fast hot reloading) - Oxlint:
^1.71.0(Ultra-fast JavaScript/React linter)
Follow these steps to launch the modern web application locally:
- Open your terminal or command prompt.
- Navigate to the
web-appproject directory:cd "files/web-app"
- Install the required dependencies:
npm install
- Launch the local development server:
npm run dev
- Open your browser and navigate to the URL shown in your terminal (typically
http://localhost:5173).
If you wish to view a conceptual demo without installing Node.js or run-time packages:
- Navigate to the
files/directory. - Double-click
demo.htmlto open it directly in any web browser.
Use the Demo Scenarios panel in the sidebar, or type messages manually to test. Switch between Child and Stranger roles using the role switcher in the chat header.
| Scenario | Role | Message Sent | Expected Popup |
|---|---|---|---|
| Stranger Grooming Attempt | Stranger | "you seem so mature for your age, don't tell your parents we're talking" |
π¨ CRITICAL β Grooming alert |
| Receive Bullying Message | Stranger | "you are so ugly and nobody likes you" |
π HIGH β Bullying detected popup |
| Child In Distress | Child | "i feel so hopeless and i hate my life" |
π Support modal with resources |
| Self-Harm Language | Child | "i want to die" |
π¨ CRISIS β Crisis support modal |
| Normal Safe Message | Child | "hey just checking in, how are you?" |
β No alert β Safe message |
| Risk Level | Input Example | Expected Behavior |
|---|---|---|
| Safe (Contextual) | "I'm going to kill it in this game!" |
No alert β gaming slang whitelisted |
| High β Bullying (Stranger) | "you are so ugly and nobody likes you" |
π Bullying message popup |
| Critical β Threat (Stranger) | "i will kill you" |
π¨ Threatening message popup |
| Critical β Threat (Stranger) | "i am at your home, open the door" |
π¨ Threatening message popup |
| Critical β Threat (Stranger) | "you're dead, watch your back" |
π¨ Threatening message popup |
| Critical β Self-harm (Child) | "i want to die" |
π¨ Crisis support modal |
| Distress (Child) | "i feel hopeless and nobody cares" |
π Support modal |
| Multi-line evasion | i β΅ will β΅ kill β΅ you |
π¨ Detected β line breaks collapsed |
Before publishing this repository to GitHub, verify that your local environment matches the exclusion policies set up in .gitignore.
files/directory containing markdown specifications, standalone code files (guardian-net.jsx,demo.html), and theweb-appsource code (src/,public/, config files).- Root configuration files (
README.md,.gitignore).
node_modules/(All package dependencies insidefiles/web-app/node_modules/will be ignored, preventing uploads of thousands of vendor files).dist/anddist-ssr/(Local production builds).*.local(Local environment secret configurations).pro.pdf&Project.docx(Heavy documentation binaries).files.zip&Mobile.zip(Compressed binary archives)..vscode/(Local editor settings and workspace configurations).*.log&logs/(System debug logs generated during development).
Guardian-Net is designed under strict ethical parameters:
- Local Inference: Natural language analysis occurs strictly client-side using JavaScript β no data ever leaves the browser.
- No Snooping: The parent dashboard receives event types, but never the content of private messages, ensuring teenage agency is respected.
- Non-Punitive Design: When a child types something concerning, Guardian-Net always allows the message to be sent. It intervenes with empathy and education, not locks or punishments.
- Federated Learning Potential: Future iterations will support federated model fine-tuning where parameters, not private text records, are aggregated.
This project is open-source and distributed under the Apache License 2.0. Feel free to use, modify, and distribute it in accordance with the terms of the license.