SetBox is a place to plan your schedule with the use of subjects and lessons. It is also a place to track your learning progress and prepare for exams.
- Make a profile to store your data
- Create a subject, specify when the lessons are happening
- Create lessons that are outside of specified subject times
- Add files to learn from
- Share a subject with other students (work in progress, some features not working properly)
- Add quizzes for lessons to test your knowledge (not yet implemented)
python 3.9.12, PostgreSQL 15.2
-
Clone the repository to your computer
-
Create a virtual environment
python -m venv venv
-
Enable the virtual environment
For macOS bash or zsh:
source venv/bin/activate
For Windows cmd:
venv\Scripts\activate.bat
-
Install requirements in virtual environment
pip install -r requirements.txt
-
Create databases for setbox and setbox_test (Run these commands in your PostgreSQl terminal)
CREATE DATABASE setbox; CREATE DATABASE setbox_test;
-
Create a copy of .env.template as .env and fill in the project environment variables
FLASK_DEBUG=set to True or False DATABASE_URL=postgresql://username:password@localhost:5432/setbox (change username and password to your database data) TESTING_DATABASE_URL=postgresql://username:password@localhost:5432/setbox_test (change username and password to your database data) FLASK_APP=run.py SECRET_KEY=generate a random secret key
-
Run upgrade command to generate database tables
flask db upgrade
-
Create empty directory for storing files
mkdir files
-
Run the app to see if it is working
python run.py
To run tests, use this command:
pytest -v
erDiagram
users }o--o{ subjects : "assigned to"
subjects ||--o{ lessons : "has"
lessons ||--o{ files : "contains"
users collection and subjects collection have a many-to-many relationship through a table users_in_subjects
- Primary Key Index on "id" column for all collections.
- Unique Constraint Index on "email" column for users collection.
- Unique Constraint Index on "name" and "owner_user_id" columns for subjects collection.
Something is not working? Contact @edvardsmazprecnieks .