Skip to content

Elon7069/DatraAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DatraAI (SynthGen)

A SaaS platform for generating privacy-safe synthetic data using SDV (Synthetic Data Vault) with an AI-powered chat interface.

🚀 Features

  • AI-Powered Chat Interface - Conversational interface for generating synthetic data
  • SDV Integration - Uses CTGAN and GaussianCopula models for high-quality synthetic data
  • Privacy-Safe - Generate realistic data without exposing sensitive information
  • Multiple File Formats - Support for CSV and Excel uploads
  • Real-time Job Tracking - Monitor generation progress with live updates

🏗️ Architecture

├── backend/          # FastAPI server
│   ├── core/         # Core utilities (Supabase, Mistral AI)
│   ├── routes/       # API endpoints
│   └── services/     # Business logic (SDV, file handling)
│
├── frontend/         # Next.js 15 (App Router)
│   ├── app/          # Pages and API routes
│   ├── components/   # React components
│   ├── hooks/        # Custom React hooks
│   └── lib/          # Utilities and API client

🛠️ Tech Stack

Backend

  • FastAPI - Modern Python web framework
  • SDV - Synthetic Data Vault for data generation
  • Supabase - Authentication, database, and storage
  • Mistral AI - LLM for chat interface

Frontend

  • Next.js 15 - React framework with App Router
  • TypeScript - Type-safe JavaScript
  • TailwindCSS - Utility-first CSS
  • shadcn/ui - UI component library

📦 Installation

Prerequisites

  • Python 3.9+
  • Node.js 18+
  • Supabase account
  • Mistral AI API key

Backend Setup

cd backend

# Create virtual environment
python -m venv venv
.\venv\Scripts\activate  # Windows
# source venv/bin/activate  # macOS/Linux

# Install dependencies
pip install -r requirements.txt

# Configure environment
cp .env.example .env
# Edit .env with your credentials

# Run server
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Frontend Setup

cd frontend

# Install dependencies
npm install

# Configure environment
# Create .env.local with:
# NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
# NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
# NEXT_PUBLIC_API_URL=http://localhost:8000

# Run development server
npm run dev

🔧 Environment Variables

Backend (.env)

SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
MISTRAL_API_KEY=your_mistral_api_key

Frontend (.env.local)

NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
NEXT_PUBLIC_API_URL=http://localhost:8000

📖 API Documentation

Once the backend is running, visit:

🔐 Security

  • Backend uses SERVICE_ROLE_KEY (bypasses RLS) - server-side only
  • Frontend uses ANON_KEY - respects Row Level Security
  • Signed URLs expire after 1 hour
  • Maximum upload size: 50MB

📄 License

MIT License - see LICENSE for details.

🤝 Contributing

  1. Fork the repository
  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

About

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors