An open API service indexing awesome lists of open source software.

https://github.com/simranshaikh20/vibesafe


https://github.com/simranshaikh20/vibesafe

Last synced: 13 days ago
JSON representation

Awesome Lists containing this project

README

          

# VibeSafe ๐Ÿ›ก๏ธ

> **You built it. Can you prove it's yours?**

VibeSafe is a privacy-first AI code auditor that analyzes your project and generates a **Proof of Authorship certificate** โ€” identifying your human architectural decisions versus AI-assisted patterns. Powered by **Gemma 4 31B** running via OpenRouter's free tier.

---

## ๐Ÿง  What It Does

Drop your project files into VibeSafe and get a structured report across four dimensions:

| Report Section | What You Get |
|---|---|
| ๐Ÿ”‘ **Proof of Authorship** | Your human design decisions vs AI-generated patterns, with an originality score |
| ๐Ÿ” **Security Audit** | Vulnerabilities, exposed secrets, injection risks with specific fixes |
| ๐Ÿง  **Logic Analysis** | Edge cases, dead code, race conditions, code quality score |
| ๐Ÿ“– **Plain English** | What your code actually does, explained simply |

At the end, download a **signed Proof of Authorship certificate** โ€” a plain-text document listing every architectural decision that proves the project is genuinely yours.

---

## ๐ŸŽฏ Why This Exists

The software industry has shifted. AI-assisted development is now standard practice โ€” but that creates a real problem: **how do you prove what you actually built?**

When submitting to a hackathon, applying for a job, or open-sourcing a project, reviewers increasingly ask: *"Did you write this, or did an AI?"*

VibeSafe answers that question โ€” not by detecting AI, but by **surfacing your human decisions**: the architecture choices, the product instincts, the specific tradeoffs only you would have made.

---

## โš™๏ธ How It Works

```
User uploads code files
โ†“
VibeSafe reads all files and concatenates them
โ†“
Entire codebase sent as single prompt to Gemma 4 31B
(262K context window โ€” no chunking needed for most projects)
โ†“
Gemma 4 returns structured JSON analysis
โ†“
4-section report rendered in the dashboard
โ†“
User downloads Proof of Authorship certificate (.txt)
```

### Why Gemma 4 31B?

- **262K context window** โ€” your entire codebase fits in one prompt. No chunking, no lost context, no missed connections between files.
- **Real Gemma 4** โ€” not a distilled or quantized version. Full model capability for nuanced authorship reasoning.
- **Free via OpenRouter** โ€” zero cost, no credit card, just an API key from openrouter.ai
- **Strong code understanding** โ€” Gemma 4 31B ranks highly on coding and reasoning benchmarks, making it well-suited for security analysis and architectural pattern recognition.

---

## ๐Ÿš€ Getting Started

### Prerequisites

