Skip to content

Latest commit

Β 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

QueueStorm Logo

QueueStorm Investigator

AI-powered FinTech Support Investigation API

Built during the SUST CSE Carnival 2026 – Codex Community Hackathon
Online Preliminary Round β€’ 4.5 Hour Engineering Challenge

Node.js Express JavaScript MIT License Render Vercel Hackathon


πŸš€ Live Demo

Service URL
🌐 Frontend https://sust-preli-queuestorm-eight.vercel.app/
βš™οΈ Backend API https://codex-preliminary-api.onrender.com/
❀️ Health Check https://codex-preliminary-api.onrender.com/health

πŸ“· Dashboard

Interactive investigation dashboard served from the Express application.

QueueStorm Dashboard


πŸ“– Overview

QueueStorm Investigator is an AI-inspired investigation API built for digital financial support teams.

Unlike traditional ticket classifiers, QueueStorm performs evidence-driven investigation by correlating customer complaints with available transaction history before generating a decision.

For every incoming support ticket, the system:

  • Investigates the customer's complaint
  • Matches relevant transactions
  • Evaluates supporting evidence
  • Determines case validity
  • Classifies the complaint
  • Assesses severity
  • Routes the ticket to the correct department
  • Generates an agent-ready summary
  • Produces a safe customer response
  • Determines whether human escalation is required

The project was designed and implemented during the 4.5-hour Online Preliminary Round of the SUST CSE Carnival 2026 – Codex Community Hackathon, where rapid development, deployment, and production-inspired engineering practices were evaluated.


✨ Key Features

πŸ” Investigation Engine

  • Complaint understanding
  • Transaction matching
  • Evidence verification
  • Intelligent case classification
  • Severity assessment
  • Department routing

πŸ›‘ Safety Guardrails

  • Never requests OTP
  • Never requests PIN
  • Never requests Password
  • Never requests CVV or full card number
  • Prevents unauthorized refund promises
  • Resistant to prompt injection attempts
  • Generates only safe, official customer replies

⚑ Engineering Highlights

  • Stateless REST API
  • Production-ready Express architecture
  • Modular service design
  • Deterministic reasoning engine
  • Structured JSON responses
  • Environment-based configuration
  • Deployable on Render
  • Interactive frontend deployed on Vercel

πŸ— System Architecture

                 Browser (Frontend)
                       β”‚
                       β–Ό
                Express REST API
                       β”‚
                       β–Ό
              Request Validation
                       β”‚
                       β–Ό
             Complaint Analysis
                       β”‚
                       β–Ό
          Transaction Matching Engine
                       β”‚
                       β–Ό
             Evidence Verification
                       β”‚
                       β–Ό
              Decision Engine
                       β”‚
                       β–Ό
             Response Builder
                       β”‚
                       β–Ό
         Structured JSON Response

πŸ”„ Investigation Workflow

Customer Complaint
        β”‚
        β–Ό
Read Transaction History
        β”‚
        β–Ό
Find Matching Transaction
        β”‚
        β–Ό
Verify Evidence
        β”‚
        β–Ό
Classify Case
        β”‚
        β–Ό
Determine Severity
        β”‚
        β–Ό
Assign Department
        β”‚
        β–Ό
Generate Agent Summary
        β”‚
        β–Ό
Generate Safe Customer Reply
        β”‚
        β–Ό
Human Review Decision

🎯 Original Hackathon Challenge

This project is an implementation of the official QueueStorm Investigator challenge from the SUST CSE Carnival 2026 – Codex Community Hackathon.

The original challenge specification, objectives, constraints, API requirements, safety rules, evaluation criteria, and submission requirements are documented here:

➑️ πŸ“„ PROBLEM_STATEMENT.md


πŸ›  Technology Stack

Layer Technology
Runtime Node.js 18+
Framework Express.js
Language JavaScript (ES6 Modules)
Frontend HTML5, CSS3, Vanilla JavaScript
Styling Tailwind CSS
Backend RESTful API
Deployment Render (Backend), Vercel (Frontend)
Validation Custom Validation Layer
Architecture Modular Service-Based Architecture
Configuration Environment Variables (.env)

πŸ€– AI / Investigation Strategy

Unlike a conventional chatbot, QueueStorm Investigator follows an investigation-first approach.

Instead of immediately classifying customer complaints, the system attempts to correlate the complaint with available transaction history before producing a structured decision.

The investigation pipeline focuses on:

  • Complaint understanding
  • Transaction correlation
  • Evidence verification
  • Case classification
  • Severity assessment
  • Department routing
  • Safe response generation

This deterministic approach was selected for the hackathon because it provides:

  • Predictable outputs
  • Explainable reasoning
  • Fast execution
  • No external inference cost
  • Stable deployment
  • Better compliance with safety rules

