A hybrid AI + Standard Calculator built with React, TypeScript, and Vite, enhanced by Google Gemini 2.5 Flash for solving complex mathematical problems, showing reasoning, and providing step-by-step solutions.
MathMind combines speed, clarity, and intelligenceโperfect for students, engineers, and anyone working with numbers.
GitHub Pages Deployment: https://albindavidc.github.io/MathMind/
- Fast, responsive scientific keypad
- Real-time arithmetic with operator chaining
- Clean, monospace display
- Error handling & input sanitization
-
Natural language math questions
-
Solves:
- Algebra
- Word problems
- Geometry
- Derivatives
- Unit conversions
- Multi-step reasoning
-
Structured JSON response: answer + steps + reasoning
- Stores both AI and standard calculations
- Timestamped logs
- Step-by-step explanations
- One-click clear
- Neon-themed dark design
- Glassmorphism cards
- Animated splash screen
- Smooth transitions
- Fully responsive
albindavidc-mathmind/
โโโ App.tsx
โโโ index.tsx
โโโ index.html
โโโ package.json
โโโ tsconfig.json
โโโ vite.config.ts
โโโ constants.ts
โโโ types.ts
โโโ metadata.json
โ
โโโ components/
โ โโโ AIInterface.tsx
โ โโโ Calculator.tsx
โ โโโ HistorySidebar.tsx
โ โโโ SplashScreen.tsx
โ
โโโ services/
โ โโโ geminiService.ts
โ
โโโ .github/
โโโ workflows/
โโโ deploy.yml
- React 19
- TypeScript
- TailwindCSS
- Vite
- PWA
- Google Gemini 2.5 Flash
- JSON schema-driven responses
- Structured math reasoning
- GitHub Actions
- GitHub Pages
MathMind uses an API key for Gemini.
Set this in your GitHub repo:
Settings โ Secrets โ Actions โ New Secret โ API_KEY
The app automatically picks it from:
process.env.API_KEYnpm installnpm run devnpm run buildnpm run previewThis repo includes:
.github/workflows/deploy.yml
Deployment happens when you:
- Push to main
- Or manually trigger from Actions
The output is automatically published to GitHub Pages.
To enable Pages:
- Go to Settings โ Pages
- Set Source = GitHub Actions
Done. Every push updates the live site.
MathMind sends structured requests to Gemini:
User prompt or math problem.
{
"answer": "string",
"steps": ["string"],
"reasoning": "string"
}The interface displays:
- The final answer
- Steps (in the History Sidebar)
- A brief reasoning section
Configured with:
"strict": truein TypeScript"noUnusedLocals": true"noUnusedParameters": true- Modular components
- Clean service layers
Pull requests are welcome! Open issues, submit improvements, or request features.
- API key stored via GitHub Secrets
- Build injects environment-based secure keys
- No API key appears in version control
MIT License Free to use, modify, and improve.
Albin David C Building modern, intelligent, beautifully-designed web applications.