UniverSIS Lab

How to contribute to the Students application https://gitlab.com/universis/universis-students and experience the technology that powers UniverSIS, with an after flavor of hot dev tools.

In this hands-on workshop we will dive into how to:

  • Create and style of a new front-end component
  • Query with the UniverSIS API
  • Debug a front-end application using just your browser

… and while we are at it learn how to reduce development overhead with Docker and Postman.

What is the UniverSIS Project?

UniverSIS is a coordinated effort by Greek academic institutions to build the next generation of an open source Student Information System. Learn more at universis.io and joins us at Discord

Who

When

Saturday 24 April 2021, 18:00 - 19:30

Where

Zoom for UniverSIS LAB @ SFHMMY2021

When;Where;
24/4/2021, 15:00https://authgr.zoom.us/j/91431147120?pwd=Qk9zWllNa0lLbDFIRCsxcUd3SUtkZz09

Useful links

Code Snippets

Install UniverSIS Students web application locally!

# Visit the repository and take a look at INSTALL.md 
# https://gitlab.com/universis/universis-students/-/blob/master/INSTALL.md

# Get the code
git clone git@gitlab.com:universis/universis-students.git 
cd universis-students/

# Install  & run
git submodule update --init --remote
npm ci
ng serve

# Visit http://localhost:7001 to see it in action!
http://localhost:7001

# Login with demo credentials
https://gitlab.com/universis/universis-students#demo
Bash

Use Docker!

git clone https://gitlab.com/universis/universis-students.git
cd universis-students
touch Dockerfile.devel
touch docker-entrypoint.sh
chmod +x ./docker-entrypoint.sh
docker build -t workshop -f ./Dockerfile.devel .
docker run --name workshop -v $(pwd)/..:/home/universis:rshared -p 7001:7001 -it workshop /bin/bash
# If the docker container is already created, you can access it with 
# docker start workshop
# docker exec -it workshop /bin/bash
Bash

Dockerfile.devel

FROM docker.io/node:lts-buster

ENV HOME /home/universis
VOLUME $HOME
WORKDIR $HOME/universis-students
EXPOSE 7001

ENTRYPOINT ["./docker-entrypoint.sh"]
CMD ["/bin/bash", "-i"]
Bash

docker-entrypoint.sh

#!/usr/bin/env bash
set -e

git submodule update --init --remote
npm ci
cp src/assets/config/app.json src/assets/config/app.development.json
npx ng serve > /dev/null 2>&1 &

# first arg is `-f` or `--some-option`
# or there are no args
if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
exec bash "$@"
fi

exec "$@"
Bash

Code for UniverSIS Students Application

# Inside the docker container
# Navigate to 
cd src/app/grades/components
npx ng generate component internships -m ../grades.module.ts
cd ../services 
npx ng generate service internships
Bash