🚀 Getting Started
Setup guide for running the ChildSafeNet AI-powered child internet protection platform from source.
Platform Overview
ChildSafeNet integrates multiple components into a real-time protection system.
🌐 React Dashboard
Parent monitoring interface and system management.
🔐 ASP.NET Core API
Authentication, scanning API, and policy enforcement.
🗄 SQL Server
Stores users, logs, policies, and training datasets.
🧠 AI Engine
Hybrid classifier detecting malicious and unsafe URLs.
🧩 Browser Extension
Real-time URL interception and enforcement.
This document guides you from clone → configure → run → secure → validate → production build.
1. System Architecture
High-Level Flow
Browser Extension → /api/scan → AI Risk Engine → SQL Database → React Dashboard
Core Modules
| Layer | Technology | Responsibility |
|---|---|---|
| Frontend | React + Vite | Parent monitoring UI |
| Backend | ASP.NET Core 8 | Authentication, Scan API |
| Database | SQL Server | Logs, Users, Tokens |
| Extension | Chrome/Edge MV3 | Real-time blocking |
| AI Engine | Risk Classifier | URL classification |
2. Prerequisites
Ensure the following tools are installed:
- .NET SDK 8
- Node.js 18+
- SQL Server (Express / Developer / LocalDB)
- Git
- (Optional) Docker Desktop
Verify:
dotnet --version
node --version
npm --version
3. Environment Configuration
Before running the system, configure:
src/Childsafenet.Api/appsettings.Development.json
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=ChildSafeNetDb;Trusted_Connection=True;TrustServerCertificate=True;"
},
"Jwt": {
"Key": "YourSuperSecretKey_Minimum32CharactersRequired"
}
}
Security Best Practices
- Use at least 32-character JWT key
- Do NOT commit production secrets
- Enable HTTPS only in production
- Restrict CORS origins
4. Clone Repository
git clone https://github.com/NguyenTriBaoThang/Childsafenet.git
cd Childsafenet
5. Backend Setup (ASP.NET Core API)
cd src/Childsafenet.Api
dotnet restore
dotnet ef database update
dotnet run
Default URLs:
https://localhost:7047
https://localhost:7047/swagger
6. Frontend Setup (React + Vite)
cd src/Childsafenet.Frontend
npm install
npm run dev
Access:
7. Authentication Flow
- Register Parent Account
- Login
- JWT stored in
localStorageascsn_token - Authorization header automatically attached
8. Quick Scan Validation
- Navigate to Scan Page
- Submit a test URL
- Observe classification:
ALLOW,WARN,BLOCK - Verify database log entry
9. Extension Installation (Developer Mode)
- Open
chrome://extensionsoredge://extensions - Enable Developer Mode
- Click "Load unpacked"
- Select:
src/Childsafenet.Extension
10. Extension Pairing
- Generate pairing token in Dashboard
- Open extension popup
- Paste token
- Confirm status: PAIRED
11. End-to-End Security Test
Test flow:
- Visit unsafe URL
- Extension calls
/api/scan - If
BLOCK→ redirect toblock.html - Dashboard logs entry
12. Health Check Endpoints
Recommended validation:
- GET /swagger
- GET /health
- GET /api/scan/test
13. Docker Deployment (Optional)
docker-compose up --build
Verify:
- API container running
- SQL container healthy
- Environment variables correct
14. Production Build
Backend
dotnet publish -c Release
Frontend
npm run build
Deploy to:
- Azure App Service
- Docker Container
- Reverse Proxy (Nginx)
15. Production Security Hardening
- Enforce HTTPS
- Enable HSTS
- Rate-limit scan API
- Rotate pairing tokens periodically
- Store secrets in environment variables
- Use secure JWT expiration policies
16. System Ready Checklist
- API Running
- Database Migrated
- Frontend Accessible
- Extension Installed
- Extension Paired
- Logs Recording
- AI Scan Functional
17. Recommended Next Reading
- System Architecture Deep Dive
- API Reference
- Extension Internals
- AI Model Training Pipeline
- Threat Modeling & Security Design
Conclusion
ChildSafeNet is now fully operational in Professional Development Mode.
You are ready for:
- 🏆 Academic Competition Submission
- 🌍 Open-Source Contribution
- 🔐 Secure Production Deployment