- A free OpenRouter API key from [openrouter.ai/keys](https://openrouter.ai/keys)
- No installation required โ€” VibeSafe runs entirely in the browser

### Usage

1. Go to the VibeSafe web app
2. Paste your OpenRouter API key into the key input field
3. Upload your project files (drag and drop, multiple files supported) โ€” or paste code directly
4. Click **ANALYZE WITH GEMMA 4**
5. Wait 30โ€“90 seconds while Gemma 4 reasons through your codebase
6. View your full report across all four sections
7. Click **DOWNLOAD PROOF OF AUTHORSHIP CERTIFICATE** to save your `.txt` certificate

### Supported File Types

`.py` `.js` `.jsx` `.ts` `.tsx` `.html` `.css` `.json` `.yaml` `.yml` `.sh` `.go` `.rs` `.java` `.php` `.rb` `.sql` `.vue` `.svelte` `.prisma` `.toml` `.env` `.graphql`

---

## ๐Ÿ” Privacy

**Your code never leaves your browser session in any persistent way.**

- VibeSafe makes a direct API call from your browser to OpenRouter
- No backend server stores your files
- No database logs your code
- Your API key is stored in React state only โ€” never in localStorage, never sent anywhere except OpenRouter
- Each session is stateless โ€” closing the tab clears everything

---

## ๐Ÿ“‹ Proof of Authorship Certificate

The exported certificate looks like this:

```
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
VIBESAFE โ€” PROOF OF AUTHORSHIP
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Generated: 2026-05-16T10:32:11.000Z
Analyzed by: Gemma 4 31B via OpenRouter
Files: app.py, utils.py, config.py

HUMAN CONTRIBUTION SCORE: 78/100

WHAT THIS PROJECT DOES
A REST API for managing todo items with user authentication,
SQLite persistence, and a search endpoint.

HUMAN ARCHITECTURAL DECISIONS
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
1. Decision to separate database connection into get_db()
Evidence: Explicit factory function pattern in app.py line 12

2. Choice to use MD5 โ†’ SHA256 migration path in auth
Evidence: dual-hash verification in login() function

3. Stateless token design using user ID
Evidence: /login returns raw user ID as token, deliberate tradeoff

AI-ASSISTED PATTERNS DETECTED
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
1. Boilerplate Flask route scaffolding
Location: All @app.route decorators follow identical pattern

2. Generic error handling structure
Location: try/except blocks in upload handlers

SECURITY STATUS: HIGH
CODE QUALITY: 72/100
VIBE SCORE: 68/100

VERDICT: Solid architecture with critical SQL injection issues
that need fixing before any production deployment.

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
This certificate was generated by VibeSafe
Powered by Gemma 4 ยท Built for the vibe coding era
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
```

---

## ๐Ÿ—‚๏ธ Project Structure

```
vibesafe/
โ”œโ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ App.jsx โ† Main app with view state management
โ”‚ โ”œโ”€โ”€ index.css โ† Global styles, scanline animation
โ”‚ โ””โ”€โ”€ components/
โ”‚ โ”œโ”€โ”€ Header.jsx โ† Top bar with branding
โ”‚ โ”œโ”€โ”€ CodeUploader.jsx โ† File drag-drop + paste tabs + API key input
โ”‚ โ”œโ”€โ”€ LoadingAnalysis.jsx โ† Animated terminal loading screen
โ”‚ โ”œโ”€โ”€ ReportDashboard.jsx โ† 4-card report layout
โ”‚ โ”œโ”€โ”€ AuthorshipCard.jsx โ† Hero card + certificate export
โ”‚ โ”œโ”€โ”€ SecurityCard.jsx โ† Expandable vulnerability list
โ”‚ โ”œโ”€โ”€ LogicCard.jsx โ† Quality score + logic issues
โ”‚ โ””โ”€โ”€ PlainEnglishCard.jsx โ† Plain language explanation
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ vite.config.js
โ”œโ”€โ”€ tailwind.config.js
โ””โ”€โ”€ package.json
```

---

## ๐Ÿ› ๏ธ Tech Stack

| Layer | Technology |
|---|---|
| Frontend | React 18 + Vite |
| Styling | Tailwind CSS + custom CSS |
| Animations | Framer Motion |
| File handling | react-dropzone |
| AI Model | Gemma 4 31B (`google/gemma-4-31b-it:free`) |
| AI Provider | OpenRouter (free tier) |
| Context window | 262,144 tokens |
| Deployment | Lovable / Vercel / Netlify |

---

## ๐Ÿ”ฌ Model Selection Rationale

VibeSafe specifically uses **Gemma 4 31B** for these reasons:

**Why not a smaller Gemma 4 model (4B, 2B)?**
Too small for nuanced security pattern recognition and multi-file architectural reasoning. Small models miss cross-file dependencies that are critical for authorship analysis.

**Why not a different provider or model?**
Gemma 4 31B offers 262K context โ€” the entire project in one shot. Competing models with similar context windows either require payment or don't perform as well on structured JSON output for code analysis tasks.

**Why the full 31B dense model over the 26B MoE?**
For security analysis, consistent reasoning quality matters more than inference speed. The 31B dense model activates all parameters for every token, producing more reliable and thorough vulnerability detection.

---

## ๐Ÿ“„ License

MIT License โ€” see [LICENSE](LICENSE) for details.

---

## ๐Ÿ™Œ Contributing

Pull requests welcome. For major changes, open an issue first to discuss what you'd like to change.

1. Fork the repo
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

---

## ๐Ÿ“ฌ Contact

Built by **Simran Shaikh** โ€” [@SimranShaikh20](https://github.com/SimranShaikh20)

---

*VibeSafe ยท Built for the vibe coding era ยท Powered by Gemma 4*