Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
8 changes: 8 additions & 0 deletions .vite/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"hash": "5c4b6dcb",
"configHash": "c8d13ad7",
"lockfileHash": "ef37088c",
"browserHash": "644b9ca7",
"optimized": {},
"chunks": {}
}
3 changes: 3 additions & 0 deletions .vite/deps/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
143 changes: 73 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,130 +1,133 @@
# Vi-Notes

**Vi-Notes** is an authenticity verification platform designed to distinguish genuine human-written content from AI-generated or AI-assisted text. The system focuses on analyzing **writing behavior** alongside **statistical and linguistic characteristics** of the text to establish reliable authorship verification.
**Vi-Notes** is an authenticity verification platform that helps distinguish genuine human-written content from AI-generated or AI-assisted text.

This repository represents the **design and conceptual foundation** for the Vi-Notes system.
Instead of relying only on what is written, Vi-Notes focuses on how it is written by combining writing behavior with statistical and linguistic patterns to build a more reliable way of verifying authorship.

---

## Motivation
## Why Vi-Notes?

With the widespread availability of AI writing tools, verifying true human authorship has become increasingly challenging. Most existing detection methods rely primarily on textual analysis, which can be inconsistent and easy to bypass.
With AI writing tools becoming widely accessible, it is increasingly difficult to determine whether content is truly human-written.

Vi-Notes approaches this problem by combining:
- Behavioral signals from the writing process
- Statistical analysis of the written content
- Correlation between how content is written and what is written
Most existing solutions focus only on analyzing the final text, which can often be misleading or easy to bypass.

Vi-Notes takes a different approach by examining:
- Writing behavior (how the content is created)
- Text patterns (what the content looks like)
- The relationship between the two

---

## Core Idea

Human writing naturally includes:
- Variable typing speeds
- Pauses during thinking
- Revisions during idea formation
- Irregular sentence structures
- A relationship between content complexity and editing frequency
Human writing is naturally dynamic and imperfect. It includes:
- Fluctuating typing speeds
- Pauses during thinking
- Edits and rewrites
- Slight inconsistencies in structure

AI-generated or pasted text often lacks these behavioral signatures.
AI-generated or pasted content, in contrast, often appears:
- Uniform
- Highly consistent
- Lacking natural behavioral signals

Vi-Notes is designed to capture and analyze these characteristics to assess authorship authenticity.
Vi-Notes captures these subtle differences to assess authenticity.

---

## Key Features

### Writing Session Monitoring
- Capture keystroke timing metadata (not raw key content)
- Track pauses, deletions, edits, and writing flow
- Detect pasted or externally inserted text blocks

### Behavioral Pattern Analysis
- Pause distribution before sentences and paragraphs
- Typing speed variance
- Revision frequency relative to text complexity
- Micro-pauses around punctuation and structural boundaries

### Textual Statistical Analysis
- Sentence length variation
- Vocabulary diversity metrics
- Stylistic consistency analysis
- Linguistic irregularities typical of human writing
- Tracks typing patterns without storing actual keystrokes
- Detects pauses, edits, and writing flow
- Identifies pasted or externally inserted content

### Behavioral Analysis
- Pause patterns across sentences and paragraphs
- Typing speed variations
- Editing frequency relative to content complexity
- Micro-behaviors around punctuation

### Textual Analysis
- Sentence length variation
- Vocabulary diversity
- Writing style consistency
- Natural irregularities in human writing

### Cross-Verification Engine
- Correlate keyboard behavior with text evolution
- Identify mismatches between behavioral data and content
- Flag suspicious uniformity patterns
- Matches writing behavior with final content
- Detects mismatches and suspicious patterns
- Flags unusually uniform or artificial text

### Authenticity Reports
- Confidence score for human authorship
- Highlighted suspicious segments
- Supporting behavioral and textual indicators
- Shareable verification summaries
- Human-authorship confidence score
- Highlighted suspicious sections
- Clear explanation of detected patterns
- Shareable summaries

---

## Tech Stack (MERN Architecture)
## Tech Stack

### Frontend
- React
- TypeScript
- Electron for desktop-level keyboard event access
- React
- TypeScript
- Electron for capturing keyboard interaction

### Backend
- Node.js
- Express.js
- RESTful APIs for session handling and analysis
- Node.js
- Express.js
- REST APIs for session tracking and analysis

