Add comprehensive database integration, authentication, and admin dashboard
This commit introduces major enhancements to Talk2Me: ## Database Integration - PostgreSQL support with SQLAlchemy ORM - Redis integration for caching and real-time analytics - Automated database initialization scripts - Migration support infrastructure ## User Authentication System - JWT-based API authentication - Session-based web authentication - API key authentication for programmatic access - User roles and permissions (admin/user) - Login history and session tracking - Rate limiting per user with customizable limits ## Admin Dashboard - Real-time analytics and monitoring - User management interface (create, edit, delete users) - System health monitoring - Request/error tracking - Language pair usage statistics - Performance metrics visualization ## Key Features - Dual authentication support (token + user accounts) - Graceful fallback for missing services - Non-blocking analytics middleware - Comprehensive error handling - Session management with security features ## Bug Fixes - Fixed rate limiting bypass for admin routes - Added missing email validation method - Improved error handling for missing database tables - Fixed session-based authentication for API endpoints 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
32
run_dev_server.sh
Executable file
32
run_dev_server.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# Run Talk2Me development server locally
|
||||
|
||||
echo "Starting Talk2Me development server..."
|
||||
echo "=================================="
|
||||
echo "Admin Dashboard: http://localhost:5005/admin"
|
||||
echo " Token: 4CFvwzmeDWhecfuOHYz7Hyb8nQQ="
|
||||
echo ""
|
||||
echo "User Login: http://localhost:5005/login"
|
||||
echo " Username: admin"
|
||||
echo " Password: talk2me123"
|
||||
echo ""
|
||||
echo "API Authentication:"
|
||||
echo " API Key: 6sy2_m8e89FeC2RmUo0CcgufM9b_0OoIwIa8LSEbNhI"
|
||||
echo "=================================="
|
||||
echo ""
|
||||
|
||||
# Kill any existing process on port 5005
|
||||
lsof -ti:5005 | xargs kill -9 2>/dev/null
|
||||
|
||||
# Set environment variables
|
||||
export FLASK_ENV=development
|
||||
export FLASK_DEBUG=1
|
||||
|
||||
# Run with gunicorn for a more production-like environment
|
||||
gunicorn --bind 0.0.0.0:5005 \
|
||||
--workers 1 \
|
||||
--threads 2 \
|
||||
--timeout 120 \
|
||||
--reload \
|
||||
--log-level debug \
|
||||
wsgi:application
|
||||
Reference in New Issue
Block a user