Skip to content
Mohamed TRIKI
Back to internships & projects

Intelligent Multi-Tenant ERP/CRM SaaS Platform with AI

  • Date : 2026
  • ERP
  • Completed

Multi-tenant ERP/CRM SaaS in Spring Boot microservices with an AI service for forecasting, risk scoring, anomaly detection and a local RAG assistant. Team of 4.

Overview

Annual engineering project at IIT Sfax (2026), built by a team of 4: a microservices SaaS ERP/CRM for aluminium joinery companies. It covers CRM, the full sales cycle (quote → order → delivery → invoice → payment), purchasing and inventory.

Each company is a tenant whose data stays strictly isolated, with single sign-on, role-based access control and a tamper-evident audit log. A dedicated AI microservice adds sales forecasting, risk classification, stock anomaly detection and a local RAG assistant.

The platform was delivered in 4 incremental XP releases (120 story points), with CI/CD on GitHub Actions and monitoring via Prometheus and Grafana.

Key figures

layers of multi-tenant data isolation
5
layers of multi-tenant data isolation
incremental XP releases
4
incremental XP releases
story points delivered
120
story points delivered
team members
4
team members

Technologies

Problem

Aluminium joinery companies often manage customers, quotes, orders, stock and purchasing with scattered tools, without a shared view of their activity or help in anticipating sales, payment risks and stock needs.

Solution

Java 21 / Spring Boot 3 microservices behind a gateway, secured by Keycloak (OIDC/PKCE), with an Angular 17 web app; PostgreSQL with Row-Level Security and pgvector; RabbitMQ for event-driven stock synchronization; a FastAPI AI microservice (Prophet, XGBoost, Isolation Forest, Ollama with Mistral 7B); Docker, GitHub Actions CI/CD, Prometheus and Grafana monitoring.

My contribution

Team project (4 people) run with XP: requirements and user stories, microservices architecture, multi-tenant security, business modules, AI microservice, integration tests and CI/CD.

Results

Delivered in 4 incremental XP releases (120 story points). Tenant isolation, SSO and the audit log are validated by Testcontainers integration tests.

Features

  • CRM, full sales cycle (quote → order → delivery → invoice → payment), purchasing and inventory
  • Multi-tenant data isolation across 5 layers, including a gateway JWT filter, Hibernate filters and PostgreSQL Row-Level Security
  • Keycloak SSO (OIDC/PKCE), role-based access control and a SHA-256 hash-chained audit log
  • Event-driven stock synchronization via RabbitMQ, business state machines and design patterns (Command, Memento, Strategy, Observer)
  • AI microservice: Prophet sales forecasting, XGBoost quote-acceptance and payment-risk classification, Isolation Forest stock anomaly detection
  • Local RAG assistant (Mistral 7B via Ollama + pgvector)
  • CI/CD on GitHub Actions, monitoring with Prometheus and Grafana, integration tests with Testcontainers