LearnLab provides learning with flashcards – powered by AI.
It has the capability to generate flashcards from a website.
This is a research project, in order to demonstrate how AI can influence learning processes in education.
preview.mp4
This project uses Nuxt, Typescript and TailwindCSS for the frontend. The backend is a REST API made with Node.js and the Express.js Framework and written in Typescript. As a database, the project uses MongoDB. It also utilizes the Hugging Face API.
The project consists of a backend and frontend.
The backend is a TypeScript Express application, using MongoDB as its database.
The frontend is built using Nuxt and TailwindCSS.
Edit the .env
file located in the ./backend
directory.
The first three variables are mandatory, the last three are optional:
OWNER_USERNAME
: The username you use as a admin. This will allow you to register yourself without an invite code - just pick that username you entered in the variable - and will also let you generate invites.FRONTEND_DOMAIN
: The domain of your frontend inexample.domain
style. If not on default port, specify it afterwards:localhost:3000
orexample.domain:3000
.MONGODB_URL
: URL of your MongoDB database, with password.PORT
: Port of the backend service.HUGGINGFACE_ACCESS_TOKEN
: Huggingface access token. Optional but recommended, because of rate limitation.HUGGINGFACE_MODEL
: Specify the Huggingface (AI) model. Must be of typetextGeneration
. The default model isgoogle/flan-t5-base
.
# MANDATORY VARIABLES
# Owner username: used for first user registration (without invite code) and admin functionality
OWNER_USERNAME="test"
# Domain of your frontend
FRONTEND_DOMAIN="localhost:3000"
# URL of the MongoDB Database
MONGODB_URL=""
# OPTIONAL VARIABLES
# Port the server will open on (Optional, default: '80')
PORT=80
# Huggingface.co access token (Optional, but recommended)
HUGGINGFACE_ACCESS_TOKEN=""
# Huggingface.co model to generate the cards. Must be of type 'textGeneration'. (Optional, default: 'google/flan-t5-base')
HUGGINGFACE_MODEL=""
- Open the
./backend
directory in your terminal (if not done already):
cd backend
- Install the required packages using your package manager:
# Using NPM
npm install
# Using Yarn
yarn install
- Start the backend server:
# Using NPM
npm run dev
# Using Yarn
yarn dev
In order to allow secure traffic - only to your backend API -, you need to specify the route to your API in the nuxt.config.ts
located inside the ./frontend
directory:
We set up a proxy with the frontend service. To this proxy the requests are being sent and then forwarded to the URL of the backend API.
defineNuxtConfig() > nitro > devProxy > "devApi" > target
: This must be your backend URL, with the port andhttp://
in the beginning. For example:http://localhost:80
orhttp://api.example.domain
.defineNuxtConfig() > runtimeConfig > public > apiBaseUrl
This is the URL to the proxy we set up. It is your frontend domain +devApi
(the name of thedevProxy
). Example:http://localhost:3000/devApi
orhttp://example.domain/devApi
.
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: ['@nuxtjs/tailwindcss'],
devtools: { enabled: true },
nitro: {
devProxy: {
"/devApi": {
target:"http://localhost:80",
changeOrigin: true,
prependPath: true,
}
}
},
runtimeConfig: {
public: {
apiBaseUrl: 'http://localhost:3000/devApi',
},
},
css: [
'~/assets/fonts.css',
],
})
- Open the
./frontend
directory in your terminal (if not done already):
cd frontend
- Install the required packages using your package manager:
# Using NPM
npm install
# Using Yarn
yarn install
- Start the frontend server:
# Using NPM
npm run dev
# Using Yarn
yarn dev
The project and the default model – google/flan-t5-base
– was evaluated with n = 76 question and answers.
The evaluation was done with the following websites:
Classification | English | German | Cumulation |
---|---|---|---|
Correct | 24 | 11 | 35 |
Minor Difference | 2 | 10 | 12 |
Incorrect | 12 | 17 | 29 |
Total | 38 | 38 | 76 |
Raw data can be found in the ./docs/assets/evaluation/
folder and is available in CSV
and TSV
format.
- Enable users to upload images onto cards, showcasing or exemplifying the solution associated with each card.
This project uses gitmoji for styling git commits.
Please commit your code in a clean and organized manner. Follow these guidelines:
- Write clear and descriptive commit messages
- Keep commits focused on specific changes
- Avoid committing large chunks of unrelated changes
- Ensure your code is well-documented
This project is licensed with the GNU AFFERO GENERAL PUBLIC LICENSE
(AGPL). This diff representation helps illustrate the key points of the AGPL, showing what you can and cannot do under the license1:
- Use in proprietary applications without disclosing source code.
- Combine with proprietary software to create a larger proprietary app.
+ Use for any purpose, including commercial.
+ Modify and distribute source code.
+ Use internally without source code disclosure.
+ Convey over a network (triggers copyleft).
+ Run network services without source code disclosure, but provide AGPL source code upon request.
Footnotes
-
Note: The shown representation is for illustrative purposes only. It is crucial to thoroughly review the actual GNU Affero General Public License (AGPL) to understand the terms and conditions. This diff is not intended to be a legally binding interpretation, and any decisions or actions should be based on the official license text. ↩