Skip to content

AmadeusITGroup/SmartErrorHandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸš€ Smart Error Handler for User Interface Applications

License Release Status

A comprehensive error handling solution designed to streamline error management and user feedback in UI applications. This project combines a modern React frontend with a Python FastAPI backend for robust error handling and monitoring.

Quick Links

Maintainers

Contact

  • Maintainer contact: opensource@amadeus.com
  • For bug reports and feature requests, use GitHub issues (templates are preconfigured)

πŸ“‹ Table of Contents


Project Structure

The application is divided into two main components:

  • Frontend - React-based user interface
  • Backend - Python-based API server

Tech Stack

Frontend

  • Node.js v24.13.0
  • React v19.2.0
  • Vite - Fast build tool
  • TypeScript - Type safety
  • ESLint - Code linting

Backend

  • Python v3.9.6
  • FastAPI v0.128.0
  • Local installable pip package (smart-error-handler-backend)

Installation

Clone and Enter the Project

git clone https://github.com/AmadeusITGroup/SmartErrorHandler
cd SmartErrorHandler

Frontend Setup (Local npm Package)

  1. Navigate to the frontend workspace directory:

    cd src/frontend
  2. Install dependencies and local package links:

    npm install

    This installs the local UI package from src/frontend/error-ui.

Backend Setup (Local pip Package)

  1. From the repository root, create and activate virtual environment:

    python3 -m venv .venv
    source .venv/bin/activate  # On macOS/Linux
    # or
    .venv\Scripts\activate    # On Windows
  2. Install backend as a local package (dependencies included):

    pip install ./src/backend

Getting Started

Development must be done on the dev branch. The main branch is the release branch.

git checkout dev

Package Setup

Backend Package

The backend is configured as a local pip package:

  • Package name: smart-error-handler-backend
  • Local install command: pip install ./src/backend
  • Start command after install: smart-error-handler-api

Frontend Package

The frontend UI is configured as a local npm package:

  • Package name: smart-error-handler-ui
  • Installed locally through: src/frontend/package.json
  • Local install command: npm install from src/frontend

Running the Application

Prerequisites: Install frontend and backend dependencies as shown above.

Step-by-Step Guide

  1. Start Backend (Terminal 1):

    cd SmartErrorHandler
    source .venv/bin/activate
    smart-error-handler-api

    βœ… Wait for confirmation: server running at http://localhost:8000/ping

  2. Start Frontend (Terminal 2):

    cd SmartErrorHandler/src/frontend/error-ui
    npm run dev

    βœ… Frontend ready at http://localhost:5173

  3. Access the Application:

    Open your browser and navigate to the frontend URL.


Available Scripts

Frontend

  • npm install (from src/frontend) - Install local package and dependencies
  • npm run dev (from src/frontend/error-ui) - Start development server
  • npm run build (from src/frontend/error-ui) - Build frontend package/app

Backend

  • pip install ./src/backend - Install backend package with dependencies
  • smart-error-handler-api - Start backend API server

Running Backend Tests

  1. Activate your virtual environment:

    source .venv/bin/activate
  2. Install test dependencies:

    pip install pytest httpx
  3. Run backend tests from repository root:

    pytest -q src/backend/tests

    Or, if your current directory is src:

    pytest -q backend/tests

Verifying Test Output

Once you have tested the application from the UI, error snapshots are automatically captured and saved as HTML files.

Output Location:

SmartErrorHandler/src/backend/error_snapshots/

View Results:

  1. Navigate to the error_snapshots folder in your project directory
  2. Open any .html file in your web browser to view detailed error reports and diagnostics
  3. Each snapshot contains comprehensive error information useful for debugging and analysis

These HTML snapshots provide a complete record of errors encountered during testing for future reference and troubleshooting.


About

Comprehensive error handling and monitoring solution for UI applications with React frontend and FastAPI backend

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors