Ethora Community

Community › Developers (platform specific questions) › Backend, API, Admin Dashboard

An overview of Ethora Platform changes and improvements over 2025

Archived from the Ethora community forum. First posted on 11 December 2025; product details may have changed since. For current setup see Get Ethora and GitHub.

Ethora Backend - Significant Changes Summary

Total Commits: 900+
Latest Commit Date: December 4, 2025

🎯 Major New Features

1. AI Service - Complete New Microservice ⭐

A brand new AI service has been added as a separate microservice:

  • Location: /ai_service/

  • Technology Stack:

    • TypeScript + Express

    • OpenAI integration (LangChain)

    • PostgreSQL with Drizzle ORM

    • MongoDB for bot/conversation data

    • XMPP client integration

  • Key Features:

    • AI Bot Management: Create and update AI-powered chat bots

    • Document Embedding: Upload and index documents for RAG (Retrieval Augmented Generation)

    • Site Embedding: Crawl and index websites for knowledge base

    • XMPP Integration: Bots can interact via XMPP protocol

    • Vector Database: Uses embeddings for semantic search

  • Endpoints:

    • POST /bots - Create AI bot

    • POST /bots-update/:xmppUsername - Update bot

    • POST /site-embedding - Index website

    • POST /docs-embedding - Index documents

    • POST /delete-link - Remove indexed content

2. Document Indexing & RAG System 📚

Major enhancement to document handling:

  • New Controllers:

    • docs-upload.controller.js - Upload and parse documents

    • delete-doc-source.js - Delete document sources

    • site-source.controller.js - Website indexing

    • site-source-reindex.controller.js - Reindex websites

  • Features:

    • Document parsing service integration

    • Markdown conversion and storage

    • Vector embeddings for semantic search

    • Integration with AI service for RAG

  • New Models:

    • documentSource.js - Document metadata

    • siteSource.js - Website source data

    • dao/siteSource.js - Data access layer

3. Enhanced Statistics & Reporting System 📊

Comprehensive analytics and reporting features:

  • New Statistics Endpoints:

    • app.ctrl.getGraphStatistic.js - Graph-based statistics

    • app.stat.export.js - Export statistics

    • exportSessionsGeo.js - Geographic session data

  • Email Reports:

    • Daily and weekly automated email reports

    • CSV attachments with detailed data

    • Session statistics with geographic data

    • New app registrations tracking

    • Registration logs

  • New Models:

    • appStat.js - Application statistics

    • sessionsLog.js - User session tracking

    • registrationLog.js - Registration tracking

    • ipGeoCache.js - IP geolocation caching

  • Services:

    • appStat.service.js - Statistics calculation

    • appStatDaily.service.js - Daily stats aggregation

    • stats.service.js - General statistics service

    • ipGeo.js - IP geolocation utility

  • Cron Jobs:

    • appStat.cron.js - Automated statistics collection

    • emailReports.js - Automated email report generation

4. Enhanced Chat System 💬

Major improvements to chat functionality:

  • New Chat Controllers:

    • chat.me.js - User's chat information

    • chat.media.js - Media handling

    • chat.private.js - Private chat management

    • chat.public.js - Public chat management

    • chat.report.js - Chat reporting

    • chat.trackLastMessage.js - Message tracking

    • chat.trackMember.js - Member tracking

    • chat.trackWidgetStat.js - Widget statistics

  • New Models:

    • chat.js - Enhanced chat model

    • chatmedia.js - Media attachments

    • user2chats.js - User-chat relationships

  • New Routes:

    • routes/chat.js - Chat-specific routes

    • Enhanced chat tracking and analytics

5. Authentication & Security Enhancements 🔐

  • JWT Cookie Support:

    • JWT tokens now stored in HTTP-only cookies

    • Enhanced security for token management

    • user.ctrl.refreshToken.js - Token refresh endpoint

    • user.ctrl.logout.js - Proper logout handling

  • New Services:

    • jwt.service.js - JWT token management

    • xmpp.b2b.service.ts - XMPP business-to-business service

6. API Versioning 🚀

  • New V2 API Routes:

    • routes/v2/index.js - Version 2 API router

    • Backward compatibility maintained

    • New endpoints in V2 for enhanced functionality

7. Redis Integration ⚡

  • New Redis Connector:

    • connectors/redis.js - Redis connection management

    • Integrated into main app.ts

    • Caching layer for improved performance

8. App Management Enhancements 📱

  • New Controllers:

    • app.ctrl.get.js - Enhanced app retrieval (369 lines)

    • app.ctrl.getConfig.js - App configuration

    • app.ctrl.put.js - App updates (282 lines)

    • app.ctrl.users.js - User management per app

    • app.ctrl.getGraphStatistic.js - Graph statistics

  • Features:

    • AI bot field in app responses

    • Enhanced app sorting (including AI-based sorting)

    • Better app configuration management

9. User Management Updates 👥

  • New Controllers:

    • user.ctrl.signupWithEmail.v2.js - Enhanced signup

    • user.ctrl.signupResend.js - Resend verification

10. Infrastructure & DevOps 🛠️

  • Package Management:

    • Added pnpm-lock.yaml - PNPM support

    • Updated dependencies

  • Configuration:

    • Enhanced .env.example with new variables

    • AI service configuration

    • Redis configuration

    • Document parsing service URLs

  • Docker:

    • AI service docker-compose.yml

    • Database migrations (Drizzle)

📝 Code Quality Improvements

  • Middleware:

    • middlewares/log.mw.js - Enhanced logging

  • Utilities:

    • utils/countSessions.js - Session counting

    • utils/getBytesFromString.js - String utilities

    • utils/ipGeo.js - IP geolocation

    • utils/migrateAppStat_aitokens.js - Migration utilities

  • Services:

    • services/centrifugo.js - Real-time messaging

    • services/cloudflare.js - Cloudflare integration

🔄 Breaking Changes & Migration Notes

  1. New Dependencies:

    • Redis connection required

    • AI service integration (optional but recommended)

    • Document parsing service

  2. Environment Variables:

    • REDIS_HOST and REDIS_PORT required

    • AI_SERVICE_URL and AI_SERVICE_SECRET for AI features

    • DOCS_PARSE_URL and DOCS_PARSE_SECRET for document indexing

  3. API Changes:

    • New V2 API routes added

    • Some endpoints may have changed behavior

    • Enhanced authentication with cookies

📊 Statistics

  • Files Changed: 1,130 files

  • Additions: ~35,003 lines

  • Deletions: ~49,408 lines

  • Net Change: -14,405 lines (code cleanup and refactoring)

🎯 Key Pull Requests Merged

  1. PR #14: Sessions to email statistics

  2. PR #13: Enhanced statistics features

  3. PR #12: Statistics improvements

  4. PR #11: Statistics updates

  5. PR #10: Statistics endpoint creation

  6. PR #9: CSV statistics export

  7. PR #8: Login cookies implementation

  8. PR #7: Login cookies refactoring

  9. PR #6: Stats location updates (Country/City)

  10. PR #5: Document indexing

  11. PR #4: Document indexing updates

  12. PR #3: Document indexing fixes

  13. PR #2: Document indexing initial implementation

  14. PR #1: App sorting changes

Have a question about this? Ask the Ethora team.