Wolfram STEM Tutor is an AI-powered question-answering web application that helps K-12 students solve math and science questions using the computational power of Wolfram Alpha. The project consists of a React frontend and a Flask backend that acts as a proxy to the Wolfram Alpha API.
- Ask Math and Science Questions: Type your question and receive step-by-step solutions powered by Wolfram Alpha.
- Modern UI: Built with React and Tailwind CSS for a clean and responsive design.
- API Proxy: The backend securely communicates with Wolfram Alpha, keeping your API key safe.
- Easy Local Setup: Run both frontend and backend locally for quick testing and development.
- Environment Variables: Securely manage sensitive credentials like your Wolfram Alpha App ID using a
.env
file.
stem-tutor-query-solve/
├── app.py # Flask backend (API proxy)
├── requirements.txt # Backend Python dependencies
├── .env # Backend environment variables (NOT committed)
├── .gitignore # Files/directories to ignore in git (including .env)
├── package.json # Frontend project configuration
├── vite.config.ts # Vite config (frontend dev server & proxy)
├── src/ # Frontend React application source code
└── ... # Other supporting files
git clone https://github.com/karthiek390/stem-tutor-query-solve.git
cd stem-tutor-query-solve
...
On Windows (cmd):
python -m venv venv
venv\Scripts\activate
On Windows (PowerShell):
python -m venv venv
venv\Scripts\Activate.ps1
On Mac/Linux:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
-
Copy the example environment file to create your own
.env
:cp .env.example .env
On Windows, use:
copy .env.example .env
-
Open the new
.env
file and replaceYOUR-WOLFRAM-APP-ID-HERE
with your actual Wolfram Alpha App ID. -
Do not commit your
.env
file to git!
Your.env
file is already included in.gitignore
for safety.
python app.py
The backend will start on http://localhost:5000. ...
npm install
npm run dev
The frontend will start on http://localhost:8080 (see your terminal for the exact port).
- Open your browser and go to http://localhost:8080.
- Type your question in the provided input box.
- Press "Get Answer" to see the solution fetched from Wolfram Alpha.
- The frontend is configured (via
vite.config.ts
) to proxy API requests to the Flask backend, so no CORS issues will occur during local development. - Ensure both the frontend and backend are running simultaneously for the application to function.
- The backend uses a
.env
file for secrets. If you share this project, never share your actual.env
file or API keys.
- CORS or Network Errors: Make sure both servers are running and the ports match those in your configuration files.
- Wolfram Alpha API errors: Check your internet connection and ensure the App ID in
.env
is valid. - Dependency issues: Ensure you are using compatible versions of Python and Node.js. Always use a virtual environment for Python dependencies.
- Virtual environment not activating: Double-check activation commands for your OS/terminal. See step 2a above.
This project is for educational purposes.
Developed by karthiek390.