MindScratch is a project that leverages AI to assist students in learning programming. The front end is developed with Vue.js, and the back end is built using Python's Flask framework, with OpenAI's GPT API integrated for conversational assistance.
MindScratch/
├── frontend/ # Vue.js front-end application
└── backend/ # Flask back-end API server
- Node.js (for the Vue front-end)
- Python 3.7+ (for the Flask back-end)
- An API key from OpenAI for GPT integration
git clone https://github.com/your-username/MindScratch.git
cd MindScratch
-
Navigate to the
frontend
directory:cd frontend
-
Install dependencies:
npm install
-
Run the development server:
npm run serve
-
The Vue.js application should now be running at
http://localhost:8080
.
-
Navigate to the
backend
directory:cd ../backend
-
Set up a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Set up your OpenAI API key:
- Create a
.env
file in thebackend
directory:touch .env
- Add your API key to the
.env
file:OPENAI_API_KEY=your_openai_api_key_here
- Create a
-
Run the Flask server:
flask run
-
The Flask API should now be running at
http://localhost:5500
.
The Vue front-end communicates with the Flask back-end through RESTful API calls. Ensure both the front-end and back-end servers are running to allow interaction between the two.
- Access the front-end application at
http://localhost:8080
. - Use the app interface to interact with the GPT-powered assistant.
- The assistant will respond based on the logic provided in the Flask back-end and GPT API responses.
The following environment variables should be set in the .env
file in the backend
folder:
OPENAI_API_KEY
- Your OpenAI GPT API key.
This project is licensed under the MIT License.