Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IntegrityAI

Build original work. Learn from the signal.

IntegrityAI is a full-stack academic writing companion that helps students understand and improve their work before submission. It combines draft analysis with practical feedback on originality, AI-likeness, citations, and learning quality, while giving educators a focused view of assignments and submissions.

IntegrityAI is designed for formative feedback and revision support. Its scores are signals to investigate, not final academic judgments.

Why IntegrityAI?

Most integrity tools stop at detection. IntegrityAI turns the moment after detection into a learning loop:

  1. Start an assignment and write or upload a draft.
  2. Run an integrity check on the current version.
  3. Review the risk level, similarity signal, AI probability, learning score, feedback, tips, and citation gaps.
  4. Revise with intention and keep a history of the work as it develops.

What is included

For students

  • Secure sign-up and login with JWT authentication
  • Assignment and draft workspace
  • AI-assisted integrity analysis
  • Similarity, AI-probability, risk-level, and learning scores
  • Actionable feedback and improvement tips
  • Missing-citation signals
  • PDF, PPTX, and document-oriented file processing support
  • Draft history for revisiting earlier work
  • Profile and account views

For educators

  • Educator dashboard
  • Assignment and submission visibility
  • Student-facing feedback workflows that support learning instead of punishment

Architecture

Next.js 14 frontend
        |
        | REST API + JWT
        v
FastAPI backend ---- SQLAlchemy ---- SQLite (default)
        |
        v
Integrity analysis service ---- OpenAI API

Project layout

.
├── backend/
│   ├── main.py                 # FastAPI application and route registration
│   ├── database.py             # SQLAlchemy engine and session setup
│   ├── models.py               # User, assignment, and draft models
│   ├── schemas.py              # Request and response schemas
│   ├── routers/                # Auth, assignments, drafts, files, educator APIs
│   └── services/               # AI analysis and file extraction services
├── frontend/
│   ├── app/                    # Next.js routes and screens
│   ├── components/             # Shared UI components
│   ├── lib/                    # API client and auth state
│   └── types/                  # Shared TypeScript types
├── .env.example
└── package.json

Quick start

Prerequisites

  • Python 3.11 or later
  • Node.js 18 or later
  • npm
  • An OpenAI API key for live integrity analysis

1. Clone the repository

git clone https://github.com/Amrita8642/Integrity-AI.git
cd Integrity-AI

2. Configure the backend

Create backend/.env from the example configuration:

cp backend/.env.example backend/.env

Set a real OPENAI_API_KEY and a strong SECRET_KEY in backend/.env. Keep this file private.

Create a virtual environment and install the API dependencies:

cd backend
python -m venv venv

# Windows PowerShell
venv\Scripts\Activate.ps1

# macOS/Linux
# source venv/bin/activate

pip install -r requirements.txt
uvicorn main:app --reload --port 8000

The API will be available at http://localhost:8000. Interactive API documentation is available at http://localhost:8000/docs.

3. Configure and run the frontend

Open a second terminal at the project root:

cd frontend
npm install

Create frontend/.env.local:

NEXT_PUBLIC_API_URL=http://localhost:8000

Start Next.js:

npm run dev

Open http://localhost:3000 in your browser.

Useful commands

Frontend

npm run dev       # Start the development server
npm run build     # Create a production build
npm run start     # Serve the production build
npm run lint      # Run Next.js linting

Backend

uvicorn main:app --reload --port 8000

FastAPI exposes the OpenAPI schema and interactive Swagger UI at /docs.

API surface

The backend groups its REST endpoints by workflow:

Area Prefix Purpose
Authentication /api/auth Registration, login, and current-user access
Assignments /api/assignments Create and manage student assignments
Drafts /api/drafts Save drafts, run checks, and view history
Files /api/files Upload and extract supported files
Educator /api/educator Educator dashboard and submission views

Health checks:

  • GET / returns the API status message.
  • GET /health returns { "status": "healthy" }.

Environment variables

Variable Used by Description
OPENAI_API_KEY Backend API key for integrity analysis
SECRET_KEY Backend Secret used to sign JWTs
DATABASE_URL Backend SQLAlchemy database URL; SQLite is the default
NEXT_PUBLIC_API_URL Frontend Base URL of the FastAPI service

Never commit .env, .env.local, API keys, or production secrets. The repository includes example files with placeholder values for setup.

Production notes

  • Replace the default SQLite database with a managed database for production workloads.
  • Use a strong, rotated SECRET_KEY and store secrets in the deployment platform's secret manager.
  • Restrict CORS origins to the deployed frontend URL.
  • Add rate limits, observability, and human review around high-impact academic decisions.
  • Treat AI and similarity signals as probabilistic evidence, not proof of misconduct.

Contributing

  1. Create a feature branch.
  2. Keep frontend and backend changes focused.
  3. Add or update tests when behavior changes.
  4. Run the relevant lint, build, or API checks before opening a pull request.

License

No license has been declared yet. Add a license file before distributing the project outside its owning organization.


Built to make academic integrity a conversation about better work.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages