Taxpertise: AI-Driven Intelligent Tax Guidance Platform
About the Project
Navigating tax laws, deductions, and filing rules is a notoriously complex, stressful, and opaque process for everyday individuals. Traditional tax software relies heavily on rigid, static forms that fail to explain why certain tax positions apply or offer tailored, contextual advice in real-time.
We were inspired to build Taxpertise as part of our vision for accessible financial technology. By leveraging modern web technologies alongside advanced generative AI, our goal was to build a platform that doesn't just fill out boxes, but acts as an intelligent, conversational tax companion.
Mathematically optimizing tax scenarios and eligibility can be expressed through dynamic rule evaluation models, such as determining effective tax brackets.
What We Built & How It Works
Taxpertise is a full-stack, production-ready AI tax guidance platform built using a robust modern tech stack:
- Frontend & Framework: Next.js 14 (App Router), React, TypeScript, Tailwind CSS.
- Authentication & Security: Auth0 (v4 SDK) with App Router route handlers for secure user sessions, role-based access, and production OAuth callbacks.
- Database & Persistence: Prisma 7 paired with Timescale Cloud (TigerData) for high-performance PostgreSQL storage, user profile state, and audit telemetry.
- Local Deterministic Rules Engine: A local rule-evaluation engine for 2025 Federal and Pennsylvania state tax codes that computes exact baseline tax facts before engaging AI.
- Artificial Intelligence & Privacy: Google Gemini (
gemini-1.5-flash) integrated via server-side routes, paired with a custom PII sanitization middleware (sanitize.ts) to scrub sensitive data before prompt generation.
Core Implemented Features & Team Contributions
- Deterministic Rules & AI Synthesis: Rather than letting an LLM guess tax math, our local deterministic engine processes user inputs first. Gemini then consumes verified baseline outputs to generate structured, plain-language explanations with strict output token caps (256 tokens for questions, 1,024 tokens for advice).
- Dynamic Assessment Questionnaire: Features an adaptive, multi-question flow with interactive typed controls (boolean, filing-status, numeric inputs, and an “I’m not sure” skip option). Each answer updates evaluation facts, stopping after a strict 3-question maximum or when all missing facts are resolved.
- Personal Task Management System: Signed-in users can select evaluated tax topics to create and manage individual action items. The
/taskspage allows users to review, mark complete/incomplete, or delete tasks sorted newest first, backed by profile-isolated storage and unit test coverage. - Production Security & Deployment: Configured production-ready Auth0 OAuth protocols on Vercel, aligning environment variables (
AUTH0_BASE_URL) and redirect URIs for seamless user authentication.
Technical Challenges & Architecture
1. Architecting Adaptive AI Flows & Privacy
- The Challenge: Connecting a generative AI model to a deterministic rules engine without letting the conversation wander, exceed token budgets, or leak PII.
- The Solution: We implemented strict input validation, token caps, and a custom
sanitize.tsmiddleware to scrub sensitive personal data before requests hit Gemini. If Gemini experiences a timeout, the system cleanly defaults to deterministic fallback questions.
2. Managing Full-Stack Migrations & State Sync
- The Challenge: Integrating Auth0 v4, Prisma 7, and Timescale Cloud concurrently across a remote team repository and deploying to Vercel.
- The Solution: Standardized environment variables, established unified database bootstrap scripts, and leveraged Prisma migration tooling (
npx prisma db pushandnpx prisma generate) to guarantee database synchronization across environments.
What's Next: The Taxpertise Roadmap
Building on our core MVP, we plan to expand Taxpertise into a comprehensive, year-round tax companion aligned with the following capabilities:
- Document Checklist & OCR Parsing: Automatically identify required tax documents, track what's missing, and parse forms via secure financial APIs.
- Deduction and Credit Finder: Proactively identify potential tax benefits, ask follow-up questions to assess eligibility, and explain what users may be missing.
- Life-Event Tax Guidance: Provide tailored guidance on the tax implications of starting a job, attending college, moving, getting married, having a child, or starting a business.
- Calendar Integration: Track relevant deadlines and remind users about upcoming payments and forms via Google Calendar APIs or general calendar services (PublicAPIs.io Calendar APIs).
- Prior-Year Comparison: Help users understand year-over-year changes in their tax situation to avoid missed benefits or obligations.
Built With
- auth0
- gemini
- next.js
- node.js
- postgresql
- prisma
- react
- tailwind-css
- timescaledb
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.