An AI-powered phishing detection system that classifies emails/URLs as safe or suspicious. Uses machine learning and natural language processing to identify phishing attempts and protect users from online threats.
The app has two parts you run separately: a Node/Express backend and a Vite/React frontend.
- Node.js 18+ (recommended for Vite 7 and Express 5)
- Python 3.10+
- Package managers:
- Backend: npm (or pnpm/yarn if you prefer)
- Frontend: pnpm (repo is configured for pnpm)
- Python: pip
- A MongoDB connection (local MongoDB or MongoDB Atlas URI)
- Ollama installed and a local model pulled (e.g.,
llama3)
Location: backend/
-
Create or update a
.envfile inbackend/with at least:PORT=5000MONGO_URI=<your-mongodb-connection-string>JWT_SECRET=<a-strong-random-string>FRONTEND_ORIGIN=http://localhost:8080(for Vite dev server CORS)
-
Install dependencies:
cd backend npm install -
Start the server:
node server.js
- The API will listen on
http://localhost:5000by default.
- The API will listen on
Location: frontend/
-
Install dependencies (pnpm):
cd frontend pnpm install -
Run the dev server:
pnpm dev
- The app runs at
http://localhost:8080. - Ensure the backend is running and CORS allows
http://localhost:8080(seeFRONTEND_ORIGINabove).
- The app runs at
Location: python_services/
-
Create and activate a virtual environment:
cd python_services python -m venv .venv source .venv/Scripts/activate
-
Install dependencies:
python3 -m pip install -r requirements.txt
-
Start the server:
python3 main.py
- The Python API will listen on
http://localhost:9000by default.
- The Python API will listen on
- Open three terminals:
- Terminal A: start the backend (
node server.jsinbackend/). - Terminal B: start the frontend (
pnpm devinfrontend/). - Terminal C: start Python services (
python main.pyinpython_services/).
- Terminal A: start the backend (
Or, if you’ve already installed dependencies and set up env files, you can start all three at once:
chmod +x start_servers.sh
./start_servers.shTip: After you’ve made the scripts executable once, you can simply run:
./start_servers.sh