A minimum-viable AI-powered platform for ingesting public company data, analyzing sentiment, computing risk scores, and providing actionable intelligence via REST API and React dashboard.
- Multi-source Data Ingestion: NewsAPI (news articles) + OpenCorporates (company registry)
- NLP Pipeline: Named Entity Recognition (NER), sentiment analysis, embeddings
- Risk Scoring: Hybrid rule-based + ML (logistic regression) scoring
- RAG Summarization: LLM-based executive summaries using semantic retrieval
- REST API: Search, company profiles, watchlists, alerts
- React Dashboard: Search, profiles, sentiment timelines, watchlists
- Email Alerts: SendGrid integration for watchlist notifications
┌─────────────────────────────────────────────────────────────┐
│ AIRI Platform │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ NewsAPI │ │OpenCorporates│ │ Custom │ │
│ │ Ingestion │ │ Ingestion │ │ Sources │ │
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │ │
│ └─────────────────┼──────────────────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ Normalization│ │
│ │ Pipeline │ │
│ └──────┬───────┘ │
│ │ │
│ ┌─────────────────┼─────────────────┐ │
│ │ │ │ │
│ ┌────▼────┐ ┌──────▼──────┐ ┌─────▼────┐ │
│ │PostgreSQL│ │ Elasticsearch│ │ Pinecone │ │
│ │(Canonical) │ (Full-text) │ │(Embeddings) │
│ └────┬────┘ └──────┬──────┘ └─────┬────┘ │
│ │ │ │ │
│ └─────────────────┼───────────────┘ │
│ │ │
│ ┌─────────────────┼─────────────────┐ │
│ │ │ │ │
│ ┌────▼────┐ ┌──────▼──────┐ ┌─────▼────┐ │
│ │NLP Pipe │ │Risk Scoring │ │RAG Engine│ │
│ │(NER, │ │(Rules + ML) │ │(LLM) │ │
│ │Sentiment) └──────┬──────┘ └─────┬────┘ │
│ └────┬────┘ │ │ │
│ └─────────────────┼───────────────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ FastAPI │ │
│ │ REST API │ │
│ └──────┬───────┘ │
│ │ │
│ ┌─────────────────┼─────────────────┐ │
│ │ │ │ │
│ ┌────▼────┐ ┌──────▼──────┐ ┌─────▼────┐ │
│ │React │ │SendGrid │ │Monitoring│ │
│ │Dashboard│ │Alerts │ │& Logging │ │
│ └─────────┘ └──────────────┘ └──────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
- Docker & Docker Compose
- Python 3.11+
- Node.js 18+
- API Keys: OpenAI, NewsAPI, SendGrid (optional)
# Clone and navigate
cd AIRI
# Copy environment template
cp .env.example .env
# Edit .env with your API keys
# Start services
docker-compose up -d
# Run migrations
docker-compose exec backend python -m alembic upgrade head
# Load sample data
docker-compose exec backend python scripts/load_sample_data.py
# Start frontend dev server
cd frontend && npm install && npm run devGET /api/companies/search?q=...- Search companiesGET /api/companies/{id}- Get company profile with summary & risk scorePOST /api/watchlists- Create watchlistPOST /api/alerts/subscribe- Subscribe to alertsGET /api/health- Health check
Open http://localhost:3000 to access the React dashboard.
AIRI/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── api/ # REST endpoints
│ │ ├── models/ # SQLAlchemy models
│ │ ├── schemas/ # Pydantic schemas
│ │ ├── services/ # Business logic
│ │ ├── pipelines/ # NLP, ingestion, risk scoring
│ │ └── config.py # Configuration
│ ├── tests/ # Unit & integration tests
│ ├── scripts/ # Data loading, migrations
│ ├── requirements.txt # Python dependencies
│ └── Dockerfile
├── frontend/ # React dashboard
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API client
│ │ └── App.tsx
│ ├── package.json
│ └── Dockerfile
├── docker-compose.yml # Local dev environment
├── .env.example # Environment template
└── README.md # This file
cd backend
pip install -r requirements.txt
python -m pytest tests/
python -m uvicorn app.main:app --reloadcd frontend
npm install
npm run devSee DEPLOYMENT.md for production deployment guides (Docker, Kubernetes).
- Create a feature branch
- Write tests
- Submit PR with description
MIT