How mahnoor643/ethical_hacking_project works
Agent Activity Logger is a security-monitoring dashboard for submitting sales-analysis tasks to a constrained AI agent, then reviewing recorded runs, event timelines, and security alerts. The principal workflow runs from the authenticated React interface through the Worker API, which applies rate limits and task policy before invoking the agent; approved tool results and security events are recorded in D1. The dashboard also supports login/session management, run history, and alert filtering. Worker routing and agent calls are excerpted; UI/API and storage capabilities are also supported by the README. Unshown route-to-storage details are omitted.
Main entry points: App.jsx App Navigation · agent.ts Agent Orchestrator · api.js API Client · index.ts API Router
Components 25
Dashboard UI
- App Navigation
frontend/src/App.jsx - Login Screen
frontend/src/pages/Login.jsx - Session State
frontend/src/hooks/useAuth.js - Agent Execution
frontend/src/pages/AgentExecution.jsx - Task Form
frontend/src/components/TaskForm.jsx - Execution State
frontend/src/hooks/useAgentExecution.js - Agent Result
frontend/src/components/AgentResult.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Run History
frontend/src/pages/RunHistory.jsx - Run Queries
frontend/src/hooks/useRuns.js - Timeline View
frontend/src/pages/TimelinePage.jsx - Activity Timeline
frontend/src/components/ActivityTimeline.jsx - Security Alerts
frontend/src/pages/SecurityAlerts.jsx - API Client
frontend/src/services/api.js
Worker API
- API Router
worker/src/index.ts - Session Auth
worker/src/auth.ts - Rate Limiting
worker/src/ratelimit.ts
Agent Controls
- Agent Orchestrator
worker/src/agent.ts - Task Policy
worker/src/policy.ts - Approved Tools
worker/src/tools.ts
Persistence And AI
- Run Logger
worker/src/logger.ts - Alert Recording
worker/src/alerts.ts - Activity Database
schema.sql - Workers AI
Other components
- Browser User
Connections 33
- Browser User → App Navigation: uses dashboard
README.md - App Navigation → Login Screen: renders when unauthenticated
frontend/src/App.jsx - App Navigation → Session State: checks session
frontend/src/App.jsx - Session State → API Client: requests session
frontend/src/hooks/useAuth.js - App Navigation → Agent Execution: routes to
frontend/src/App.jsx - Agent Execution → Task Form: renders
frontend/src/pages/AgentExecution.jsx - Agent Execution → Agent Result: renders
frontend/src/pages/AgentExecution.jsx - Agent Execution → Execution State: uses execution state
frontend/src/App.jsx - Execution State → API Client: submits task
frontend/src/hooks/useAgentExecution.js - App Navigation → Dashboard: routes to
frontend/src/App.jsx - App Navigation → Run History: routes to
frontend/src/App.jsx - App Navigation → Timeline View: routes to
frontend/src/App.jsx - App Navigation → Security Alerts: routes to
frontend/src/App.jsx - Dashboard → Run Queries: loads recent runs
frontend/src/pages/Dashboard.jsx - Run History → Run Queries: loads run history
frontend/src/pages/RunHistory.jsx - Run Queries → API Client: requests runs
frontend/src/hooks/useRuns.js - Timeline View → Activity Timeline: renders timeline
frontend/src/pages/TimelinePage.jsx - Activity Timeline → API Client: requests run logs
frontend/src/components/ActivityTimeline.jsx - Security Alerts → API Client: requests alerts
frontend/src/pages/SecurityAlerts.jsx - API Client → API Router: sends API requests
frontend/src/services/api.js - API Router → Session Auth: checks sessions
worker/src/index.ts - API Router → Rate Limiting: applies limits
worker/src/index.ts - API Router → Agent Orchestrator: starts agent run
worker/src/index.ts - Agent Orchestrator → Task Policy: screens and validates task
worker/src/agent.ts - Agent Orchestrator → Workers AI: requests tool decision
README.md - Agent Orchestrator → Approved Tools: executes approved tool
README.md - Agent Orchestrator → Run Logger: records run activity
worker/src/agent.ts - Agent Orchestrator → Alert Recording: records security events
worker/src/agent.ts - Run Logger → Activity Database: writes run logs
README.md - Alert Recording → Activity Database: writes alerts
README.md - Rate Limiting → Activity Database: stores limit windows
README.md - Session Auth → Activity Database: stores signed session
- API Router → Activity Database: reads run and alert data
worker/src/index.ts