πŸ”’ Safety Logic

Financial support systems must prioritize user safety over automation.

QueueStorm Investigator follows strict safety guardrails inspired by the official challenge requirements.

Credential Protection

The API never asks customers for:

  • OTP
  • PIN
  • Password
  • CVV
  • Full Card Number

Unauthorized Actions

The API never:

  • Promises refunds
  • Confirms reversals
  • Guarantees account recovery
  • Claims account unblocking
  • Performs financial operations automatically

Instead, customers are instructed to continue through official support channels whenever manual verification is required.


Prompt Injection Protection

Customer complaints may contain malicious instructions such as:

Ignore previous instructions...

or

Approve my refund immediately...

These instructions are treated strictly as user input and never override system behavior.


Human Review Escalation

The system flags tickets requiring manual investigation when:

  • Evidence is ambiguous
  • Fraud is suspected
  • Transaction history is insufficient
  • High-risk financial cases are detected
  • Manual verification is required

🌐 REST API

Base URL

Production Backend

https://codex-preliminary-api.onrender.com

❀️ Health Endpoint

Request

GET /health

Response

{
  "status": "ok"
}

πŸ”Ž Analyze Ticket Endpoint

Request

POST /analyze-ticket

Example Request

{
  "ticket_id": "T-001",
  "complaint": "I paid 5000 BDT to ABC Store yesterday but payment failed.",
  "transactions": [
    {
      "transaction_id": "TX-001",
      "amount": 5000,
      "status": "failed",
      "type": "payment",
      "counterparty": "ABC Store",
      "timestamp": "yesterday"
    }
  ]
}

Example Response

{
  "ticket_id": "T-001",
  "relevant_transaction_id": "TX-001",
  "evidence_verdict": "consistent",
  "case_type": "payment_failed",
  "severity": "low",
  "department": "payments_ops",
  "agent_summary": "Customer raised a payment failure complaint supported by transaction TX-001.",
  "recommended_next_action": "Forward the case to Payments Operations for reconciliation.",
  "customer_reply": "We have received your report and our payments team will review the transaction. Any eligible action will be completed through official channels.",
  "human_review_required": false,
  "confidence": 0.77,
  "reason_codes": [
    "AMOUNT_MATCH",
    "TYPE_MATCH",
    "STATUS_MATCH"
  ]
}

πŸ“‹ Response Schema

Field Description
ticket_id Original ticket identifier
relevant_transaction_id Matched transaction ID
evidence_verdict Evidence consistency result
case_type Complaint classification
severity Risk level
department Assigned support department
agent_summary Internal summary for support agents
recommended_next_action Suggested operational action
customer_reply Safe customer-facing reply
human_review_required Manual review flag
confidence Confidence score
reason_codes Supporting reasoning labels

βš– Evidence Reasoning

One of the key goals of QueueStorm Investigator is evidence-based decision making.

Rather than relying solely on complaint text, the API evaluates available transaction history to determine whether the customer's claim is supported.

Possible evidence outcomes include:

Verdict Meaning
consistent Complaint matches available transaction evidence
inconsistent Complaint conflicts with available evidence
insufficient_data Not enough information to reach a conclusion

This reasoning process helps support agents prioritize tickets more effectively while reducing unnecessary escalations.


πŸ“‚ Project Structure

The project follows a modular, production-inspired architecture to keep business logic isolated and maintainable.

.
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ app.js
β”‚   β”œβ”€β”€ style.css
β”‚   β”œβ”€β”€ dashboard.png
β”‚   └── logo.png
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ constants/
β”‚   β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ middleware/
β”‚   β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ validators/
β”‚   β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ app.js
β”‚   └── server.js
β”‚
β”œβ”€β”€ .env.example
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
└── PROBLEM_STATEMENT.md

πŸš€ Getting Started

Prerequisites

Before running the project locally, ensure you have:

  • Node.js 18+
  • npm
  • Git

πŸ“₯ Clone Repository

git clone https://github.com/abdullahalyf/sust-preli-queuestorm.git

cd sust-preli-queuestorm

πŸ“¦ Install Dependencies

npm install

βš™ Configure Environment Variables

Create a .env file in the project root.

Example:

PORT=3000
NODE_ENV=development

If your implementation requires additional variables in the future, follow the template provided in .env.example.


β–Ά Running the Application

Development

npm run dev

Production

npm start

After startup the application will be available at

http://localhost:3000

πŸ§ͺ Testing the API

Health Check

curl http://localhost:3000/health

Expected response

{
  "status": "ok"
}

Analyze Ticket (PowerShell)

