# Project export: ToneBridge

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: CruzHacks 2026
- Tagline: Bridging intent and understanding in human communication.
- Devpost: https://devpost.com/software/tonebridge-j21d8r
- GitHub: https://github.com/DevFuel01/ToneBridge
- Demo: https://tonebridge.namzglobal.com/
- Video: https://www.youtube.com/embed/oOqmkjJGxn4?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 1 GitHub contributor(s) — Idris Ibrahim (3 commits)

## Devpost submission (written by the team)

### Inspiration

We’ve all sent messages that were misinterpreted texts read as “angry” because they lacked context, emails seen as “aggressive” because they were brief. In our digital-first world, we’re losing the nuance of human connection. ToneBridge was built to stop this friction before it starts, bridging the gap between intent and understanding.

### What it does

ToneBridge is a Human Interaction Mediator powered by Gemini AI. It doesn’t just check grammar it reads for emotional tone and helps people communicate better. Analyzes your message for risk (e.g., “High Risk: Accusatory”) Explains why it might be misread (e.g., “This sounds defensive because…”) Rewrites it instantly in three human-centered tones: Calm & Friendly – for casual connection Professional & Clear – for workplace clarity Empathetic & Supportive – for deepening relationships How I built it Frontend: HTML, CSS and JavaScript for a lightweight, intuitive interface Backend: PHP with PDO for secure API calls AI Engine: Google Gemini (gemini-2.5-flash) with a carefully engineered system prompt Prompt Engineering: 80% of effort focused on making Gemini act as a “Mediator,” with strict JSON output for parsing Storage: MySQL logs interactions for future analytics The result is fast, reliable and human-centered. Challenges I ran into Token limits: Needed to increase maxOutputTokens to ensure full three-message rewrites Parsing consistency: LLM responses required strict JSON schemas to avoid ambiguity Emotional nuance: Balancing professional vs robotic tone took multiple iterations Accomplishments that I'm proud of Zero-friction UX: Fully functional in under 5 seconds, no login required Human-centered design: Every element, from explanations to colors, reduces stress Real-time AI analysis: Three thoughtful rewrites returned nearly instantly What I learned Prompting is programming: AI behavior depends entirely on how its role is defined UX is emotional: Users under stress need a calming interface, not a “techy” one

### What's next

Browser Extension: Fix messages directly in Gmail or Slack Tone Slider: Users can control the level of formality Multi-language Support: Bridging cultural gaps and tonal differences

## README (from the GitHub repository)

# ToneBridge
A human-centered AI tool that analyzes emotional tone and rewrites messages for clarity and empathy using Gemini AI.

# ToneBridge

ToneBridge is a human-centered AI tool that helps prevent miscommunication in digital messages by analyzing emotional tone and rewriting messages for clarity and empathy.

## 🚀 What It Does
- Analyzes text for emotional tone and misinterpretation risk
- Explains why a message may be misunderstood
- Rewrites messages into:
  - Calm & Friendly
  - Professional & Clear
  - Empathetic & Supportive

## 🛠️ Built With
- HTML, CSS and JavaScript
- PHP (Backend API)
- MySQL (Data Storage)
- Google Gemini AI (gemini-2.5-flash)

## 🧠 How It Works
1. User enters a message
2. Backend sends it to Gemini AI with a mediator-style prompt
3. AI returns tone analysis + rewritten versions
4. Results are displayed instantly in the UI

## 📸 Demo
https://www.youtube.com/watch?v=oOqmkjJGxn4

## 📦 Setup (Local)
1. Clone the repo
2. Import `database/tonebridge.sql` into MySQL
3. Add your DB credentials in `config/db.php`
4. Add your Gemini API key
5. Run on a local PHP server

## 🏁 Hackathon Project
Built as a solo hackathon submission focused on Human Interaction and AI-powered communication.


## Detected evidence (automated analysis)

Indexed codebase: 1 recognized source files, 1 KB.
- CSS (language) — claimed on Devpost, not found in the code
- Google Gemini (technology) — claimed on Devpost, not found in the code
- HTML (language) — claimed on Devpost, not found in the code
- JavaScript (language) — claimed on Devpost, not found in the code
- PHP (language) — claimed on Devpost, not found in the code
- SQL (language) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (1 of 1)

```
README.md
```

### Dependencies

No dependency index available.

### Recent commits (newest first)

- Add files via upload
- Enhance README with project details and setup instructions
- Initial commit

## Key source files (fetched from GitHub, selected and truncated for size)

No suitable source files found.