This is the backend API for the Sentinal AI platform, a content moderation and security analysis system.
- Content analysis and threat detection
- User authentication and profile management
- Analytics and reporting
- Agent-based architecture for extensibility
- Supabase integration for database storage
The backend uses an agent-based architecture with the following components:
- Agent Hub: Coordinates between different agents in the system
- Detection Agent: Analyzes content for security threats
- Database Agent: Handles database operations
- Policy Agent: Manages content moderation policies
POST /api/auth/register- Register a new userPOST /api/auth/login- Login and get JWT tokenGET /api/auth/profile- Get user profilePUT /api/auth/profile- Update user profile
POST /api/content/analyze- Analyze content for security threatsGET /api/content/history- Get content analysis historyGET /api/content/report/:id- Get detailed report for a specific analysisPOST /api/content/feedback- Submit feedback for an analysis
GET /api/analytics/dashboard- Get dashboard analytics dataGET /api/analytics/threats- Get threat analytics dataGET /api/analytics/performance- Get system performance metricsGET /api/analytics/reports- Get custom analytics reports
GET /api/policy- Get current content moderation policiesPUT /api/policy- Update content moderation policies
- Node.js (v20.17.0 or higher)
- npm or yarn
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Start the development server
npm run devCreate a .env file with the following variables:
PORT=3001
NODE_ENV=development
SUPABASE_URL=your-supabase-url
SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key
JWT_SECRET=your-jwt-secret
FRONTEND_URL=http://localhost:5173
PRODUCTION_FRONTEND_URL=https://sentinal-ai.vercel.app
- Fork this repository to your GitHub account
- Create a new project in Vercel and import your forked repository
- Set the root directory to
backend - Configure the environment variables in Vercel
- Deploy the project