Skip to content
T

TaxMantri

Stop Wrestling With Tax

Created on 7th September 2025

•

T

TaxMantri

Stop Wrestling With Tax

The problem TaxMantri solves

This project solves the problem of complex and confusing tax planning for individuals and professionals. Most people struggle with understanding which tax regime benefits them more, how to calculate liabilities like advance tax or capital gains, and what deductions or investments can reduce their overall tax burden. By providing a conversational AI-powered Tax Assistant that connects a modern frontend with a backend powered by Gemini AI, the project makes tax advice accessible in simple, interactive language. Instead of reading lengthy tax documents or hiring expensive consultants, users can quickly ask personalized questions, compare regimes, estimate liabilities, and discover savings opportunities — all in real time from a single, user-friendly application.

image

Challenges we ran into

Backend–Frontend Integration

Your frontend runs on one port (like 8081) while the backend runs on another (3031), which caused CORS errors and fetch request failures.

Resolving this required setting up proper CORS handling in Express and making sure API calls pointed to the correct backend URL.

Switching AI Providers

Initially, the backend used OpenAI’s GPT models, but migrating to Gemini 2.0 Flash required changes in the SDK, API keys, and response handling.

The challenge was understanding differences in model invocation and adapting code to work with a new AI provider.

Error Handling & Stability

Fetch errors and server crashes happened when the backend didn’t return structured responses.

You had to add better error checks (if (!res.ok)) and fallbacks so the chat wouldn’t break.

Frontend State Management

Managing chat history, typing indicators, and quick question shortcuts in React needed careful state updates.

Handling cases like empty messages, slow responses, and showing “AI is typing…” indicators added extra complexity.

Environment Variables & API Security

Storing and using API keys securely required .env setup both for the backend (Gemini key) and optionally the frontend (API URL).

Without this, keys risked being exposed in code.

Discussion

Builders also viewed

See more projects on Devfolio