Skip to content

heyimjustalex/LiveLearningLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ LiveLearningLab - Online courses tool with live labs

LiveLearningLab is your ultimate toolkit for crafting interactive courses with live laboratories using Kubernetes and Docker πŸ‹. Whether you're an educator, trainer, or developer looking to create engaging and hands-on learning experiences for your students, this project has got you covered!

Screenshot_4_result(1)

πŸ“š Project Overview

LiveLearningLab is a powerful and user-friendly platform designed to help you build and manage course materials enriched with live, hands-on labs. It empowers you to create dynamic learning experiences that bring theory to life through real-world Kubernetes and Docker deployments.

🌟 Key Features

πŸ‹ Live Docker-based, interactive laboratories
🏒 Kubernetes integration
πŸ‘©β€πŸ« User-friendly interface
🀝 Collaborative learning with separate environments
πŸ“Š Progress tracking
πŸ’» Course resource management

πŸ›οΈ Architecture

image

πŸ“¦ Project dependencies

  • Database - postgres:alpine3.18
  • Database Admin Panel - dpage/pgadmin4:7.8
  • Backend (Express.js + TS) - node:20-buster - (additional dependencies in ./backend/package.json)
  • Frontend (Next.js) - node:20-buster - (additional dependencies in ./frontend/package.json)

πŸ—„οΈ Database

General

There is no init schema SQL file, cause we use 'Sequelize' package (with some random data loading).
In /db folder there are also screenshots of scheme and dbdiagram.io code if modification of scheme is needed.
Scheme might also be viewed in PGadmin4

// TODO: Diagram, dbdiagram.txt

Technologies

  • dpage/pgadmin4:7.8
  • postgres:alpine3.18 // TODO -> maybe change cause there is no bash, and hard to make chown, and the pgpass does not work

Project structure

β”œβ”€β”€ db                  
β”‚   β”œβ”€β”€ pgadmin4              <- Admin panel for postgres
|   |   β”œβ”€β”€ config            <- Pgadmin4 config
|   |   |   β”œβ”€β”€ servers.json  <- Adding db container connection during pgadmin4 start
|   |   |   β”œβ”€β”€ .pgpass       <- Automatic login for connection defined in servers.json // TODO does not work ATM, not mounted in compose
|   |   β”œβ”€β”€ Dockerfile        <- Dockerfile for easier conf management (servers.json and .pgpass)
β”‚   β”œβ”€β”€ postgres              <- Postgres DB related files
|   |   β”œβ”€β”€ config            <- //TODO
|   |   |   β”œβ”€β”€ setup.sql     <- Optional initial SQL script, enable in docker-compose.yml, not needed due to ORM use in express.js
|   |   β”œβ”€β”€ schema.txt        <- Schema project //TODO
|   |   β”œβ”€β”€ schema.png        <- Schema screenshot from dbdiagram //TODO


### Schema structure

The schema of the database is as follows:

User:

  • Fields: id, email, password_hash, name, surname, role, description
  • Purpose: Represents a user or an admin who controls datasets.
  • Relationships:
    • One-to-Many with X
    • One-to-Many with Y

// TODO

🌐 Backend

General

Project supports hot-reload with Dockerm it gets started with compose, written with express.js. Backend is dockerized and avaliable at localhost:8080

Technologies

// TODO

Naming conventions

// TODO do we need to say it needs typing? Review these conventions

  1. Use typing
  2. Use lowerCamelCase for variables, properties and function names

Project structure

β”œβ”€β”€ backend                   <- Express.js backend
β”‚   β”œβ”€β”€ src                   <- Domain specific features
|   |   β”œβ”€β”€ Consts            <- //TODO
|   |   β”œβ”€β”€ Controllers       <- API endpoints
|   |   β”œβ”€β”€ Database          <- DBclient and DBconfig
|   |   β”œβ”€β”€ Helpers           <- //TODO
|   |   β”œβ”€β”€ Middleware        <- //TODO
|   |   β”œβ”€β”€ Models            <-  Sequelize ORM models
|   |   β”œβ”€β”€ Server            <- //TODO
|   |   β”œβ”€β”€ Services          <- //TODO
|   |   β”œβ”€β”€ Utils             <- //TODO
|   |   β”œβ”€β”€ index.ts          <- Entry point
β”‚   β”œβ”€β”€ node_modules          <- Packages installed from npm
β”‚   β”œβ”€β”€ package.json          <- Packages definitions
β”‚   β”œβ”€β”€ tsconfig.json         <- Typescript config
β”‚   β”œβ”€β”€ tsoa.json             <- Typescript config, entry point
|   β”œβ”€β”€ Dockerfile            <- Dockerfile for Docker image
|   β”œβ”€β”€ .dockerignore         <- Dockeignore for files that don't need to be included in repostiory
β”‚   β”œβ”€β”€ .env                  <- Environmental variables for db connection

//TODO review whole frontend

πŸ“± Frontend

General

Project has hot-reload with Docker and it gets started with command:

docker-compose -f docker-compose_all.yml up --build

Technologies

  • Next.js
  • VanillaJS
  • Tailwind CSS
  • NextUI

Naming conventions

  1. Components functions and files should start with capital letter.
  2. Every component file should be in folder with the same name.
  3. Component folder should contains no more than 4 files:
  • component.css - component styling
  • Component.tsx - component
  • ComponentConsts.ts - component consts
  • ComponentUtils.ts - component utils (functions)

  • Components: camelCase, function() {}
  • Functions: camelCase, function() {}
  • CSS classes: dash-case (ex. class-name__sub-class--variant)

Project structure

Frontend source folder is divided into 5 main folders: app, assets, components, consts and types. App folder defines app structure. Assets stores media files. Components contains subfolders with components. Consts folder is intended for global consts and interfaces. Types folder contains globals.d.ts file for defining global interfaces and types. Frontend is dockerized and avaliable at localhost:3000.

β”œβ”€β”€ frontend                  <- Next.js frontend
β”‚   β”œβ”€β”€ src                   <- Source folder
|   |   β”œβ”€β”€ app               <- App structure
|   |   β”œβ”€β”€ assets            <- Media folder
|   |   β”œβ”€β”€ components        <- Components folder
|   |   β”œβ”€β”€ consts            <- Consts folder
|   |   β”œβ”€β”€ types             <- Types and interfaces folder
β”‚   β”œβ”€β”€ public                <- Media folder
β”‚   β”œβ”€β”€ next.config.js        <- Next.js config
β”‚   β”œβ”€β”€ package.json          <- Packages to install
β”‚   β”œβ”€β”€ tsconfig.json         <- TypeScript config
β”‚   β”œβ”€β”€ tailwind.config.json  <- Tailwind CSS config
β”‚   β”œβ”€β”€ Dockerfile            <- Dockerfile for Docker image

Git workflow

Branches

In order to start developing, please create your own branch: git checkout -b "<type>/<branch-name>"

  • Type: feature, fix, build, chore, ci, docs, style, refactor, test, db
  • Name: dash-case

ex. feature/login-page

Commits

Please use following commits name convention: <type>: commit name

  • Type: feature, fix, build, chore, ci, docs, style, refactor, test, db
  • Name: lowercase

ex. feature: add login button

Pull request

Please use following pull request name convention: <Type>: commit name

  • Type: Feature, Fix, Build, Chore, CI, Docs, Style, Refactor, Test, Db
  • Name: lowercase

ex. Feature: add login page
Additionally list in pull request description main changes.

Merging

⚠ Use squash and merge ⚠

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •