Skip to content
MRINALPRAKASHFSDPublic

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

66 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Origin AI

CI Security Scan TypeScript React License: MIT

Origin AI is an AI text provenance and detection platform built on TanStack Start, Nitro, and React 19. It inspects documents and passages to assess likelihood of AI generation, calculate confidence ratings, and isolate stylistic markers.

Analysis requests execute entirely within server functions using streaming responses from the AI Gateway. Client applications never hold API credentials, and all operations enforce quota limits and zero-knowledge session authorization.


Architecture Overview

[ Client Browser ]
  │  React 19 / TanStack Router
  │  Radix UI + Tailwind CSS v4
  │  Browser Guest Token (localStorage)
  ▼
[ Nitro Edge / TanStack Start ]
  │  Server Functions (RPC)
  │  SHA-256 IP Hashing & Guest Token Salt
  │  Quota Enforcement & Sliding Window
  ├──► [ AI Gateway Engine ] ──► Streaming SSE Analysis
  ├──► [ Supabase PostgreSQL ] ──► Scans, Claims, Assets
  └──► [ Private Object Storage ] ──► origin-assets (7-Day TTL)

Read our complete Architecture Guide for details on edge execution, stream parsing, and database transactions.


Features

  • Granular Passage Highlighting: Highlights individual text segments with color-coded likelihood ratings and reasoning notes.
  • Multi-Dimensional Metrics: Breaks down overall scores with confidence ratings and signal indicators such as perplexity and repetition patterns.
  • Server-Isolated AI Streaming: Streams inference directly from the AI Gateway Responses API on the server, keeping all keys private.
  • Zero-Knowledge Guest Authorization: Lets anonymous users view their own scans without accounts by hashing browser tokens with SHA-256 before database lookup.
  • Sliding-Window Quotas: Enforces daily scan limits per IP hash or authenticated user ID to stop abuse.
  • Automatic Asset Lifecycle: Stores uploaded files in a private Supabase bucket with a 7-day retention period and scheduled background pruning.
  • Zero Client Secrets: All AI Gateway inference and database administrative operations execute strictly server-side.

Getting Started

Prerequisites

  • Node.js 22+ (or Bun 1.2+)
  • A Supabase project with PostgreSQL

Installation

  1. Clone the repository:

    git clone https://github.com/MRINALPRAKASHFSD/Origin_AI.git
    cd Origin_AI
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    cp .env.example .env
  4. Start the development server:

    npm run dev

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


Environment Variables

Variable Scope Description
VITE_SUPABASE_URL Client & Server Public Supabase endpoint URL
VITE_SUPABASE_PUBLISHABLE_KEY Client & Server Public Supabase anonymous key
VITE_SUPABASE_PROJECT_ID Client & Server Supabase project identifier
SUPABASE_SERVICE_ROLE_KEY Server Only Administrative key for server functions
AI_GATEWAY_API_KEY Server Only Access token for AI Gateway streaming
ASSET_CLEANUP_CRON_SECRET Server Only Bearer token authorizing asset pruning job

Quality and Verification

Run our full verification suite before committing:

# Code formatting check
npm run format

# ESLint analysis
npm run lint

# TypeScript verification
npx tsc --noEmit

# Vitest test suite
npm run test

# Production build verification
npm run build

Project Structure

Origin_AI/
├── .cursor/rules/             # Cursor rules for styling and architecture
├── .github/                   # CI/CD workflows, issue forms, dependabot
├── docs/                      # In-depth architectural and API guides
│   ├── architecture.md
│   ├── api.md
│   ├── database.md
│   ├── security.md
│   └── deployment.md
├── drizzle/                   # Drizzle ORM schemas and SQL migrations
├── scripts/                   # Utility and validation scripts
├── workflows/                 # CI/CD, CodeQL, and release workflow definitions
├── src/
│   ├── components/            # UI components and Radix primitives
│   ├── hooks/                 # Custom React hooks
│   ├── integrations/          # Supabase client adapters
│   ├── lib/                   # Server functions, AI client, validation
│   ├── routes/                # TanStack Start file-based routes
│   └── test/                  # Vitest unit and integration suites
└── public/                    # Static assets

Contributing

We welcome contributions from the community. Please review our Contributing Guide and Code of Conduct.

For vulnerability disclosures, see our Security Policy.


License

This project is licensed under the MIT License. Copyright (c) 2026 MRINAL PRAKASH.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages