FateMatch AI - Servant Compatibility Analyzer

Application that analyze servant compatibility using AI

pythonflaskreactai

Share this project:

Project Overview

๐Ÿ”ฎ FateMatch AI โ€” Servant Compatibility Analyzer

WhatsApp Image 2025-11-02 at 9 55 58 PM

An AI-powered personality matching application that determines which Fate/Grand Order Servant best fits the user's personality.
Built using React (Frontend) and Flask (Backend) โ€” with a bit of extra AI roasting spice ๐Ÿ˜Ž


๐Ÿ‘จโ€๐Ÿ’ป Creator Identity

Master Username
Fanthom

๐Ÿง  Overview

FateMatch AI is a simple expert system that analyzes a userโ€™s personality and matches it with the most compatible Servant from the Fate/Grand Order universe.
In addition to compatibility analysis, the system also generates logical explanations and funny roast lines from the AI to make the user experience more engaging.

Users only need to provide:

  1. Master name / nickname
  2. A short personality description
  3. (Optional) Feedback on whether the result is accurate

โš™๏ธ Technologies Used

Backend

  • Python 3.x
  • Flask
  • Flask-CORS
  • OpenAI API (for reasoning + roasting)

Frontend

  • React + Vite
  • Tailwind CSS
  • Axios
  • Framer Motion (UI animations)

๐Ÿš€ How to Run the Project

1๏ธโƒฃ Run the Backend (Flask)

cd backend
pip install flask flask-cors openai
python app.py

Backend will run at:

http://localhost:5000

2๏ธโƒฃ Run the Frontend (React)

cd frontend
npm install
npm run dev

Frontend will run at:

http://localhost:5173

๐Ÿงฉ Project Structure

FateMatch-AI/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ app.py
โ”‚   โ””โ”€โ”€ requirements.txt
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ResultCard.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ LoadingScreen.jsx
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ””โ”€โ”€ README.md

๐Ÿง  System Workflow

  1. The user provides their Master name and personality description.
  2. The system uses AI reasoning to determine the most compatible Servant.
  3. AI generates a compatibility explanation + a humorous roast.
  4. The result is displayed in a Result Card with options:
  • ๐Ÿ‘ Match
  • ๐Ÿ‘Ž Not a match

๐Ÿงพ API Endpoints

1๏ธโƒฃ POST /analyze_match

Analyze the userโ€™s personality and determine the matching Servant.

Request Body

{
  "master_name": "Fanthom",
  "personality": "Kesel dan marah, tapi tetap berjuang walau sendirian."
}

Response

{
  "servant": {
    "name": "Nezha",
    "className": "Lancer",
    "image": "https://fategrandorder.fandom.com/nezha.png"
  },
  "compatibility": {
    "reason": "Nezha cocok dengan Master karena keduanya sama-sama pantang menyerah.",
    "roast": "Nezha sering dianggap 'Lancer yang bunuh diri', kayaknya kalian dua sekawan."
  }
}

2๏ธโƒฃ POST /feedback_match

Save user feedback about whether the match result is accurate.

Request Body

{
  "master_name": "Fanthom",
  "servant_name": "Jeanne d'Arc",
  "match": true
}

Response

{
  "status": "success",
  "message": "Feedback diterima dan disimpan ke feedback_data.json"
}

๐Ÿงฉ Additional Features

๐Ÿ’ฌ Feedback System

  • Users can vote whether the match result is accurate or not.
  • Feedback is stored for future iteration improvements.

๐Ÿ”— Share Button

  • Results can be shared directly to social media (Twitter, WhatsApp, etc.)
  • Implemented using Web Share API for convenience.

โณ Loading Animation

  • While AI processes the analysis, a full-screen loading animation is shown.

๐ŸŽด Centered Result Display

  • Final results appear in a centered card for a clean and aesthetic presentation.

๐Ÿงฌ AI Matching Logic

  1. User personality text is processed with an AI model to detect key personality traits.
  2. These traits are mapped against the FGO Servant personality database.
  3. The closest compatibility match is selected, along with reasoning and a roast.
  4. User feedback helps refine future matching accuracy.

๐Ÿ“ Example Feedback File (feedback_data.json)

[
  {
    "master_name": "Fanthom",
    "servant_name": "Jeanne d'Arc",
    "match": true
  },
  {
    "master_name": "Rin",
    "servant_name": "Gilgamesh",
    "match": false
  }
]
FateMatch AI - Servant Compatibility Analyzer | Daffathan Labs | Daffathan Labs