AXIOM is an AI-powered pre-submission manuscript auditing tool that stress-tests research papers across 11 rigor phases using reporting guidelines (CONSORT, PRISMA, STROBE). It surfaces compliance gaps, severity-ranked violations, and structural weaknesses before editors and reviewers do. Uses gamification to track progress.
- Frontend: React (Vite) + Tailwind CSS + shadcn/ui components
- Backend: Node.js (Express)
- Database: PostgreSQL (Drizzle ORM)
- Authentication: Replit Auth (OIDC with Google, GitHub, Apple, email)
- File Storage: Replit App Storage (GCS-backed object storage)
- AI: OpenAI API (process.env.OPENAI_API_KEY) for manuscript auditing using UMA framework
- Font: Plus Jakarta Sans (primary), Inter (fallback), Source Serif 4 (serif), JetBrains Mono (monospace)
- Color Palette (dark indigo-blue, matching AXIOM shield logo):
- Primary Indigo: hsl(248, 58%, 38%) — deep blue-purple for actions, headings, brand
- Background: hsl(228, 25%, 97%) — near-white with subtle cool blue tone
- Card: pure white — clean card surfaces
- Sage Green: #4ADE80 (progress, success states)
- Chart Blue: hsl(200, 70%, 48%) — secondary chart/accent blue
- Foreground: hsl(240, 45%, 15%) — deep navy text for readability
- Muted Foreground: hsl(228, 12%, 40%) — secondary text with good contrast
- Logo: attached_assets/image_(2)_1771052353785.png (AXIOM shield logo with purple/blue split, "Audit & Rigor Platform" tagline)
- Urgent, authoritative "auditing" language — not educational/helpful "mentor" language
- Key terminology: Audit (not Analysis), Audit Score (not Readiness Score), Violations/Required Fixes (not Suggestions)
- CTAs: "Run Pre-Submission Audit", "Start Rigor Check"
- Dark sections use
.axiom-dark-sectionCSS class
client/src/pages/- Page components (welcome, profile-setup, dashboard, new-manuscript, manuscript-workspace)client/src/components/ui/- shadcn/ui base componentsclient/src/hooks/use-auth.ts- Authentication hookclient/src/hooks/use-upload.ts- File upload hookclient/src/lib/auth-utils.ts- Auth error handling utilitiesserver/- Express server (routes.ts, storage.ts, db.ts, axiom-prompt.ts, module-loader.ts)server/knowledge-base/- Modular knowledge base markdown files (10 files)server/module-loader.ts- Paper type auto-detection and module loading serviceserver/replit_integrations/auth/- Replit Auth integrationserver/replit_integrations/object_storage/- App Storage integrationshared/schema.ts- Drizzle ORM schema definitionsshared/models/auth.ts- Auth-related schema (users, sessions)attached_assets/THE_UNIVERSAL_MANUSCRIPT_ARCHITECTURE_(UMA)*.pdf- UMA knowledge base
users- User profiles with auth info (email, name, profile image), research level, field, learning mode, XP, level, streaksessions- Session storage for auth (mandatory for Replit Auth)manuscripts- Manuscripts with stage, help types, title, file_key, full_text, preview_text, extraction_status, analysis_json (JSONB), analysis_status, readiness_score, paper_type (default 'generic'), analysis_modules (text array)
- Paper Types: quantitative_experimental, observational, qualitative, systematic_review, mixed_methods, generic
- Module Loader (
server/module-loader.ts): Auto-detects paper type from manuscript text using keyword matching (high/medium/low confidence), loads type-specific modules - Knowledge Base Files (
server/knowledge-base/):00_SAGE_CORE_INSTRUCTIONS.md- Core instructions (always loaded)01-05_MODULE_*.md- Type-specific modules for each paper type06_MODULE_GENERIC.md- Fallback generic moduleSAGE_PAPER_TYPES_EXPLAINED.md- Paper type descriptionsSAGE_WRITING_WORKFLOW.md- Writing workflow guideSAGE_GLOSSARY.md- Terminology glossary
- Note: Knowledge base files use SAGE naming internally (system files), but all UI says AXIOM
- Audit Dialog: Users select paper type (or auto-detect) + focus areas before each audit
- Analysis JSON: Now includes paperType, paperTypeLabel, modulesUsed fields
GET /api/auth/user- Get current authenticated userPOST /api/users/profile- Update user profile (research level, field, learning mode)GET /api/users/me- Get current user detailsDELETE /api/users/me- Delete current user and all dataGET /api/manuscripts- Get current user's manuscriptsGET /api/manuscripts/:id- Get single manuscript (with ownership check)POST /api/manuscripts- Create manuscriptDELETE /api/manuscripts/:id- Delete a manuscript (with ownership check)POST /api/manuscripts/:id/extract- Extract text from uploaded manuscript filePOST /api/manuscripts/:id/paste-text- Save pasted manuscript text directlyPOST /api/manuscripts/:id/analyze- Run AI audit using OpenAI + UMA framework (now with paper type modules)POST /api/manuscripts/:id/paper-type- Update paper type for a manuscriptPOST /api/manuscripts/:id/auto-detect- Auto-detect paper type from manuscript textGET /api/knowledge-base/paper-types- Get paper types explanationGET /api/knowledge-base/writing-workflow- Get writing workflow guidePOST /api/uploads/request-url- Get presigned URL for file upload (max 50MB)
- Welcome screen -> Sign In (Replit Auth)
- Profile Setup (3 steps): Research Level -> Primary Field -> Learning Mode
- Dashboard with gamification stats, user profile info, sign out
- New Manuscript: Upload file or paste text (single step) -> redirects to manuscript workspace
- File upload (up to 50MB) -> Object Storage -> Text extraction (PDF/DOCX/TXT) -> Full text + preview saved
- Or paste manuscript sections directly -> Text saved
- Manuscript workspace (/manuscript/:id): Split-view, left (60%) text, right (40%) audit panel
- Click "Run AXIOM Audit" -> choose focus areas -> OpenAI audits using UMA -> Results stored in DB
- System prompt defined in
server/axiom-prompt.ts(buildAxiomSystemPrompt function + LEARN_LINK_URLS export) - Uses OpenAI GPT-4o with 11-Phase Audit Workflow based on UMA framework
- Phase 1: Document Classification (manuscript type, discipline, study design, reporting guideline)
- Phase 2: Reporting Guideline Decision Tree (CONSORT 2025 for RCTs, PRISMA 2020 for systematic reviews, STROBE for observational, COREQ for qualitative, STARD for diagnostics, ARRIVE for animal, TRIPOD+AI for prediction models)
- Phase 3: Structured 5-Move Abstract (Hook, Gap, Approach, Findings, Impact)
- Phase 4: CaRS Model Introduction (Establish Territory, Establish Gap, Resolve Gap)
- Phase 5: Methods Recipe Rule (Nature standard reproducibility)
- Phase 6: Results Mirror Principle (match research questions order)
- Phase 7: Discussion 4 Moves (Interpretation, Comparison, Implication, Novelty Resolution)
- Phase 8: Limitations as Generalizability Boundaries
- Phase 9: Conclusions (New Reality synthesis)
- Phase 10: Zero-I Perspective (first-person pronoun removal)
- Phase 11: Writing Standards & Technical Sweep
- Dual Engine: UMA 1.0 (evaluation logic) + UMA v2.0 (references from ICMJE, EQUATOR, APA, COPE, Nature, Springer, etc.)
- Severity Levels: CRITICAL (must fix before submission), IMPORTANT (strongly recommended), MINOR (quality improvements)
- Feedback Protocol: Every item includes Issue, Why It Matters, Recommendation, Standard, Learn More with severity level
- Returns structured JSON: readinessScore, executiveSummary, documentClassification, scoreBreakdown (9 categories), criticalIssues (with severity), detailedFeedback (with severity + resourceTopic), actionItems, abstractAnalysis, zeroIPerspective, strengthsToMaintain, learnLinks
- Score breakdown weighted contributions: Title/Keywords (8%), Abstract (12%), Introduction (10%), Methods (15%), Results (13%), Discussion (12%), Ethics & Transparency (10%), Writing Quality (10%), Zero-I (10%)
- Ethics & Transparency checks: IRB approvals, AI disclosure (ICMJE 2024), COI declarations, data availability, funding, author contributions (CRediT)
- Audit options dialog lets users select focus areas before each audit
- Audit results stored in manuscripts.analysis_json (JSONB)
- Loaded from DB on subsequent visits (no re-audit needed)
- Auto-re-extraction triggers when fullText is null but fileKey exists (for legacy manuscripts)
- LEARN_LINK_URLS map covers 21 topic areas with curated URLs from UMA v2.0 references
- Authentication managed via Replit Auth sessions (server-side)
- useAuth hook provides user state on frontend
- React Query for server state management
- No sidebar needed - centered card-based layout
- Client selects PDF/DOCX/TXT file (max 50MB)
- Client requests presigned URL from backend
- Client uploads file directly to GCS via presigned URL
- Backend receives file_key, creates manuscript record
- Backend extracts text using pdf-parse (PDF) or mammoth (DOCX)
- Full text stored in full_text column, first 500 chars in preview_text