How mahamohammedalmotairi/adrej works
Adrej is an IPO-readiness assessment product for Saudi LLCs. The principal workflow is account setup and policy consent, readiness questions and document upload, requirement evaluation, deterministic scoring, then results and an Arabic report. The graph preserves the documented authentication, email OTP, encryption, bilingual interface, and PDF capabilities. Several backend connections are supported by the source index or README; frontend-to-API wiring and some unsampled internals are not shown, so those links are omitted or marked unverified.
Main entry points: assessment.py Assessment orchestration · App.tsx Web app routing · main.py FastAPI entry · auth.py Authentication endpoints
Components 24
Web application
- Web app routing
analysis-app/src/App.tsx - Guided analysis UI
analysis-app/src/pages/new-analysis - Results interface
analysis-app/src/pages/results - Language and strings
analysis-app/src/i18n/language.ts
Accounts and consent
- Sign-in and consent UI
analysis-app/src/auth/AuthProvider.tsx - Authentication endpoints
backend/app/routes/auth.py - Sessions and policy checks
backend/app/services/auth.py - OTP email delivery
backend/app/services/email_sender.py
Readiness assessment
- Document endpoints
backend/app/routes/documents.py - Assessment endpoints
backend/app/routes/assessments.py - Assessment orchestration
backend/app/services/assessment.py - AI requirement evaluation
backend/app/services/ai_evaluation.py - Applicability and rules
backend/app/services/rule_engine.py - Readiness scoring
backend/app/services/scoring.py
Results and reporting
- Result views and filters
analysis-app/src/pages/results/ResultsPage.tsx - Report generation
backend/app/services/report.py - Arabic PDF report
backend/app/services/report_pdf.py
Backend platform
- FastAPI entry
backend/app/main.py - Encrypted file storage
backend/app/services/storage.py - SQLite data store
backend/app/database.py - Company and assessment records
backend/app/models.py - Encryption at rest
backend/app/services/crypto.py
Other components
- Company user
- OpenAI model
Connections 29
- Company user → Web app routing: uses
README.md - Web app routing → Sign-in and consent UI: renders auth
analysis-app/src/App.tsx - Web app routing → Guided analysis UI: routes analysis
analysis-app/src/App.tsx - Web app routing → Results interface: routes results
analysis-app/src/App.tsx - Company user → Guided analysis UI: answers and uploads
README.md - Guided analysis UI → FastAPI entry: submits data
- Sign-in and consent UI → FastAPI entry: uses API
- FastAPI entry → Authentication endpoints: registers routes
backend/app/main.py - FastAPI entry → Assessment endpoints: registers routes
backend/app/main.py - FastAPI entry → Document endpoints: registers routes
backend/app/main.py - Authentication endpoints → Sessions and policy checks: uses auth logic
backend/app/routes/auth.py - Authentication endpoints → OTP email delivery: sends codes
backend/app/routes/auth.py - Authentication endpoints → SQLite data store: reads and writes
backend/app/routes/auth.py - Document endpoints → Encrypted file storage: stores uploads
backend/app/routes/documents.py - Encrypted file storage → Encryption at rest: encrypts files
backend/app/services/storage.py - Assessment endpoints → Assessment orchestration: starts assessment
backend/app/routes/assessments.py - Assessment orchestration → AI requirement evaluation: requests evaluation
backend/app/services/assessment.py - Assessment orchestration → Applicability and rules: evaluates rules
backend/app/services/assessment.py - Assessment orchestration → Readiness scoring: computes score
backend/app/services/assessment.py - AI requirement evaluation → OpenAI model: evaluates evidence
README.md - Assessment orchestration → SQLite data store: persists assessment
- SQLite data store → Company and assessment records: stores records
backend/app/database.py - Results interface → Result views and filters: renders
analysis-app/src/App.tsx - Company user → Results interface: reviews results
README.md - Assessment orchestration → Report generation: builds summary
README.md - Assessment endpoints → Arabic PDF report: serves PDF
backend/app/routes/assessments.py - Report generation → Arabic PDF report: supplies report content
- Company user → Arabic PDF report: downloads report
README.md - Language and strings → Web app routing: sets interface language
analysis-app/src/i18n/language.ts