Before setting up this project, ensure you have the following installed:
- Node.js (v18+)
- Python (v3.10+)
- pip (Python package installer)
- npm or yarn
cd backendpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtuvicorn main:app --reload --host 0.0.0.0 --port 8000The backend will be available at http://localhost:8000
cd frontendnpm install
# or
yarn installnpm run dev
# or
yarn devThe frontend will be available at http://localhost:3000
The platform now includes two advanced 3D visualization components:
Visualizes global threat distribution on an interactive 3D globe.
import ThreatGlobe3D from '@/components/ThreatGlobe3D';
const threats = [
{ id: 1, position: [1, 0, 0], severity: 'high', type: 'malware' },
{ id: 2, position: [0, 1, 0], severity: 'critical', type: 'ddos' },
];
<ThreatGlobe3D threats={threats} />Shows network topology with 3D interactive nodes and connections.
import NetworkGraph3D from '@/components/NetworkGraph3D';
const nodes = [
{ id: 'server1', label: 'Main Server', position: [0, 0, 0], type: 'server' },
{ id: 'client1', label: 'Client', position: [2, 1, 0], type: 'client' },
];
const edges = [
{ source: 'server1', target: 'client1', strength: 0.8 },
];
<NetworkGraph3D nodes={nodes} edges={edges} />Create a .env file in the backend directory:
DATABASE_URL=sqlite:///./security.db
SECRET_KEY=your-secret-key-here
ALGORITHM=HS256
Create a .env.local file in the frontend directory:
NEXT_PUBLIC_API_URL=http://localhost:8000
- Port Already in Use: Change the port in the uvicorn command
- Module Not Found: Ensure all dependencies are installed and venv is activated
- 3D Components Not Rendering: Ensure Three.js dependencies are installed
- API Connection Failed: Check backend is running and CORS is configured
uvicorn main:app --host 0.0.0.0 --port 8000npm run build
npm startBuild and run with Docker Compose:
docker-compose up --buildFor issues and questions, please open an issue on GitHub.