Acad3micFlow is a state-of-the-art, full-featured AI platform designed for research scholars. It transforms AI-generated content into high-fidelity, human-like academic text while maintaining scholarly integrity and citation accuracy.
It features a ChatGPT-inspired unified interface, a robust credit-based subscription model, and deep integration with Google's Gemini 2.0 AI.
- ChatGPT-like Experience: Multiple chat history, real-time-like streaming, and responsive glassmorphic UI.
- Academic Humanization Pipeline:
- Dynamic Citations: Automatically protects APA/IEEE citations during rewriting using sophisticated regex extraction.
- Linguistic Enhancement: Proprietary pipeline using NLTK and spaCy to expand contractions, replace repetitive synonyms, and inject academic transitions.
- Final Finesse: A specialized "Simple Grammar & Spelling" pass using Gemini 2.0 Flash to ensure linguistic perfection without altering scholarly tone.
- PDF Interaction: Upload research papers and chat with them directly using integrated text extraction.
- Smart User Management: Firebase Auth integration for professional-grade secure login and account mapping.
- Credit & Subscription System: Automated Stripe integration for purchasing credits and managing sophisticated word-quota based subscriptions.
- Admin Control Center: A dedicated dashboard for monitoring system load, user activity, and manual credit overrides.
- Backend: Python 3.9+, FastAPI, SQLAlchemy, Pydantic v2.
- AI/ML: Google Gemini 2.0 Flash, Spacy (
en_core_web_sm), NLTK. - Frontend: Vanilla HTML5/CSS3 (Glassmorphism layout), JavaScript.
- Database: PostgreSQL (Production), SQLite (Development).
- Infrastructure: Docker & Docker Compose.
- Auth: Firebase Admin SDK.
- Payments: Stripe SDK.
The project follows a modern modular architecture for scalability and maintainability:
Acad3micFlow/
├── app/ # FastAPI Application Source
│ ├── api/ # Route handlers (chats, messages, files, etc.)
│ ├── core/ # Centralized config (pydantic), auth & logging
│ ├── db/ # Database engine & session management
│ ├── models/ # SQLAlchemy database tables
│ ├── schemas/ # Pydantic models for validation
│ ├── services/ # Core logic (AI generation, humanization)
│ └── main.py # Canonical application entry point
├── admin.html # Administrative Dashboard
├── index.html # Premium User Frontend
├── Dockerfile # Production-ready container config
├── docker-compose.yml # Multi-container orchestration
├── .env.example # Environment variable template
└── requirements.txt # Python dependencies
- Docker & Docker Compose (Recommended)
- Or Python 3.9+ and PostgreSQL locally.
Copy the template and fill in your credentials:
cp .env.example .envRequired Variables:
GOOGLE_AI_API_KEY: Gemini API Key from Google AI Studio.DATABASE_URL: PostgreSQL URI (e.g.,postgresql://user:pass@localhost:5432/acad3micflow).FIREBASE_SERVICE_ACCOUNT_PATH: Path to your Firebase service account JSON.STRIPE_SECRET_KEY: Stripe API secret key.
The fastest way to get started is using Docker Compose:
docker-compose up --buildThis starts the API on http://localhost:8000.
If running without Docker:
# Install dependencies
pip install -r requirements.txt
# Download NLP models
python -m spacy download en_core_web_sm
# Start the server
uvicorn app.main:app --reloadGET /health: System health check.POST /messages/: Primary AI interaction endpoint. Handles humanization and credit deduction.GET /chats/: Retrieve user conversation history.POST /files/: PDF processing and analysis.GET /subscriptions/: Manage user tiers and payment status.
- Logging: Structured production logging enabled.
- Global Error Handling: Comprehensive exception mapping for security.
- CORS: Restricted origins via
.envconfiguration. - Health Checks: Integrated Docker health checks for automated monitoring.
Copyright © 2026 Acad3micFlow. All rights reserved.