Commit Graph

4 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
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
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