### Database
- MongoDB
- Encrypted storage for writing sessions, keystroke metadata, and reports
- MongoDB
- Secure and encrypted storage

### Machine Learning
- TensorFlow / PyTorch
- Supervised learning for human vs AI-assisted writing
- Unsupervised anomaly detection
- NLP-based statistical signature analysis
- TensorFlow / PyTorch
- Behavioral and NLP-based analysis
- Anomaly detection models

---

## Privacy & Ethics
## Privacy and Ethics

Vi-Notes is designed with privacy-first principles:
Vi-Notes is built with privacy-first principles:

- No storage of raw keystroke content
- Only timing, frequency, and structural metadata is collected
- Encrypted data storage
- User-controlled session tracking
- Monitoring limited strictly to active writing sessions
- No storage of raw keystroke content
- Only metadata such as timing, frequency, and structure is captured
- Data is encrypted
- Monitoring is limited to active writing sessions
- Users retain control over their data

---

## Project Goals
## Goals

- Restore trust in written content authenticity
- Differentiate between human-written, AI-assisted, and AI-generated text
- Adapt detection methods as AI writing tools evolve
- Maintain ethical, transparent, and privacy-conscious verification
- Restore trust in digital writing
- Differentiate human-written, AI-assisted, and AI-generated content
- Adapt to evolving AI tools
- Maintain ethical and transparent verification

---

## Repository Scope

This repository currently serves as:
- A design reference
- A research and experimentation space
- A foundation for future MERN-based implementation
This repository currently represents:
- A design and conceptual foundation
- A research and experimentation space
- The starting point for a MERN-based implementation

---

## Contributing

Contributions are welcome, especially for **feature requests and their implementation**.
If you are interested in working on an existing feature request or proposing a new one, please open or comment on an issue to start the discussion.
Contributions are welcome, especially for feature requests and implementations.
If you are interested, please open or comment on an issue to begin discussion.

---

## License

This project is licensed under the MIT License.
This project is licensed under the MIT License.
24 changes: 24 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions frontend/.vite/deps_temp_72ba75aa/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
23 changes: 23 additions & 0 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
},
])
44 changes: 44 additions & 0 deletions frontend/eslint_errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

C:\Users\aksha\OneDrive\Desktop\vi-notes\src\components\Navbar.tsx
23:5 error Error: Calling setState synchronously within an effect can trigger cascading renders

Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
* Update external systems with the latest state from React.
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.

Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).

C:\Users\aksha\OneDrive\Desktop\vi-notes\src\components\Navbar.tsx:23:5
21 |
22 | useEffect(() => {
> 23 | checkAuth();
| ^^^^^^^^^ Avoid calling setState() directly within an effect
24 | window.addEventListener('storage', checkAuth);
25 | const interval = setInterval(checkAuth, 1000);
26 | return () => { react-hooks/set-state-in-effect

C:\Users\aksha\OneDrive\Desktop\vi-notes\src\pages\DashboardPage.tsx
1:10 error 'motion' is defined but never used @typescript-eslint/no-unused-vars
5:84 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

C:\Users\aksha\OneDrive\Desktop\vi-notes\src\pages\EditorPage.tsx
12:3 warning Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-unused-vars')

C:\Users\aksha\OneDrive\Desktop\vi-notes\src\pages\LandingPage.tsx
5:68 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
97:51 error Error: Cannot call impure function during render

`Math.random` is an impure function. Calling an impure function can produce unstable results that update unpredictably when the component happens to re-render. (https://react.dev/reference/rules/components-and-hooks-must-be-pure#components-and-hooks-must-be-idempotent).

C:\Users\aksha\OneDrive\Desktop\vi-notes\src\pages\LandingPage.tsx:97:51
95 | <motion.div
96 | initial={{ width: 0 }}
> 97 | whileInView={{ width: `${Math.random() * 50 + 40}%` }}
| ^^^^^^^^^^^^^ Cannot call impure function
98 | className="h-full bg-gradient-to-r from-primary to-orange-400"
99 | />
100 | </div> react-hooks/purity

Γ£û 6 problems (5 errors, 1 warning)
0 errors and 1 warning potentially fixable with the `--fix` option.

13 changes: 13 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>vi-notes</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading