Skip to content

Learn Tool is a web application that aims to improve the study and learning process.

License

Notifications You must be signed in to change notification settings

sitMCella/learn-tool

Repository files navigation

Learn Tool

Cards

Table of contents

Introduction

Learn Tool is a web application that aims to improve the study and learning process. Learn Tool consists of an active recall learning tool, and offers a whole range of functionalities, from importing a dataset to create custom cards and workspaces.

Read the documentation in order to discover the features of Learn Tool.

Configuration

Learn Tool application uses Oauth 2.0 and JWT authentication. Learn Tool supports the local authentication and the Google authentication. Read the page google_authentication in order to configure Google Cloud Platform.

Development

Learn Tool is a web application built using Spring Boot 2 framework and Kotlin language on the backend, and React JS framework on the frontend.

Setup

Install OpenJDK 11, Node.js >= 12.4.0, and Docker (Docker compose).

Build project

Build backend (development) and run unit tests

./gradlew clean build -PskipWebApp

Build backend (development) and run unit tests and integration tests

./gradlew clean build integrationTest -PskipWebApp

Build project (production) and run unit tests

./gradlew clean build

Build project (production) and run unit tests and integration tests

./gradlew clean build integrationTest

Backend Linter

Klint Check:

./gradlew ktlintCheck

Klint Format:

./gradlew ktlintFormat

Frontend Linter

Eslint Check:

cd ./frontend
eslint --ext .jsx,.js src/

Eslint Format:

cd ./frontend
eslint --fix --ext .jsx,.js src/

Create Docker images

Create Docker images

./gradlew jibDockerBuild

Setup Docker compose variables

Create a file .env with the following content:

POSTGRES_USERNAME=postgres
POSTGRES_PASSWORD=postgres

Run application

Run the backend application (development)

docker-compose -f docker-compose-development.yml up

Run the frontend application (development)

cd ./frontend
npm start

Run application (production)

docker-compose up --build

Access application

Access the application in development

http://localhost:3000

Access the application in production

http://localhost:80

Access PostgreSQL

docker exec -it db /bin/bash
psql learntool $POSTGRES_USERNAME

Backup and Restore the database

Backup the database

docker exec -t db pg_dumpall -c -U postgres > backup/dump_`date  %d-%m-%Y"_"%H_%M_%S`.sql

Restore the database

cat backup/<dump_file> | docker exec -i db psql -U postgres

REST APIs documentation

The directory "backend/documents" contains the OpenAPI REST APIs documentation. The documentation is compliant with Swagger UI and Postman.

Run the following command to validate the OpenAPI documentation file:

./gradlew validateOpenApi

About

Learn Tool is a web application that aims to improve the study and learning process.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published