DataTruth now features a beautiful web-based setup wizard that eliminates manual configuration. Just deploy with Docker and configure everything through your browser!
# Clone repository
git clone <your-repo-url>
cd datatruth
# Start with Docker Compose
docker-compose -f docker-compose.saas.yml up -dThat's it! No .env file editing, no manual configuration needed.
Visit http://localhost:3000 in your browser. You'll see the setup wizard automatically.
The wizard will guide you through:
- ✅ Database Configuration - PostgreSQL connection details
- ✅ OpenAI Integration - Your API key and model selection
- ✅ Admin Account - Create your administrator login
- ✅ Review & Deploy - Verify and complete setup
Done! Your application will restart and you'll be redirected to the login page.
- Overview of setup process
- What you'll need (Database, OpenAI key, Admin credentials)
- Beautiful, intuitive interface
- Host:
postgres(for Docker) or your PostgreSQL server - Port:
5432(default) - Database Name:
datatruth_internal - User Credentials: App user and admin passwords
- Test Connection: Verify database connectivity before proceeding
- Auto-Detection: Shows PostgreSQL version and database status
- API Key: Your OpenAI API key (starts with
sk-) - Model Selection:
gpt-4o-mini(Recommended - cost-effective)gpt-4o(Most capable)gpt-4-turbo(Fast and powerful)gpt-3.5-turbo(Budget option)
- Temperature: Adjust creativity (0.0 = precise, 2.0 = creative)
- Test Connection: Validates API key and model access
- Username: Your admin username (default:
admin) - Password: Strong password (min 8 chars, uppercase, lowercase, numbers)
- Email: Optional admin email
- Full Name: Optional display name
- Password Validation: Real-time validation of password strength
- Review Configuration: See all your settings before submitting
- One-Click Deploy: Initialize database, create admin, save config
- Auto-Restart: Application restarts with new configuration
- Redirect: Automatically redirects to login page
# Simple deployment with setup wizard
docker-compose -f docker-compose.saas.yml up -d
# Access setup wizard
open http://localhost:3000Includes:
- PostgreSQL 16
- Redis 7
- FastAPI Backend (4 workers)
- React Frontend
- Setup wizard enabled
- Auto-configuration
# Traditional deployment with .env file
cp .env.production .env
vi .env # Edit configuration
# Deploy
docker-compose -f docker-compose.prod.yml up -dIncludes:
- All services from SaaS mode
- Nginx reverse proxy
- SSL/TLS support
- Production optimizations
- Manual configuration required
The setup wizard creates:
.envfile - All environment variablesdata/setup.json- Setup configuration backupdata/.setup_complete- Setup completion marker- Database schema - All tables, indexes, triggers
- Admin user - Your administrator account
- Security keys - Auto-generated SECRET_KEY and JWT_SECRET_KEY
# Application
ENVIRONMENT=production
DEBUG=false
LOG_LEVEL=INFO
APP_NAME=DataTruth
# Database (from wizard)
INTERNAL_DB_HOST=postgres
INTERNAL_DB_PORT=5432
INTERNAL_DB_NAME=datatruth_internal
INTERNAL_DB_USER=datatruth_app
INTERNAL_DB_PASSWORD=<your-password>
INTERNAL_DB_ADMIN_USER=datatruth_admin
INTERNAL_DB_ADMIN_PASSWORD=<your-admin-password>
# Security (auto-generated)
SECRET_KEY=<auto-generated-32-chars>
JWT_SECRET_KEY=<auto-generated-32-chars>
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=60
# OpenAI (from wizard)
OPENAI_API_KEY=sk-<your-key>
OPENAI_MODEL=gpt-4o-mini
OPENAI_TEMPERATURE=0.7
# Features (enabled by default)
ENABLE_USER_ACTIVITY_TRACKING=true
ENABLE_PERSONALIZED_SUGGESTIONS=true
ENABLE_CALCULATED_METRICS=true
ENABLE_INSIGHTS=true- Docker: 20.10+
- Docker Compose: 2.0+
- RAM: 4GB
- CPU: 2 cores
- Disk: 10GB
- OpenAI API Key: Required
- RAM: 8GB+
- CPU: 4+ cores
- Disk: 50GB SSD
- Network: Stable internet connection
- Frontend (Setup Wizard): http://localhost:3000
- API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
- Setup Status: http://localhost:8000/api/setup/status
# Configure your domain
# Update CORS_ORIGINS and ALLOWED_HOSTS in .env
# Access via domain
https://yourdomain.com-
Strong Passwords
- Use 12+ characters
- Mix uppercase, lowercase, numbers, symbols
- Don't reuse passwords
-
OpenAI API Key
- Keep it secret
- Use environment variables
- Rotate regularly
-
Database Credentials
- Different passwords for app user and admin
- Store securely
- Limit network access
-
Change Default Settings
- Review generated configuration
- Update CORS origins for your domain
- Configure SSL/TLS for production
-
Backup Configuration
# Backup setup configuration cp data/setup.json backups/setup-$(date +%Y%m%d).json cp .env backups/env-$(date +%Y%m%d)
-
Enable HTTPS
- Obtain SSL certificate
- Configure Nginx
- Redirect HTTP to HTTPS
If you need to change configuration:
# Stop services
docker-compose -f docker-compose.saas.yml down
# Remove setup markers
rm data/.setup_complete
rm data/setup.json
rm .env
# Restart
docker-compose -f docker-compose.saas.yml up -d
# Visit http://localhost:3000 again# Edit .env file directly
vi .env
# Restart services
docker-compose -f docker-compose.saas.yml restart api# View all containers
docker-compose -f docker-compose.saas.yml ps
# View logs
docker-compose -f docker-compose.saas.yml logs -f api
# Check health
curl http://localhost:8000/health# Connect to PostgreSQL
docker-compose -f docker-compose.saas.yml exec postgres \
psql -U datatruth_app -d datatruth_internal
# View users
SELECT username, role, email FROM users;# Create backup
docker-compose -f docker-compose.saas.yml exec postgres \
pg_dump -U datatruth_admin datatruth_internal | gzip > backup.sql.gz# Check frontend logs
docker-compose -f docker-compose.saas.yml logs frontend
# Check API logs
docker-compose -f docker-compose.saas.yml logs api
# Ensure services are running
docker-compose -f docker-compose.saas.yml psError: "Database connection failed"
Solutions:
- Ensure PostgreSQL container is running
- Check database credentials
- Verify network connectivity
- Use
postgresas host in Docker - Check PostgreSQL logs:
docker-compose -f docker-compose.saas.yml logs postgres
Error: "Invalid API key"
Solutions:
- Verify key starts with
sk- - Check key hasn't expired
- Ensure you have API credits
- Test key at https://platform.openai.com
- Try a different model
# Check setup status
curl http://localhost:8000/api/setup/status
# View API logs for errors
docker-compose -f docker-compose.saas.yml logs api | grep ERROR
# Restart and retry
docker-compose -f docker-compose.saas.yml restart apiError: "Port 3000 (or 8000) is already allocated"
Solutions:
# Find process using port
lsof -i :3000
lsof -i :8000
# Kill process
kill -9 <PID>
# Or change port in docker-compose.saas.yml
# Change "3000:3000" to "3001:3000"# Using EC2
1. Launch EC2 instance (Ubuntu 22.04, t3.medium)
2. Install Docker and Docker Compose
3. Clone repository
4. Run: docker-compose -f docker-compose.saas.yml up -d
5. Configure security group (ports 80, 443, 3000, 8000)
6. Access via public IP or domain# Using Compute Engine
1. Create VM instance (Ubuntu, e2-standard-2)
2. Install Docker and Docker Compose
3. Clone repository
4. Run: docker-compose -f docker-compose.saas.yml up -d
5. Configure firewall rules
6. Access via external IP or domain# Using Azure Container Instances
1. Create Container Instance
2. Deploy with docker-compose.saas.yml
3. Configure DNS label
4. Access via FQDN# 1. Point domain to your server
# 2. Install Certbot
sudo apt-get install certbot
# 3. Obtain SSL certificate
sudo certbot certonly --standalone -d yourdomain.com
# 4. Update docker-compose.saas.yml
# Enable nginx with production profile:
docker-compose -f docker-compose.saas.yml --profile production up -d
# 5. Configure nginx with SSL
# Edit nginx/nginx.conf with certificate paths- ✅ Natural language query processing
- ✅ Semantic layer with metrics and dimensions
- ✅ Database connection management
- ✅ AI-powered field mapping
- ✅ User activity tracking
- ✅ Personalized suggestions
- ✅ Health monitoring
- ✅ API documentation (Swagger/ReDoc)
- ✅ Beautiful setup wizard
- ✅ Modern UI with Tailwind CSS
- ✅ Real-time connection testing
- ✅ Password validation
- ✅ Progress tracking
- ✅ Responsive design
- ✅ Error handling
- ✅ PostgreSQL 16 (database)
- ✅ Redis 7 (cache)
- ✅ Nginx (reverse proxy, optional)
- ✅ Docker Compose orchestration
- ✅ Health checks
- ✅ Auto-restart policies
- Login with your admin credentials
- Add Database Connections to your data sources
- Create Calculated Metrics for your business KPIs
- Start Querying with natural language
- Invite Team Members to collaborate
- Explore Insights for automated analytics
- Customize semantic layer for your domain
- Check logs:
docker-compose logs -f api - Verify setup:
curl http://localhost:8000/api/setup/status - Test health:
curl http://localhost:8000/health - Reset setup: Remove
data/.setup_completeand restart
- GitHub Issues: Report bugs and feature requests
- Email: support@datatruth.com (configure for your org)
- Documentation: See docs/ directory
You now have a fully functional DataTruth instance running with:
- ✅ Web-based configuration (no manual editing!)
- ✅ Secure authentication
- ✅ AI-powered analytics
- ✅ Beautiful interface
- ✅ Production-ready infrastructure
Start querying your data with natural language! 🚀
DataTruth - Shipped as a complete SaaS product. Deploy once, configure via web, and start analyzing!