Protecting children from harmful content with AI-powered, parent-controlled browsing safety
AI-powered Internet Safety for Kids
Chrome Extension + Web Dashboard + .NET API + FastAPI AI Service (Option: Periodic Training)
Explore the Website Β»
π Report Bug
|
π Request Feature
|
π¬ Support
|
π Security
WEBSITE & AI INNOVATION CONTEST 2026 β BOARD B (Advanced Track)
Objective: Protect children under 18 while browsing the Internet by detecting & warning/blocking dangerous websites such as Adult (18+) / Gambling / Phishing / Malware.
Highlight Feature (Option Periodic β Periodic Training):
- β Collect URLs from Web/Extension into Dataset (Pending)
- β Admin review (Approve/Reject) to prevent βdirty dataβ
- β Periodic training (Background job) β generate new model (versioning)
- β Dashboard to monitor logs, dataset, and training jobs
- β Personalized policies for parents: Age / Mode / Toggles / Allowlist / Blocklist
LΖ°u Γ½: The repository can run completely locally (ASP.NET Core + SQL Server + React). The AI service (FastAPI) runs locally with Python.
Web Dashboard |
Admin Dataset Review |
Chrome Extension |
Children are increasingly exposed to harmful online content. Traditional blacklist systems are static and easily bypassed.
ChildSafeNet introduces:
- AI-driven URL classification
- Policy personalization by age & mode
- Periodic retraining pipeline
- Admin-controlled dataset validation
This creates a semi-automated moderation loop instead of static blacklists.
- Scan URL (Web) + view Scan Logs
- Settings (/settings)
- Child age (1β18)
- Mode: Strict / Balanced / Relaxed
- Rule toggles: Block Adult / Block Gambling / Block Phishing / Warn Suspicious
- Whitelist domains (always allow)
- Blacklist domains (always block)
- Pair Chrome Extension: Web sends token to extension β extension scans using API
- Admin Dataset: view collected URLs (Pending/Approved/Rejected), Export CSV
- Admin Train Jobs: trigger training job, monitor status/version
- (Optional) Drift monitoring / model health (future extension)
- Enable/disable Extension
- Auto-scan current tab, call
/api/scanendpoint - BLOCK/WARN based on policy (shows block page when needed)
Luα»ng tα»ng quΓ‘t:
- Extension/Web sends URL β ASP.NET Core API (
/api/scan) - API calls AI Service (FastAPI) (
/predict) - API applies User Settings + allow/block list β returns action ALLOW/WARN/BLOCK
- API logs ScanLogs + upserts UrlDataset (Pending)
- Background job periodically trains β exports new model version β AI service reloads
- Clean separation: API / AI Service / Web / Extension
- Background training with versioned models
- Dataset moderation workflow (Pending β Approved β Train)
- Policy engine layer before final action (ALLOW/WARN/BLOCK)
- Why FastAPI for AI inference? β Extremely fast, async, auto-generated docs, easy to version models
- Why background job for training? β Avoid blocking API, support model versioning & rollback
- Why Manifest V3 for extension? β Future-proof, better security & performance
- Why scikit-learn instead of deep learning? β Lightweight, fast inference on local machine, explainable
ChildSafeNet/
β
βββ src/ # Main application source code
β β
β βββ api/ # ASP.NET Core 8 Web API (Backend)
β β βββ Controllers/ # REST API endpoints
β β βββ Services/ # Business logic & background jobs
β β βββ Data/ # EF Core DbContext & migrations
β β βββ Models/ # Entities, DTOs, request/response models
β β βββ Middlewares/ # Custom middleware (Auth, Logging...)
β β βββ Background/ # Periodic training & scheduled tasks
β β βββ Program.cs # Application entry point
β β
β βββ web/ # React + TypeScript Dashboard (Vite)
β β βββ src/
β β β βββ pages/ # Main pages (Scan, Dashboard, Settings, Admin)
β β β βββ components/ # Reusable UI components
β β β βββ api/ # Axios API client & request wrappers
β β β βββ hooks/ # Custom React hooks
β β β βββ context/ # Global state / auth context
β β β βββ utils/ # Helper utilities
β β βββ public/
β β βββ vite.config.ts
β β
β βββ ai-service/ # FastAPI AI Inference Service
β β βββ app.py # FastAPI entry point
β β βββ model/ # Trained models (.pkl, .joblib)
β β βββ training/ # Training pipeline scripts
β β βββ dataset/ # Optional datasets used for training
β β βββ requirements.txt
β β
β βββ chrome-extension/ # Chrome / Edge Extension (Manifest V3)
β βββ manifest.json # Extension configuration
β βββ service-worker.js # Background service worker
β βββ content-script.js # Page interaction script
β βββ popup.html
β βββ popup.js # Extension popup UI logic
β βββ block.html # Page displayed when a site is blocked
β
βββ docs-site/ # Docusaurus documentation website
β βββ docs/ # Technical documentation pages
β βββ src/ # Custom UI components & styles
β βββ static/ # Static assets
β βββ docusaurus.config.js
β
βββ assets/ # Visual assets for README/docs
β βββ banner.jpg
β βββ screenshots/ # UI screenshots
β βββ diagrams/ # Architecture / CI-CD diagrams
β βββ images/ # Logos and other images
β
βββ .github/ # GitHub configuration
β βββ workflows/ # GitHub Actions CI/CD pipelines
β βββ ISSUE_TEMPLATE/ # Issue templates
β βββ PULL_REQUEST_TEMPLATE.md # Pull request template
β
βββ docker-compose.yml # Local development environment (API + AI + Web)
β
βββ CONTRIBUTING.md # Contribution guidelines
βββ CODE_OF_CONDUCT.md # Community rules
βββ SECURITY.md # Security policy
βββ SUPPORT.md # Support information
βββ LICENSE # MIT license
βββ README.md # Project overview- Frontend: React + TypeScript + Vite
- Backend: ASP.NET Core 8, EF Core, JWT Auth, Background Services
- Database: SQL Server (LocalDB / SQL Server local)
- AI Service: FastAPI + scikit-learn (RF / Pipeline joblib)
- Extension: Chrome/Edge MV3 (service worker + content script)
- .NET SDK 8.0
- Node.js 18+
- Python 3.10β3.12
- SQL Server local (or LocalDB)
- Docker Desktop (recommended for easiest setup & demo)
# Clone the repository
git clone https://github.com/NguyenTriBaoThang/ChildSafeNet.git
cd ChildSafeNet
# Start all services (API + AI Service + Web Dashboard)
docker-compose up -d --buildOnce everything is up (may take a few minutes for the first build):
- Web Dashboard: http://localhost:5173
- API Swagger: http://localhost:7047/swagger
- FastAPI Docs/Health: http://localhost:8000/docs or http://localhost:8000/health
- Database: SQL Server will be initialized automatically via migrations To stop:
docker-compose downcd src/api
dotnet restore
dotnet ef database update
dotnet run- Swagger UI:
https://localhost:7047/swagger(or your actual port)
cd src/ai-service
python -m venv .venv
# Windows
.\.venv\Scripts\activate
# macOS/Linux
# source .venv/bin/activate
pip install -r requirements.txt
python -m uvicorn app:app --host 0.0.0.0 --port 8000- Health check:
http://localhost:8000/health
Model files should be placed in
src/ai-service/model/
childsafenet_rf.pklchildsafenet_pipeline.jobliblabel_encoder.pkl(if used)
cd src/web
npm install
npm run dev- Web app:
http://localhost:5173
- Open
chrome://extensions(oredge://extensionsfor Edge) - Enable Developer mode
- Click Load unpacked β select folder
src/chrome-extension - Open web dashboard β Dashboard β βConnect Extensionβ
- Login as Parent
- Go to Scan page, enter URL β receive ALLOW/WARN/BLOCK result
- View history in Dashboard β Scan Logs
- Login as Parent on web
- Dashboard β βConnect Extensionβ (pair token)
- Open any tab β extension automatically calls
/api/scan - If BLOCK β redirects to custom
block.htmlpage
- New URLs β added to UrlDataset (Pending)
- Admin β AdminDataset β approve/reject
- Admin β AdminTrainJobs β trigger train job (background)
- AI service reloads the new model version
ConnectionStrings:DefaultJwt:Key,Jwt:Issuer,Jwt:AudienceAiService:BaseUrl(vd:http://localhost:8000)
VITE_API_BASE=https://localhost:7047- Receives pairing token from web via message, saves to chrome.storage
- CI: lint + test + build (API/Web/AI)
- CD (optional): build images + publish artifacts
- Developer pushes code to GitHub
- GitHub Actions triggers CI pipeline
- Build & Test (API + Web)
- Static code analysis (SonarQube)
- Docker image build
- Push image to registry
- Deploy to server (ASP.NET + React + AI Service)
- Services connected to SQL Server
- Real-time model drift detection
- Federated learning approach
- Multi-language URL content analysis
- Cloud deployment (Azure/AWS)
- Parental analytics dashboard
- Please see: CONTRIBUTING.md
- Code of Conduct: CODE_OF_CONDUCT.md
- Report bugs / suggest features:
.github/ISSUE_TEMPLATE/*
Please read SECURITY.md and do not report security vulnerabilities publicly in issues.
MIT License β see the LICENSE file for details.
Team: TKT Team
Instructor:
- ThS. Nguyen Trong Minh Hong Phuoc
Contributors:
- Nguyen Tri Bao Thang
- Le Trung Kien
- Vo Thanh Trung
Built with β€οΈ for safer internet experiences for children.







