What is TNSR.AI and why did I build it?
TNSR.AI is a web-based platform that leverages deep learning models to enhance videos, audio, and images. I built it to make AI-powered media restoration accessible and scalable, combining real-time interactivity with production-grade cloud architecture.
Key Features & Architecture
Frontend
- Built with Next.js (TypeScript) + TailwindCSS, designed for responsive performance.
- Real-time job status updates using WebSockets/Socket.io for live processing feedback.
Backend
- Powered by FastAPI with modular, clean architecture.
- Celery + Redis for distributed job processing (long-running ML tasks, notifications, billing).
- RESTful APIs with Pydantic validation, async I/O, and custom error handling.
Data & Storage
- PostgreSQL + SQLAlchemy with indexed relational models for jobs, users, and billing.
- Media files stored on Cloudflare R2 with signed URL uploads/downloads.
Authentication & Payments
- JWT with Google SSO for authentication and secure sessions.
- Stripe integration for subscriptions, invoices, and multi-currency billing.
Monitoring & Observability
- OpenTelemetry for distributed tracing.
- Prometheus + Grafana + Loki for metrics, dashboards, and log aggregation.
- Sentry for error tracking and alerting.
DevOps & CI/CD
- Fully containerized with Docker.
- Automated pipelines with GitHub Actions for tests (Jest, Pytest, Cypress), builds, and deployments to Ubuntu servers.
Scaling & Future Plans
The system is designed for horizontal scalability with independently deployable components. Planned enhancements include:
- Expanding support for additional AI/ML models.
- Moving toward a microservices-based architecture.
- Adding real-time collaboration features.
- Providing an extended API for third-party integrations.