This is a Flask web application that allows users to create their own flashcards and study them. Users can request/search for other users' flashcards to learn as well as request GPT-4 Turbo to summarise and compile their notes into a series of flashcards.
In our database we have three tables.
One for storing the User Information: Table Name: User Columns:
- id - INTEGER
- name - VARCHAR(64)
- email - VARCHAR(120)
- password_hash - VARCHAR(256)
- Primary Key: [ 'id' ]
One for storing the Sets Information: Table Name: Sets Columns:
- userId - INTEGER
- id - INTEGER
- subject - VARCHAR(100)
- title - VARCHAR(100)
- public - BOOLEAN
- cards - CARDS
- Primary key: ['id']
- Foreign key: userID -> User.id
One for storing the Flashcard Information: Table Name: Cards Columns:
- userId - INTEGER
- id - INTEGER
- setId - INTEGER
- question - VARCHAR(400)
- answer - VARCHAR(400)
- Primary key: ['id']
- Foreign key: setId -> Sets.id
Users can head to the learn page to study flashcards created by them or others around the world.
Either through AI or through the create page users can generate their own flashcards to study.
Users can search and explore other flashcard sets created by other users.
-
Unzip the project folder
-
Open a virtual environment within the project folder. Ensure that you have python downloaded.
python -m venv venv
source venv/bin/activate
-
Install the required Python packages by running the following command in the terminal:
pip install -r requirements.txt
Downloads all the required packages to run our web application.
-
Export the Openai API key, to use the AI feature.
echo "export OPENAI_API_KEY='ENTER_YOUR_API_KEY'" >> ~/.zshrc source ~/.zshrc
Export the ZenQuotes API key
echo "export QUOTES_KEY='ENTER_YOUR_API_KEY'" >> ~/.zshrc source ~/.zshrc
Export the key for database
echo "export SECRET_KEY='ENTER_THE_SECRET_KEY'" >> ~/.zshrc source ~/.zshrc
This will allow the web application to access the OpenAI API and the Quotes API.
-
Run the following command in the terminal to start the Flask development server:
flask run
-
Open a web browser and navigate to
http://127.0.0.1:5000/
to view the home page of the web application. -
From here head to http://127.0.0.1:5000/login to register an account.
-
http://127.0.0.1:5000/explore to discover new flashcards.
-
http://127.0.0.1:5000/create to create new flashcards.
-
http://127.0.0.1:5000/upload to use AI to gnerate new flashcards.
-
http://127.0.0.1:5000/learn to study the flashcards
Andy Lee (23351433), Umar Shaheen (23357119), Joel Raju (23366017)