Commit Graph

14 Commits

Author SHA1 Message Date
salvacybersec
af0510e486 feat: Add Ollama AI integration for automatic mail template generation
 New Features:
- 🤖 AI-powered mail template generation with Ollama
- 📧 Test mail sending with preview
- 🔧 Ollama server and model management
- 🎨 Beautiful AI generation dialog in Templates page
- ⚙️ Ollama settings panel with connection test

Backend:
- Add ollama.service.js - Ollama API integration
- Add ollama.controller.js - Template generation endpoint
- Add ollama.routes.js - /api/ollama/* routes
- Support for multiple Ollama models (llama3.2, mistral, gemma)
- JSON-formatted AI responses with subject + HTML body
- Configurable server URL and model selection

Frontend:
- Settings: Ollama configuration panel
  - Server URL input
  - Model selection
  - Connection test with model listing
- Templates: AI generation dialog
  - Company name, scenario, employee info inputs
  - Custom prompt for AI instructions
  - Auto-save to database
  - Test mail sending functionality

Documentation:
- OLLAMA_SETUP.md - Comprehensive setup guide
- Installation instructions
- Model recommendations
- Usage examples
- Troubleshooting

Tech Stack:
- Ollama API integration (REST)
- Axios HTTP client
- React dialogs with MUI
- Self-hosted AI (privacy-friendly)
- Zero external API dependencies

Example Usage:
  Company: Garanti Bankası
  Scenario: Account security warning
  → AI generates professional phishing test mail in seconds!
2025-11-10 21:13:58 +03:00
salvacybersec
d41ff7671e feat: Complete phishing panel with MUI v7 Grid fixes
-  Full backend implementation (Auth, Companies, Tokens, Templates, Tracking)
-  Complete frontend with Material-UI v7
-  Fixed MUI Grid syntax for v7 (xs/sm/md -> size prop)
-  Domain configuration (single/dual domain support with CORS)
-  Gmail integration with App Password
-  Telegram notifications
-  Mail template management with HTML editor
-  Security features (bcrypt, session-based auth, CORS)
-  Deployment scripts and comprehensive documentation
-  Admin user management scripts
- 📚 7 detailed documentation files (DEPLOYMENT, SECURITY, DOMAIN_SETUP, etc.)

Backend: Node.js + Express + SQLite + Sequelize
Frontend: React + Vite + MUI v7
Features: Token tracking, IP/GeoIP logging, company management, mail templates
2025-11-10 21:03:17 +03:00
salvacybersec
f86cda2978 Domain support 2025-11-10 20:01:41 +03:00
salvacybersec
dea1b874b5 feat: Send actual test email instead of just verifying connection
- testConnection now sends a real test email to the configured Gmail address
- User receives actual email confirmation that setup works
- Email contains success message and system info
2025-11-10 19:31:42 +03:00
salvacybersec
c9ff811cc1 fix: Auto-remove spaces from Gmail App Password
- Google provides App Password with spaces (e.g. 'abcd efgh ijkl mnop')
- Backend now automatically removes all spaces before saving
- Users can paste password directly from Google without manual cleanup
- Also trim gmail_user for safety
2025-11-10 19:27:20 +03:00
salvacybersec
ce31698cc4 fix: Gmail App Password parameter name in settings controller
- Changed gmail_password to gmail_app_password in request body destructuring
- Matches frontend Settings.jsx which sends gmail_app_password
- Backend still stores as 'gmail_password' key in database (for backward compatibility)
2025-11-10 19:24:49 +03:00
salvacybersec
37e9745a4d fix: Settings page API endpoints and data handling
- Fixed handleSave to use separate /gmail and /telegram endpoints
- Changed /test-mail to /test-gmail endpoint
- Added proper null checks in loadSettings to prevent uncontrolled input warnings
- Settings now properly saved to backend with correct endpoint structure
2025-11-10 19:22:27 +03:00
salvacybersec
64c7c392bc fix: templateService return format and Templates page array handling
- Updated templateService to return response.data like other services
- Added fallback to empty array in Templates.jsx to prevent map errors
- Ensures consistency across all service modules
2025-11-10 19:17:13 +03:00
salvacybersec
aed4f759b3 fix: Clean up export statements in detail pages
- Removed extra blank lines after export default in TokenDetail, CompanyDetail, Templates
- Trigger Vite HMR to reload modules with fresh exports
2025-11-10 19:15:13 +03:00
salvacybersec
ec0af5fcf7 fix: Blank page issue - improve auth loading state and error handling
- Fixed AuthContext to properly set user to null on auth check failure
- Added loading spinner in PrivateRoute instead of returning null
- Removed automatic redirect from API interceptor (let React Router handle it)
- Improved error handling in checkAuth to prevent stuck loading state
2025-11-10 19:03:55 +03:00
salvacybersec
20191eb35d feat: Mail template management UI and API CRUD
- Added full CRUD endpoints for mail templates (create, update, delete, preview)
- Introduced Joi validators for template create/update/preview
- Updated routes/controller to support ID and type lookups
- Built React Templates page with HTML editor, preview, and clipboard helpers
- Added navigation entry and route for /templates
- Enhanced documentation (README, QUICKSTART, KULLANIM, frontend/backend README)
2025-11-10 17:27:19 +03:00
salvacybersec
dc16d0c549 feat: Add detail pages for Companies and Tokens
- Created CompanyDetail page with stats, info, and tokens list
- Created TokenDetail page with click history and full tracking info
- Added routes for /companies/:id and /tokens/:id
- Made table rows clickable to navigate to detail pages
- Added edit, delete, and mail resend functionality
- Shows IP addresses, GeoIP location, device and browser info in click logs
2025-11-10 17:13:05 +03:00
salvacybersec
0e5dffb7fc fix: CORS configuration and update all README files
- Fixed dotenv path in app.js to properly load .env from backend root
- Updated CORS to allow http://localhost:5173 (frontend URL)
- Updated README.md with accurate project statistics (58 files, 6677+ lines)
- Updated backend/README.md - marked as Production Ready
- Updated frontend/README.md with complete feature list
- All systems tested and working (backend + frontend)
2025-11-10 17:09:35 +03:00
salvacybersec
19e551f33b first commit: Complete phishing test management panel with Node.js backend and React frontend 2025-11-10 17:00:40 +03:00