https://github.com/simranshaikh20/vibesafe
https://github.com/simranshaikh20/vibesafe
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/simranshaikh20/vibesafe
- Owner: SimranShaikh20
- Created: 2026-05-16T04:57:37.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-16T10:50:42.000Z (about 1 month ago)
- Last Synced: 2026-05-16T12:41:07.659Z (about 1 month ago)
- Language: TypeScript
- Homepage: https://vibe-safe-flax.vercel.app
- Size: 196 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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*