Rectilearn is an online platform for students of all ages that promotes studying through interactive games. The website allows you to create "study sets" of questions that you want to study, similar to flashcards. But unlike studying with conventional flashcards, Rectilearn provides over five unique games that make learning entertaining and enjoyable. Throughout these games, students are prompted to answer questions from their study set in return for in game power-ups that allow the student to progress through the game. Rectilearn offers both 2D, and 3D games, similar to what students would play instead of studying, making the games truly fun for the students. Unlike other projects with similar missions, Rectilearn's source code is 100% open source, making it the most open and free learning-through-games website.
Rectilearn was initially created for the Tech with Tim hackathon in 2021 April. However, we discovered its potential for an enterprise application, therefore it is still being maintained today! The rewrite repo is written in SvelteKit and TailwindCSS.
Frontend:
- React.js bootstrapped with Next.js
- Kaboom.js (to create the games)
- Chakra ui
Backend:
- FastAPI (API)
- Uvicorn (http server)
- PostgreSQL (database)
- SQLAlchemy (database ORM)
YouTube promotional video (2021):
Demo: https://rectilearn-legacy.vercel.app
Note: Due to inactivity, the database and backend have expired as we are no longer financially capable of hosting the postgres database on Google Cloud Service and FastAPI backend on railway
Run
git clone https://github.com/Sanyok6/Rectilearn/to clone the repository andcdinto the Rectilearn folder
The backend programmed in python and uses the FastAPI library
Python version 3.8 or higher and a local PostgreSQL database is required
-
cdinto the backend folder by runningcd src/backend -
Create an
.envin the backend folder file containingPRODUCTION=1 SECRET_KEY={secret_key} USE_RAILWAY=0 POSTGRESQL_URI="://{user}:{password}@127.0.0.1:5432/{database_name}"replace the
{}with the relevant valuesyou can obtain a new secret key by running the following code
python3 -c 'import secrets;print(secrets.token_urlsafe(32))'Note: You can use cockroachdb as our database schemas are compatible. More information is in the database.py file
-
Create a virtual python environment and activate it
python3 -m venv ./venv source ./venv/bin/activate -
Install the dependencies
pip install -r requirements.txt
-
Apply the database migrations
alembic upgrade head
-
Run the web server
uvicorn main:app
Node version > 18.15.0 and npm version > 9.5.0
-
cdinto the frontend foldercd src/frontend -
Install the dependencies
npm install
-
Run the frontend
npm run dev
Rectilearn/
├── src/
│
├── backend/ - Backend server code
│ ├── alembic/ - Database migrations
│
├── frontend/
│ ├── public/ - Static assets for the website
│ ├── src/ - Contains the source code of the frontend web application
│ │ ├ components/ - UI components of the website
│ │ ├ lib/ - Library code (context + theme)
│ │ ├ pages/ - URL endpoints (pages) of the website
│ │ ├ utils/ - Utility functions for the functionality of the website
│
├── webgl-builds/ - Contains the WebGL builds for the bush game
│
├── .vscode/ - Contains vscode configuration