Source Code Only
Full ZIP with frontend, backend, database & documentation.
- Complete project source files
- Database script included
- How-to-run guide
No live demo yet — message us for access
Our team shares demo access on WhatsApp within minutes
Complete final-year project source code with frontend, backend, database, and setup guide. Instant download after secure payment.
Choose your plan
Full ZIP with frontend, backend, database & documentation.
We install & configure the project on your laptop within 24 hours.
Review features, setup steps, and credentials before you pay.
Description, tech stack, and what is included
AI-Based Cybersecurity System for Safe and Controlled AI Usage is a Flask-based cybersecurity web application designed to provide safe, monitored, and controlled AI chat access for colleges, enterprises, and organizations. The platform scans every user prompt before sending it to OpenAI, performs AI-based risk scoring, masks sensitive data, blocks malware/phishing/injection/policy-violating requests, and gives administrators full control over users, rules, approvals, logs, exports, and system policies.
The system includes a secure user panel for AI chat, prompt safety results, usage limits, safe templates, chat history, blocked prompt tracking, approval requests, and false-positive reporting. It also includes a powerful admin panel for user CRUD, security policy management, prompt monitoring, approvals, incident review, usage logs, security logs, login history, audit trail, OpenAI settings, branding, system settings, reports, CSV/Excel export, and database backup.
This project is suitable for B.Tech, M.Tech, BCA, MCA, BE, ME, BSc, and MSc students who need a practical final year project, major project, or minor project based on cybersecurity, AI safety, secure AI chat, prompt injection detection, sensitive data masking, Flask development, OpenAI API integration, audit logging, admin dashboard, policy control, and secure web application design. FileMakr can provide this project with source code, project report, documentation, and setup support for academic submission.
Modules and controls available to administrators
The admin panel includes users, security engine, monitoring, logs, configuration, reports, exports, and backup modules
What end users can do in this application
The user panel includes dashboard, secure AI chat, profile, chat history, blocked prompts, approvals, usage stats, and report issue modules
Additional capabilities included in the project
The security engine includes AI analysis, rule-based fallback, sensitive data detection, automatic masking, prompt injection detection, and account blocking rules.
User submits prompt
↓
Sensitive data scan
↓
Mask emails, phones, API keys, passwords, etc.
↓
AI Security Analyzer + Rule Engine
↓
Risk score, level, and action generated
↓
If unsafe: block prompt and save reason
↓
If safe/warn/mask: send safe prompt to OpenAI
↓
AI response generated and logged
Security analysis uses gpt-4o-mini for fast JSON scoring, while user responses use gpt-4o, configurable from Admin → OpenAI Settings.
The technology stack includes Python, Flask, Flask-Login, Werkzeug, Flask-SQLAlchemy, SQLite/PostgreSQL, Flask-WTF, OpenAI API, Bootstrap, Chart.js, Pandas, openpyxl, and python-dotenv.
| Layer | Technology |
|---|---|
| Backend | Python 3.10+, Flask 3.0 |
| Authentication | Flask-Login, Werkzeug password hashing |
| Database ORM | Flask-SQLAlchemy |
| Database | SQLite default, PostgreSQL production |
| Forms / CSRF | Flask-WTF, WTForms |
| AI / LLM | OpenAI API, gpt-4o, gpt-4o-mini |
| Frontend | Bootstrap 5, Bootstrap Icons, Inter font |
| Charts | Chart.js |
| Reports / Export | Pandas, openpyxl |
| Configuration | python-dotenv |
| Architecture | Flask app factory, blueprints, services, templates |
Step-by-step setup on your laptop or PC
cd "c:\Project\Python Source Code\AI-Based Cybersecurity System for Safe and Controlled AI Usage"
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
copy .env.example .env
Edit .env and set required values.
python run.py
Open in browser:
| Page | URL |
|---|---|
| Landing Page | http://127.0.0.1:5000 |
| User Panel | http://127.0.0.1:5000/user/dashboard |
| Admin Panel | http://127.0.0.1:5000/admin/dashboard |
On first run, the database is automatically created and default configuration with sample data is seeded.
Create .env in the project root:
FLASK_SECRET_KEY=your-random-secret-key
OPENAI_API_KEY=sk-...
DATABASE_URL=sqlite:///cybersecurity_ai.db
| Variable | Description |
|---|---|
FLASK_SECRET_KEY |
Flask session signing key |
OPENAI_API_KEY |
OpenAI API key |
DATABASE_URL |
Database connection string |
The uploaded documentation lists Flask secret key, OpenAI API key, and database URL as environment variables.
Default demo accounts for testing after setup
| Role | Password | |
|---|---|---|
| Administrator | [email protected] |
admin123 |
| Demo User | [email protected] |
user123 |
| Role | Password | Notes | |
|---|---|---|---|
| Normal User | [email protected] |
user123 |
Active student with chat history |
| Normal User | [email protected] |
user123 |
Active student |
| Normal User | [email protected] |
user123 |
Blocked — test unlock flow |
| Restricted User | [email protected] |
user123 |
Daily limit: 20 |
| Security Reviewer | [email protected] |
reviewer123 |
Reviewer role |
Usage terms for academic and personal projects
Search terms and categories for this source code