Skip to content

Commit 5258d60

Browse files
authored
Update README.md
1 parent 5641a21 commit 5258d60

File tree

1 file changed

+232
-20
lines changed

1 file changed

+232
-20
lines changed

README.md

Lines changed: 232 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,241 @@
1-
# Gemini MathMind
1+
# 🔢 **MathMind – AI-Powered Math Intelligence**
22

3-
A hybrid AI calculator powered by Google Gemini 2.5 Flash. This application combines a standard high-speed arithmetic interface with a conversational AI mode for solving complex mathematical problems.
3+
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.
44

5-
## Features
5+
MathMind combines speed, clarity, and intelligence—perfect for students, engineers, and anyone working with numbers.
66

7-
- **Standard Mode:** Fast, responsive keypad for daily arithmetic.
8-
- **AI Solver Mode:** Natural language interface to solve word problems, algebra, and geometry using Gemini 2.5 Flash.
9-
- **History:** Keeps track of both standard calculations and AI conversations.
7+
---
108

11-
## Deployment
9+
## 🚀 **Live Demo**
1210

13-
This project is configured to deploy via GitHub Actions.
11+
**GitHub Pages Deployment:**
12+
https://albindavidc.github.io/MathMind/
1413

15-
1. Go to your Repository **Settings** > **Pages**.
16-
2. Set **Source** to **GitHub Actions**.
17-
3. Push your code to the `main` branch.
14+
---
1815

19-
## Local Development
16+
## **Features**
2017

21-
1. Install dependencies:
22-
```bash
23-
npm install
24-
```
18+
### 🧮 **Standard Calculator**
2519

26-
2. Start the development server:
27-
```bash
28-
npm run dev
29-
```
20+
* Fast, responsive scientific keypad
21+
* Real-time arithmetic with operator chaining
22+
* Clean, monospace display
23+
* Error handling & input sanitization
24+
25+
### 🤖 **AI Solver Mode (Gemini 2.5 Flash)**
26+
27+
* Natural language math questions
28+
* Solves:
29+
30+
* Algebra
31+
* Word problems
32+
* Geometry
33+
* Derivatives
34+
* Unit conversions
35+
* Multi-step reasoning
36+
* Structured JSON response:
37+
**answer + steps + reasoning**
38+
39+
### 📜 **History Sidebar**
40+
41+
* Stores both AI and standard calculations
42+
* Timestamped logs
43+
* Step-by-step explanations
44+
* One-click clear
45+
46+
### **Beautiful UI & Animations**
47+
48+
* Neon-themed dark design
49+
* Glassmorphism cards
50+
* Animated splash screen
51+
* Smooth transitions
52+
* Fully responsive
53+
54+
---
55+
56+
## 📁 **Project Structure**
57+
58+
```
59+
albindavidc-mathmind/
60+
│── App.tsx
61+
│── index.tsx
62+
│── index.html
63+
│── package.json
64+
│── tsconfig.json
65+
│── vite.config.ts
66+
│── constants.ts
67+
│── types.ts
68+
│── metadata.json
69+
70+
├── components/
71+
│ ├── AIInterface.tsx
72+
│ ├── Calculator.tsx
73+
│ ├── HistorySidebar.tsx
74+
│ └── SplashScreen.tsx
75+
76+
├── services/
77+
│ └── geminiService.ts
78+
79+
└── .github/
80+
└── workflows/
81+
└── deploy.yml
82+
```
83+
84+
---
85+
86+
## ⚙️ **Tech Stack**
87+
88+
### **Frontend**
89+
90+
* React 19
91+
* TypeScript
92+
* TailwindCSS
93+
* Vite
94+
95+
### **AI**
96+
97+
* Google Gemini 2.5 Flash
98+
* JSON schema-driven responses
99+
* Structured math reasoning
100+
101+
### **Deployment**
102+
103+
* GitHub Actions
104+
* GitHub Pages
105+
106+
---
107+
108+
## 🛠️ **Environment Variables**
109+
110+
MathMind uses an API key for Gemini.
111+
112+
Set this in your GitHub repo:
113+
114+
```
115+
Settings → Secrets → Actions → New Secret → API_KEY
116+
```
117+
118+
The app automatically picks it from:
119+
120+
```ts
121+
process.env.API_KEY
122+
```
123+
124+
---
125+
126+
## 🧩 **Local Development**
127+
128+
### 1️⃣ Install dependencies
129+
130+
```bash
131+
npm install
132+
```
133+
134+
### 2️⃣ Start development server
135+
136+
```bash
137+
npm run dev
138+
```
139+
140+
### 3️⃣ Build for production
141+
142+
```bash
143+
npm run build
144+
```
145+
146+
### 4️⃣ Preview production build
147+
148+
```bash
149+
npm run preview
150+
```
151+
152+
---
153+
154+
## 🚀 **Automatic Deployment (GitHub Actions)**
155+
156+
This repo includes:
157+
158+
```
159+
.github/workflows/deploy.yml
160+
```
161+
162+
Deployment happens when you:
163+
164+
* Push to **main**
165+
* Or manually trigger from Actions
166+
167+
The output is automatically published to **GitHub Pages**.
168+
169+
To enable Pages:
170+
171+
1. Go to **Settings → Pages**
172+
2. Set **Source = GitHub Actions**
173+
174+
Done. Every push updates the live site.
175+
176+
---
177+
178+
## 🧠 **AI Mode Details**
179+
180+
MathMind sends structured requests to Gemini:
181+
182+
### Input
183+
184+
User prompt or math problem.
185+
186+
### Output Schema
187+
188+
```json
189+
{
190+
"answer": "string",
191+
"steps": ["string"],
192+
"reasoning": "string"
193+
}
194+
```
195+
196+
The interface displays:
197+
198+
* The final answer
199+
* Steps (in the History Sidebar)
200+
* A brief reasoning section
201+
202+
---
203+
204+
## 🧼 **Code Quality**
205+
206+
Configured with:
207+
208+
* `"strict": true` in TypeScript
209+
* `"noUnusedLocals": true`
210+
* `"noUnusedParameters": true`
211+
* Modular components
212+
* Clean service layers
213+
214+
---
215+
216+
## 🤝 **Contributing**
217+
218+
Pull requests are welcome!
219+
Open issues, submit improvements, or request features.
220+
221+
---
222+
223+
## 🔒 **Security**
224+
225+
* API key stored via GitHub Secrets
226+
* Build injects environment-based secure keys
227+
* No API key appears in version control
228+
229+
---
230+
231+
## 📄 **License**
232+
233+
MIT License
234+
Free to use, modify, and improve.
235+
236+
---
237+
238+
## 👨‍💻 **Author**
239+
240+
**Albin David C**
241+
Building modern, intelligent, beautifully-designed web applications.

0 commit comments

Comments
 (0)