Skip to content

Repository files navigation

Acad3micFlow: Advanced AI Scholarly Platform

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.

🚀 Key Features

  • 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.

🛠️ Tech Stack

  • 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.

📁 System Architecture

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

⚙️ Setup & Installation

1. Prerequisites

  • Docker & Docker Compose (Recommended)
  • Or Python 3.9+ and PostgreSQL locally.

2. Environment Configuration

Copy the template and fill in your credentials:

cp .env.example .env

Required 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.

3. Running with Docker (Recommended)

The fastest way to get started is using Docker Compose:

docker-compose up --build

This starts the API on http://localhost:8000.

4. Local Installation

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 --reload

🛡️ API Endpoints

  • GET /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.

📜 Production Readiness

  • Logging: Structured production logging enabled.
  • Global Error Handling: Comprehensive exception mapping for security.
  • CORS: Restricted origins via .env configuration.
  • Health Checks: Integrated Docker health checks for automated monitoring.

⚖️ License

Copyright © 2026 Acad3micFlow. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages