Skip to content

Piyushydv08/SafeVoice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

225 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

🌐 SafeVoice – AI-Powered Anonymous Support Platform

A secure, AI-assisted platform where users can anonymously express experiences, access NGO support resources, translate content into regional languages, and safely communicate without exposing identity.


πŸš€ Live Demo

πŸ”— SafeVoice on Netlify


πŸ“Œ About The Platform

SafeVoice is a privacy-focused web platform designed to provide a safe digital environment for individuals to anonymously express experiences related to harassment, abuse, discrimination, emotional distress, or social issues.

The platform integrates:

  • πŸ” Secure Authentication
  • 🧠 AI-powered Text Enhancement
  • 🌍 Multilingual Translation
  • πŸ–ΌοΈ Media Upload Support
  • πŸ“š NGO Resource Discovery
  • ⚑ Serverless Backend Infrastructure

The architecture prioritizes:

  • Privacy-first design
  • Scalability
  • Performance optimization
  • Modular backend services
  • Beginner-friendly open-source contribution

✨ Features

Feature Description
πŸ“ Anonymous Publishing Create, edit, and manage content without exposing identity
🌍 AI Translation Translate content into multiple Indian languages
✏️ AI Grammar Enhancement Improve text quality before publishing
πŸ–ΌοΈ Media Uploads Upload audio recordings and images
πŸ” Secure Authentication Firebase-based login & signup
πŸ“š NGO Resource Hub Browse verified support organizations
⚑ Serverless APIs Lightweight backend using Netlify Functions
πŸ›‘οΈ Abuse Protection Rate limiting and secured API access

πŸ—οΈ High-Level Architecture

flowchart LR

A[πŸ‘€ User] --> B[βš› React Frontend]

B --> C[πŸ”₯ Firebase Authentication]
B --> D[πŸ“¦ Firestore Database]
B --> E[⚑ Netlify Serverless Functions]

E --> F[🧠 Google Gemini AI]

B --> G[πŸ–Ό Media Storage]

D --> H[πŸ“š Content Collection]
D --> I[πŸ‘₯ Users Collection]
D --> J[🏒 NGO Resources]

F --> K[🌍 Translation Output]
F --> L[✏️ Grammar Corrected Output]
Loading

πŸ”„ Complete Platform Workflow

1️⃣ Authentication Lifecycle

sequenceDiagram
    participant User
    participant Frontend
    participant FirebaseAuth
    participant Firestore

    User->>Frontend: Open Login / Signup Page
    Frontend->>FirebaseAuth: Send Credentials
    FirebaseAuth-->>Frontend: Authentication Token
    Frontend->>Firestore: Store User Metadata
    Firestore-->>Frontend: User Profile Created
    Frontend-->>User: Redirect to Dashboard
Loading

Internal Flow

  • Firebase Authentication validates credentials
  • Session tokens are generated securely
  • User metadata is stored in Firestore
  • Public content remains detached from identity

2️⃣ Content Creation Lifecycle

flowchart TD

A[πŸ‘€ User Creates Content] --> B[πŸ“ ShareStory.tsx]

B --> C{Use AI Grammar Enhancement?}

C -->|Yes| D[⚑ correct-grammar.cjs]
D --> E[🧠 Gemini AI]
E --> F[✏️ Enhanced Text]

C -->|No| G[Continue Original Text]

F --> H[πŸ“¦ Submit Content]
G --> H

H --> I{Attach Media?}

I -->|Yes| J[πŸ–Ό Upload Audio/Image]
I -->|No| K[πŸ“„ Store Text Only]

J --> L[☁ Media Storage]
L --> M[πŸ”— Media URL Generated]

M --> N[πŸ”₯ Firestore Database]
K --> N

N --> O[πŸ“š Content Published]
Loading

3️⃣ AI Translation Lifecycle

flowchart LR

A[πŸ“š Existing Content] --> B[⚑ translate.cjs]

B --> C[🧠 Google Gemini AI]

C --> D[🌍 Selected Language Translation]

D --> E[βš› Frontend Display]
Loading

Translation Benefits

  • Regional accessibility
  • Cross-language communication
  • Better outreach for support systems

4️⃣ Content Retrieval Workflow

sequenceDiagram
    participant User
    participant Frontend
    participant Firestore

    User->>Frontend: Open Feed Page
    Frontend->>Firestore: Fetch Content
    Firestore-->>Frontend: Return Content Data
    Frontend-->>User: Render Content Cards
Loading

Retrieved Data

  • Anonymous content
  • Media URLs
  • Timestamp metadata
  • Translation versions

5️⃣ NGO Resource Hub Workflow

flowchart LR

A[πŸ‘€ User Searches NGO] --> B[βš› Resources.tsx]

B --> C[πŸ”₯ Firestore NGO Collection]

C --> D[πŸ“š NGO Resource Cards]

D --> E[πŸ“ž Contact Information]
Loading

🧠 Backend-to-Frontend Detailed Architecture

flowchart TB

subgraph Frontend
A[Home.tsx]
B[Auth.tsx]
C[ShareStory.tsx]
D[Stories.tsx]
E[Resources.tsx]
F[AdminDashboard.tsx]
end

subgraph Backend
G[Firebase Authentication]
H[Firestore Database]
I[Netlify Functions]
J[Google Gemini AI]
K[Media Storage]
end

A --> B
B --> G

C --> I
I --> J

C --> H
D --> H
E --> H
F --> H

C --> K
K --> H

J --> I
I --> C
Loading

πŸ” Security & Privacy Architecture

Privacy Principles

  • Anonymous publishing
  • Minimal personally identifiable information
  • Secure authentication flow
  • Protected backend APIs
  • Firestore security rules
  • Abuse prevention mechanisms

Security Workflow

flowchart LR

A[πŸ‘€ User Request] --> B[πŸ” Firebase Authentication]
B --> C[πŸ›‘ Auth Validation]
C --> D[⚑ Serverless Function]
D --> E[πŸ”₯ Firestore Rules]
E --> F[πŸ“¦ Database Access]
Loading

⚑ API Architecture

Endpoint Purpose
correct-grammar.cjs AI grammar enhancement
translate.cjs Multi-language translation
subscribe.cjs Newsletter/email subscriptions

πŸ“‚ Project Structure

SafeVoice/
β”‚
β”œβ”€β”€ .github/
β”‚   └── ISSUE_TEMPLATE/
β”‚
β”œβ”€β”€ netlify/
β”‚   └── functions/
β”‚       β”œβ”€β”€ correct-grammar.cjs
β”‚       β”œβ”€β”€ subscribe.cjs
β”‚       └── translate.cjs
β”‚
β”œβ”€β”€ public/
β”‚   └── _redirects
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ context/
β”‚   β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ App.tsx
β”‚   β”œβ”€β”€ main.tsx
β”‚   └── index.css
β”‚
β”œβ”€β”€ README.md
β”œβ”€β”€ package.json
β”œβ”€β”€ netlify.toml
└── vite.config.js

βš™οΈ Tech Stack

Layer Technology
Frontend React + TypeScript + Tailwind CSS
Backend Firebase + Netlify Functions
Database Firestore
Authentication Firebase Auth
AI Integration Google Gemini AI
Deployment Netlify
Storage Cloud Storage / External Storage

πŸ“ˆ Scalability Design

SafeVoice uses a modular serverless architecture.

Benefits

  • ⚑ Faster deployments
  • πŸ“ˆ Easy horizontal scaling
  • πŸ’Έ Lower infrastructure costs
  • πŸ”§ Independent backend functions
  • 🌍 CDN delivery via Netlify

🧩 Frontend Routing Structure

flowchart TD

A[🏠 Home] --> B[πŸ” Authentication]
A --> C[πŸ“ Create Content]
A --> D[πŸ“š Explore Content]
A --> E[🏒 NGO Resources]
A --> F[❓ FAQs]
A --> G[πŸ“ž Contact]
A --> H[βš™οΈ Admin Dashboard]
Loading

πŸ› οΈ Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/Piyushydv08/SafeVoice.git
cd SafeVoice

2️⃣ Install Dependencies

npm install
npm install -g firebase-tools
npm install -g netlify-cli

3️⃣ Configure Environment Variables

Create a .env file in the root directory.

Add:

  • Firebase configuration keys
  • Gemini AI API keys
  • Storage configuration values

4️⃣ Start Development Server

netlify dev

▢️ Usage Guide

  1. Open the platform in browser
  2. Sign up securely using Firebase Auth
  3. Create anonymous content
  4. Attach optional media
  5. Improve text using AI grammar enhancement
  6. Translate content into regional languages
  7. Browse NGO support resources

🀝 Contributing

Contributions are welcome from developers of all experience levels.


Contribution Workflow

flowchart LR

A[Fork Repository] --> B[Create Branch]
B --> C[Make Changes]
C --> D[Test Changes]
D --> E[Commit Code]
E --> F[Push Branch]
F --> G[Create Pull Request]
Loading

🌟 GSSoC'26 Participation

SafeVoice is officially part of GirlScript Summer of Code 2026.

Contributors can:

  • Improve frontend UI/UX
  • Build backend APIs
  • Add AI integrations
  • Improve accessibility
  • Enhance documentation
  • Optimize performance

πŸ“§ Contact

Maintainers

Support Channels

  • GitHub Issues
  • Pull Request Discussions

πŸ“„ License

Licensed under the MIT License.


⭐ Support The Project

If you found this project useful:

  • ⭐ Star the repository
  • 🍴 Fork the project
  • πŸ§‘β€πŸ’» Contribute improvements
  • πŸ“’ Share with others

πŸ’™ SafeVoice Mission

β€œCreating a secure space where voices can be heard safely, anonymously, and without fear.”

About

SafeVoice, an AI-powered anonymous support platform, by enhancing multi-language translation (8+ Indian languages) and real-time grammar correction using Google Gemini AI via Firebase Cloud Functions, improving frontend UI/UX in React & Tailwind CSS, optimizing Firestore queries, implementing secure anonymous CRUD operations.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors