SHAR Platform is a web-based learning platform with tests.
The system has several roles: administrator, methodologist, teacher, and student. A methodologist creates courses, classes, learning materials, tests, and achievements. A teacher works with assigned classes, opens materials, and reviews student answers. A student completes lessons and tests, views results, and earns achievements.
- user registration and sign-in;
- user role management;
- course, class, and lesson creation;
- learning material and presentation uploads;
- test and assignment creation;
- student test taking;
- teacher review of open-ended answers;
- statistics for students, classes, and courses;
- achievements and certificates;
- file storage through an S3-compatible storage service.
Backend:
- Java 17;
- Spring Boot 3.2;
- Spring Web;
- Spring Security;
- Spring Data JPA;
- PostgreSQL;
- JWT for authorization;
- MinIO or another S3-compatible storage service;
- RabbitMQ for demo integration;
- PDFBox for working with PDF files;
- Maven.
Frontend:
- React;
- Create React App;
- JavaScript;
- CSS;
- Framer Motion;
- Nginx for serving the built frontend.
Infrastructure:
- Docker;
- Docker Compose;
- Nginx gateway;
- PostgreSQL 15;
- MinIO;
- RabbitMQ;
- GitHub Actions for CI/CD.
backend/- Spring Boot server application;front/- React client application;db/init/- database schema and initial data;db/seed/- additional test data sets;infra/nginx/- Nginx configuration;infra/certbot/- TLS certificate scripts;docker-compose.yml- local run configuration;compose.prod.yml- production-like run configuration.
Docker and Docker Compose v2 are required.
- Copy the sample configuration:
cp .env.example .env- Start the project:
docker compose up -d --build- Open the application:
http://localhost:3000
The backend will be available at:
http://localhost:8080
MinIO will be available at:
http://localhost:9001
Stop the project:
docker compose downTo fully recreate the database together with the initial data:
docker compose down -v
docker compose up -d --buildThe server uses compose.prod.yml. In this mode, the frontend is built into the gateway container, and only HTTP and HTTPS are exposed externally.
- Prepare the configuration file:
cp .env.example .env.prod- Set the main variables in
.env.prod:
REACT_APP_API_URL=https://your-domain.ru
APP_S3_PUBLIC_URL=https://your-domain.ru/api/files
TLS_CERTS_DIR=/path/to/certs
POSTGRES_DB=course_db
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minioadminThe directory referenced by TLS_CERTS_DIR must contain these files:
fullchain.pem
privkey.pem
- Start the stack:
docker compose --env-file .env.prod -f compose.prod.yml up -d --build- Check the status:
curl -k https://localhost/healthz
curl -k https://localhost/actuator/healthIf there is no certificate yet, you can use the included scripts:
bash deploy.sh up
bash deploy.sh issue-le DOMAIN=your-domain.ru CERTBOT_EMAIL=mail@example.comThe backend can be built as a WAR file and deployed to WildFly. WildFly with Jakarta EE 10 support, JDK 17, and Maven are required.
PostgreSQL and MinIO must still be running separately. For local development, you can start them with Docker:
docker compose up -d postgres minio minio_initBefore starting WildFly, set the environment variables. If the database and MinIO are running through the local docker-compose.yml, these values will work:
export SERVER_PORT=8080
export DB_HOST=localhost
export DB_PORT=5433
export DB_NAME=course_db
export DB_SSLMODE=disable
export SPRING_DATASOURCE_USERNAME=postgres
export SPRING_DATASOURCE_PASSWORD=postgres
export APP_S3_HOST=localhost
export APP_S3_PORT=9000
export APP_S3_PUBLIC_HOST=localhost
export APP_S3_PUBLIC_PORT=9000
export APP_S3_REGION=us-east-1
export APP_S3_ACCESS_KEY=minioadmin
export APP_S3_SECRET_KEY=minioadmin
export APP_S3_BUCKET=avatars
export APP_MAIL_ENABLED=falseBuild the backend:
cd backend
mvn clean package -DskipTestsCopy the WAR file to WildFly:
cp target/course-management-1.0.0.war "$WILDFLY_HOME/standalone/deployments/ROOT.war"Start WildFly:
"$WILDFLY_HOME/bin/standalone.sh" -b 0.0.0.0Backend health check:
curl http://localhost:8080/actuator/healthIf the WAR is not deployed as ROOT.war, the backend will have a context path. In that case, REACT_APP_API_URL for the frontend must include that path.
When using WildFly, the frontend is built separately:
cd front
npm ci
REACT_APP_API_URL=http://localhost:8080 npm run buildAfter the build, the front/build directory should be served through Nginx or another static web server.
On the first run, an administrator account is created:
login: admin
password: admin
After signing in, it is best to change the password immediately.
Run backend tests:
cd backend
mvn testRun the frontend in development mode:
cd front
npm install
npm startBuild the frontend:
cd front
npm ci
npm run build