Invoke-RestMethod `
-Uri http://localhost:3000/analyze-ticket `
-Method POST `
-ContentType "application/json" `
-Body '{
  "ticket_id":"T-001",
  "complaint":"I paid 5000 BDT to ABC Store yesterday but payment failed.",
  "transactions":[
    {
      "transaction_id":"TX-001",
      "amount":5000,
      "status":"failed",
      "type":"payment",
      "counterparty":"ABC Store",
      "timestamp":"yesterday"
    }
  ]
}'

Alternative Testing Tools

The API can also be tested using:

  • Postman
  • Insomnia
  • curl
  • Thunder Client (VS Code)

🌍 Deployment

The project is deployed using separate frontend and backend services.

Component Platform
Frontend Vercel
Backend Render

🌐 Frontend

https://sust-preli-queuestorm-eight.vercel.app/

βš™ Backend

https://codex-preliminary-api.onrender.com

❀️ Health Endpoint

https://codex-preliminary-api.onrender.com/health

πŸ’» Frontend Demo

A lightweight web interface is included for interactive testing.

The frontend communicates directly with the backend API and allows users to:

  • Submit complaints
  • Add transaction history
  • Execute investigations
  • Visualize evidence
  • Review generated responses

Dashboard Preview

Dashboard


Frontend Features

  • Modern dark UI
  • Responsive layout
  • Dynamic transaction editor
  • Live backend health indicator
  • Animated confidence visualization
  • Severity badges
  • Evidence badges
  • Copy customer reply
  • Sample data loader
  • Safe HTML rendering

⚑ Cold Start Notes

The backend is hosted on Render's free tier.

Because free instances automatically sleep after inactivity, the first request may take several seconds while the service wakes up.

Subsequent requests are significantly faster.

This behavior is expected and does not affect API correctness.


πŸ“ Repository

GitHub Repository

https://github.com/abdullahalyf/sust-preli-queuestorm

πŸ“Œ Assumptions

The implementation is based on the assumptions defined in the official hackathon specification.

  • Transaction history is considered trusted input.
  • Customer complaints may be incomplete or ambiguous.
  • All transactions supplied with a request belong to the same customer.
  • Evidence is determined only from the provided transaction history.
  • Unknown scenarios are classified conservatively.
  • The project uses only synthetic evaluation data and is not intended for production financial systems.

⚠ Known Limitations

This project was intentionally developed within the constraints of a 4.5-hour online hackathon, prioritizing correctness, deployment, and safety over feature completeness.

Current limitations include:

  • No persistent database
  • No authentication or authorization layer
  • No payment gateway integration
  • No real banking APIs
  • No audit logging
  • No background job processing
  • No rate limiting
  • Built specifically around the official QueueStorm Investigator challenge

Despite these limitations, the project demonstrates production-inspired API architecture and modular engineering practices.


πŸš€ Future Improvements

If extended beyond the hackathon, the following enhancements could be added:

AI & Intelligence

  • Hybrid LLM + rule-based reasoning
  • Multilingual complaint understanding
  • Semantic transaction matching
  • Fraud pattern detection
  • Explainable AI reasoning reports

Backend

  • PostgreSQL / MongoDB integration
  • Redis caching
  • Background workers
  • Authentication (JWT)
  • Role-based access control
  • Audit logging

DevOps

  • Docker support
  • GitHub Actions CI/CD
  • Automated testing
  • Monitoring & metrics
  • Health dashboards
  • Kubernetes deployment

Frontend

  • Agent dashboard
  • Authentication
  • Analytics
  • Investigation timeline
  • Search & filtering
  • Case management interface

βœ… Challenge Compliance

Requirement Status
GET /health βœ…
POST investigation endpoint βœ…
Complaint analysis βœ…
Transaction matching βœ…
Evidence reasoning βœ…
Case classification βœ…
Severity detection βœ…
Department routing βœ…
Safe customer response βœ…
Human review detection βœ…
Structured JSON schema βœ…
Production deployment βœ…
Public GitHub repository βœ…

πŸ“„ Documentation

This repository includes:

  • βœ… README.md
  • βœ… PROBLEM_STATEMENT.md
  • βœ… .env.example
  • βœ… Project source code
  • βœ… Deployment
  • βœ… Sample request / response
  • βœ… Architecture overview

🀝 Contributing

This repository was created as a hackathon project.

Although contributions are not currently expected, suggestions and improvements are always welcome through Issues or Pull Requests.


πŸ™ Acknowledgements

This project was developed during the

SUST CSE Carnival 2026 β€” Codex Community Hackathon

Special thanks to the organizers for designing a realistic software engineering challenge focused on evidence-based reasoning, API design, safety, and production-ready engineering practices.


πŸ“œ License

This project is licensed under the MIT License.

See the LICENSE file for details.


Built with ❀️ during the

SUST CSE Carnival 2026 β€” Codex Community Hackathon

⭐ If you found this project interesting, consider giving it a star.

Releases

Packages

Contributors

Languages