Giter VIP home page Giter VIP logo

e-ratos's Introduction

e-RATOS (backend)

See WiKi

e-RATOS (Embeddable Remote Automatised Teaching and Controlling System) This is a web-based application that provides a rich extensive toolset for students' knowledge control via classical tests. The app can be used by medium and large educational organisations like schools, colleges or universities in multiple or mixed knowledge domains: health care, linguistics, natural sciences, etc. with significant loading like 10000+ learning sessions per day, with 1000+ simultaneous active sessions of 20-200 questions, accessed from within any LTI 1.x-compatible LMS like edX, Moodle, Sakai, etc.
(LTI v 1.1 is deprecated and transition to LTI v1.3. is desired) as well as directly from within Intranet or Internet network via a browser.

Stack of technologies:

Backend:
  • Java 17;
  • Spring Boot 3.x;
  • Hibernate;
  • RDBMS (MySql 8.x);
  • Redis 7.x
  • Maven;
  • Junit 5 (Jupiter);
  • TestContainers.
Frontend:
  • React.js (sources here)

Hardware config:

Varies depending on the scale of your organization: quantity of simultaneous users and quantity of questions. E.g. for an organization of 10000 concurrent students, and staff of 500 people with questions base of 500000+, minimal requirement is the following:

  • RAM 16Gb, with heap size > 8Gb;
  • Single quad core CPU;

Most recent Docker build:

Here

Use tags:

  • latest (for latest image)
  • prod (for least stable image)

Warning!

You need to create a Docker hub account to access the image.

Build and push fresh docker image

Docker file creation with Jib Maven plugin info:

  • Set application.yml -> profile=stage/prod
  • ./mvnw clean compile [Jib requires compiled project]
  • ./mvnw jib:build -Djib.to.auth.username=${DOCKER_HUB_USERNAME} -Djib.to.auth.password=${DOCKER_HUB_PASSWORD}

(Specify you credentials from DockerHub)

Local run

Profiles
  • prod
  • stage
  • dev

Notes(!): prod profile is tied to AWS environment (see ElastiCache Redis config).

IDE Intellij:
  • Make sure to use JDK 17 in the project;
  • Install EnvFile plugin;

SpringBoot config

  • Add SpringBoot configuration
  • Enable env. variable file
  • Add env file as the .env file
  • Set up MySql database locally (v 8.x)
  • Run locally

Docker-compose config info:

  • Add Docker-compose configuration
  • Specify docker-compose.yml
  • Specify .env variables file
  • Run locally
IDE agnostic:

BE only

  • Install Docker runtime
  • Install Docker-compose
  • Put .env file with all required environment variables into the same folder where docker-compose.yaml is located.
  • Run docker compose up -d to start the app;
  • Run docker compose down to stop the app;

Fullstack

  • Run docker-compose -f docker-compose-fullstack.yaml up -d to start the fullstack app with front-end part;

Run tests

(Make sure to use Java 17 as default system JDK)

export JAVA_HOME=/usr/lib/jvm/java-${JDK_VERSION_PACKAGE}

export PATH=$JAVA_HOME/bin:$PATH

java -version

Unit tests

./mvnw clean test

IT tests

By config, all test classes ending with *TestIT will be executed!

./mvnw clean verify

Local Terminal run

  • Export env. variables from .env file

export $(grep -v '^#' .env | xargs)

  • Run the app via Maven

./mvnw spring-boot:run

Run DB operations

./mvnw flyway:clean -Dflyway.user=${DATABASE_USER} -Dflyway.password=${DATABASE_PASSWORD} - clean local DB

./mvnw flyway:migrate -Dflyway.user=${DATABASE_USER} -Dflyway.password=${DATABASE_PASSWORD} - migrate local DB

./mvnw flyway:validate -Dflyway.user=${DATABASE_USER} -Dflyway.password=${DATABASE_PASSWORD} - validate local DB

(Specify you credentials from DB)

Alternatively, locate settings.xml (with DB credentials) in .m2 folder on local PC

e-ratos's People

Contributors

popov85 avatar

Watchers

James Cloos avatar  avatar

e-ratos's Issues

ERA-13: Prepare BE for API-only mode

  • Remove PageController
  • Remove static and templates folders from resources root
  • Adjust security config to produce error codes, not redirect to login page;

ERA16: Optimize database entitites, replace with enums where applicable

Replacement candidates are the following db tables:

  1. languages (cross out, prefer FE side I18n)
  2. question_type
  3. access-level
  4. strategy
  5. grading

This is gonna reduce the number of joins in sql queries;

Follow the rule:

If smth. can be added or removed from DB without programming - store in DB, otherwise store in enum!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.