React client
Captures customer text and displays the category with a visual confidence score.
AI engineering case study
A full-stack classification service that turns unstructured customer text into a reliable category and confidence score through a clean REST API.

01 / The challenge
Support teams receive complaints, questions, feedback and unrelated messages in the same stream. Manual triage slows response time and creates inconsistent routing. This project provides a small, integration-ready service that applies one shared classification policy to every message.
02 / Architecture
Captures customer text and displays the category with a visual confidence score.
Validates requests and exposes a focused POST /api/classify endpoint.
Uses llama3.2:3b with a deterministic prompt and strict JSON output.
Optionally stores successful classifications through Mongoose.
{
"text": "My order arrived damaged."
}
{
"category": "Complaint",
"confidence": 0.96
}03 / API design
The API accepts a text string, validates it, invokes the model service and normalizes the response. Consumers always receive an allowed category and a confidence value between zero and one.
Check API health04 / Engineering decisions
Model output is matched case-insensitively against Complaint, Query, Feedback and Other.
Numeric confidence is clamped to the valid 0-1 range, with a documented fallback.
Empty text and payloads over 5,000 characters return clear HTTP 400 responses.
The classifier remains available when MongoDB is not configured or connected.
05 / Technology
The architecture for AI Text Classifier was shaped around the product workflow, integration boundaries and long-term maintainability. Technologies are used for specific responsibilities rather than added only to make the stack appear larger.
Builds reusable, state-driven interfaces and keeps complex user journeys organized into maintainable components.
Provides a fast development server and optimized production bundling for the client application.
Runs the server-side JavaScript services, integration logic and non-blocking application workflows.
Defines focused HTTP routes, middleware, validation and consistent REST API responses.
Stores flexible application records and supports evolving product data without rigid table structures.
Adds schemas, validation and model-level consistency to MongoDB persistence workflows.
Runs the language model used for local, controlled AI inference and structured classification output.
Organizes prompts and model calls behind a reusable service layer that can evolve independently.
Hosts the web experience and serverless endpoints with repeatable deployment from source control.
Creates a protected route from the deployed API to the Ollama runtime without exposing local network ports.
Interface, business logic, persistence and external services remain separated so changes are easier to reason about.
Validation and predictable contracts protect downstream workflows from incomplete or unexpected input.
Runtime limits, secrets, external dependencies and failure paths are considered as part of the implementation.
06 / Delivered
Responsive React testing interface
Layered controller, route and service structure
Automated API and normalization tests
Postman collection and environment examples
Vercel serverless deployment configuration
Detailed local and production setup guide
Explore the working product