YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
- SafeNet - URL Analysis & Security Extension
SafeNet - URL Analysis & Security Extension
A comprehensive browser security solution combining AI-powered URL analysis, phishing detection, and cookie management features.
π Features
- π Real-time URL analysis and threat detection
- π‘οΈ AI-powered phishing detection
- πͺ Advanced cookie management
- π Integration with VirusTotal API
- π¨ Modern, responsive UI with Tailwind CSS
- π Secure authentication system
ποΈ Project Structure
.
βββ Flask-API/ # Backend services
β βββ app.py # Main Flask application
β βββ models/ # AI models and configurations
β β βββ model.py # URL analysis model
β β βββ config.json # Model configuration
β βββ instance/ # Database storage
β βββ users.db # User authentication database
β
βββ SafeNet/ # Browser Extension (Frontend)
βββ safe-net/ # Chrome extension source
βββ src/ # Extension source code
β βββ popup.tsx # Main extension popup
β βββ content.tsx # Content scripts
β βββ components/ # React components
βββ assets/ # Static assets
π Getting Started
Backend Setup (Flask API)
- Environment Setup
python -m venv .venv
.venv\Scripts\Activate
pip install -r requirements.txt
- Configure Environment
Create
.envfile in Flask-API directory:
JWT_SECRET_KEY=your_secret_key
DATABASE_URL=sqlite:///users.db
FLASK_DEBUG=False
- Run the API
cd Flask-API
python app.py
Frontend Setup (Browser Extension)
- Install Dependencies
cd SafeNet/safe-net
pnpm install
- Development Mode
pnpm dev
- Build for Production
pnpm build
π§ Configuration
Backend Configuration
- Database: SQLite database (users.db) for user management
- AI Model: Pre-trained model in
models/directory - API Endpoints:
/analyze- URL analysis/login- User authentication/register- User registration/scan- Batch URL scanning
Extension Configuration
- manifest.json: Chrome extension permissions and settings
- tailwind.config.js: UI styling configuration
- API Connection: Set backend API URL in components
π οΈ Development
Backend Development
- Written in Python with Flask framework
- Uses SQLAlchemy for database operations
- JWT authentication for API security
- CORS enabled for extension communication
Extension Development
- Built with Plasmo framework
- React + TypeScript for components
- Tailwind CSS for styling
- Modular component architecture
π API Documentation
Authentication Endpoints
POST /register{ "email": "user@example.com", "password": "secure_password" }POST /login{ "email": "user@example.com", "password": "secure_password" }
Analysis Endpoints
POST /analyze{ "url": "https://example.com" }GET /status- Check API and model status
π Security Features
- JWT Authentication
- Password Hashing (bcrypt)
- CORS Protection
- SQL Injection Prevention
- Input Sanitization
- Rate Limiting
- Secure Cookie Handling
β‘ Performance Considerations
- AI Model Optimization
- Response Caching
- Efficient Database Queries
- Lazy Loading Components
- Asset Optimization
π§ͺ Testing
Backend Testing
cd Flask-API
python testapi.py
Extension Testing
cd SafeNet/safe-net
pnpm test
π¦ Deployment
Backend Deployment
- Set secure environment variables
- Configure production database
- Set up WSGI server (e.g., Gunicorn)
- Enable proper logging
- Configure SSL/TLS
Extension Deployment
- Build production version
- Package extension
- Submit to Chrome Web Store
- Configure production API endpoints
π€ Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Flask team for the amazing framework
- Plasmo team for extension development framework
- TailwindCSS for the styling utilities
- All contributors who have helped with the project
For more information, bug reports or feature requests, please visit the project repository.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support