The app's database schema is structured with three main tables:
- Users: Contains user information and credentials together with subject metadata.
- Topics: Represents topics that group related tasks.
- Tasks: Stores individual tasks associated with topics. Each user can be assigned to one or more topics, creating a structure similar to a QA dataset.
There are metadata fields in both users and tasks tables which has JSONB type where you can store metadata of users and tasks in json format.
The app uses the Spoken-SQuAD dataset as the base database schema. Custom scripts have been developed to facilitate the creation and population of the database with this dataset.
The TaskProvider
class, located at backend/src/taskProvider.js
, handles task management with two main methods:
getTask()
: Retrieves tasks for users to work on.submitTask()
: Processes and stores task submissions.
To adapt the app to different database structures:
- Create your own
TaskProvider
implementation - Implement the required methods:
getTask()
submitTask()
- Update your database schema accordingly
A default TaskProvider
implementation for the spoken-SQuAD dataset is included as an example.
Return to the main README to continue with the SpeechCollector setup.