Skip to content
ssimchenkoPublic

About

Frontend for an AI energy consultant: React chat, lead form and API integration. Hack&Change 2026 team project.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MTS EnergyTool — AI Business Consultant

A conversational interface that helps businesses explore energy management solutions.

React TypeScript Vite Vitest

Hackathon team project · Frontend Developer: Alexander Simchenko

Built by team AIblanki for the MTS AI track at Hack&Change 2026. The interface is in Russian.

Preview

Assistant workspace

Assistant workspace

Chat prompts and message input

Chat prompts and message input

Contact form

Contact form

Frontend contribution

I built the React interface for the consultant, including the chat workspace, suggested prompts, message state, contact form and debug panel. I connected the interface to the Go API, added routing and improved form accessibility and phone number formatting.

  • Chat experience: message input, suggested questions, loading and error states, and restored conversation history.
  • Lead form: contact fields, phone formatting, validation and explicit consent.
  • Integration: HTTP requests to the backend and a debug panel for response sources.
  • Quality: component tests with Vitest and Testing Library, TypeScript and ESLint.

The prototype combines a React chat interface, a Go API and a retrieval-augmented generation (RAG) service. It uses a knowledge base to answer questions, maintains conversation history and collects contact details when a client requests a follow-up.

Features

  • Conversational interface with suggested prompts and a lead form.
  • Knowledge-base retrieval using BM25 and, when available, vector search and reranking.
  • Persistent chat history and applications stored in PostgreSQL.
  • Source documents and generation time in a debug panel.
  • Explicit confirmation before saving an application.
  • Input validation, error handling and protection against concurrent requests within a chat.

Architecture

React + TypeScript + Vite
        │ HTTP
        ▼
Go API ───── PostgreSQL
        │
        ▼
FastAPI + RAG ── EnergyTool knowledge base
        │
        ▼
OpenAI-compatible model provider

The Go service manages chats and applications. The AI service retrieves context and generates responses through a configured external provider.

Tech stack

Frontend: React, TypeScript, Vite, Vitest
Backend: Go, PostgreSQL
AI: Python, FastAPI, RAG
Infrastructure: Docker Compose

Run locally

You need Docker Desktop, Node.js 22.12 or newer, and access to an OpenAI-compatible model provider. The AI service also requires the EnergyTool knowledge base. See the detailed setup guide for configuration, knowledge-base setup, API endpoints and troubleshooting.

Copy-Item .env.example .env
Copy-Item ai/.env.example ai/.env
# Configure the model provider in ai/.env before starting.
docker compose up --build -d
cd frontend
npm ci
npm run dev

Never commit populated .env files or API keys. The application is a hackathon prototype; saving a lead records it in the database and does not imply delivery to a manager.

Checks

# frontend
cd frontend
npm test
npm run lint
npm run build

# backend, from the repository root
cd backend
go test ./...
go vet ./...

# AI, with ai/requirements.txt installed
cd ../ai
python -m pytest -q

Credits

Created by team AIblanki. This portfolio copy retains the development history and contributor attribution from qu0ta/MTSHack.

About

Frontend for an AI energy consultant: React chat, lead form and API integration. Hack&Change 2026 team project.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages