Skip to content

profjordanov/students-manager

Repository files navigation

StudentsManager

A web application built on .NET, React, MSSQL, Azure, and OpenAI, designed to manage course-related data at the University of Economics – Varna. Students actively use the platform while also developing new functionalities for it.

Environments

Environment URL Notes
Production https://students-manager.site/ Public production deployment
Development https://students-manager-dev.azurewebsites.net/ Dev backend / API deployment
React (SPA) https://students-manager-spa.azurewebsites.net/ React version of the platform

CI/CD Status

Docker Compose Build Check

Deploy Manager to Azure App Service

CodeQL

CodeFactor

SonarQube Cloud

MVC Frontend (main.js + chatbot)

main.js

main.js is a single bundled + minified file that mixes third-party libraries with a custom global App namespace (site logic)

Third-party code embedded in the bundle

  • jQuery 3.1.1
  • GSAP TweenMax 1.19.x (plus plugins like ScrollToPlugin, CSSPlugin, etc.)
  • ScrollMagic 2.0.5 (plus GSAP plugin)
  • Blazy (lazy-loading images)
  • fullPage.js (one-page scrolling sections)
  • Swiper (carousel/slider)
  • Plyr (video/audio player)
  • jQBrowser (UA detection helper)

The custom logic inside main.js (what it does)

The bundle defines a global App object and initializes multiple modules via App.init().

On window load it calls:

  • App.resize() → sets App.viewport_height / App.viewport_width and App.mobile based on UA/width
  • App.bind() → attaches UI handlers (menu, category tabs, video popup, job popup, chatbot start, etc.)
  • App.UI.init() → lazy-loading + fullPage initialization
  • App.Test.init() → course tests behavior
  • App.Scroll.init() → parallax + header scroll states + scroll-to
  • App.sliderSwipper.init() → initializes Swiper sliders
  • plus App.Animations, App.Login, App.Profile, etc.

Course tests page

The key module is App.Test. It binds click handlers on the active question only:

  • #test click on .question.active .answer inputanimateAfterClick
  • #test click on .question.active .answer inputcountStats

countStats() behavior:

  • reads the value of the clicked radio (action / process / people / idea)
  • reads data-answer (1 or 2) and data-question (1..40)
  • resets/recomputes category totals
  • records the chosen answer for that question

animateAfterClick() behavior:

  • hides answers for non-active questions initially (setOpacityToAllUnactiveQuestions)
  • after selecting an answer, animates the transition to the next .question (via TweenMax)
  • uses a guard like #test.animating to prevent double-clicks during transitions

Chatbot

External dependencies

  • Lodash (_) — bundled/minified at the top of the file (utility functions like _.trim, _.map, _.filter, etc.)
  • Typed.js — bundled/minified (typing animation effect via new Typed(...))
  • jQuery ($) — not bundled; expected to be available globally )

Example cURL (chatbot save results)

curl ^"http://localhost:5173/api/chatbot/save_results^" ^
  -H ^"Content-Type: application/json^" ^
  --data-raw ^"{^\^"res^\^":^\^"[{^\^\^\^"question^\^\^\^":^\^\^\^"Welcome! Shall we start with some basic JS questions?^\^\^\^",^\^\^\^"answer^\^\^\^":^\^\^\^"Yes^\^\^\^"}]^\^",^\^"name^\^":^\^"John Doe^\^",^\^"email^\^":^\^"john.doe@example.com^\^"}^"

API examples

Slido

POST

curl --location 'https://students-manager-dev.azurewebsites.net/api/slido/question' \
--header 'Content-Type: application/json' \
--data '{
		"question":"api post get"
}'

GET

curl --location 'https://students-manager-dev.azurewebsites.net/api/slido/questions?limit=20&skip=0'

Example response:

["api post get","lowwer api/slido/question","because","why?","question",".net 10"]

Login

Request

curl --request POST \
	--url https://students-manager-dev.azurewebsites.net/api/login \
	--header 'content-type: application/json' \
	--data '{
		"email" : "jordan@abv.bg",
		"password" : "password"
}'

Responses

// 200
{
	"userId": "1eac9820-5e6e-4d10-6e94-08de36f40f78"
}
// 401
{
	"message": "Invalid email or password."
}

🚀 Technologies

  • Framework: ASP.NET Core MVC
  • Containerization: Docker & Docker Compose
  • Testing: xUnit (StudentsManager.Tests)

📁 Project Structure

├── StudentsManager.Mvc/          # Main MVC application
│   ├── Controllers/              # MVC Controllers
│   ├── Domain/                   # Domain models
│   ├── Mappings/                 # Object mappings
│   ├── Migrations/               # Database migrations
│   ├── Persistence/              # Data access layer
│   ├── Services/                 # Business logic services
│   ├── Settings/                 # Configuration settings
│   ├── Views/                    # Razor views
│   └── wwwroot/                  # Static files
├── StudentsManager.Tests/        # Unit tests
└── docker-compose.yml            # Docker orchestration

🛠️ Getting Started

Prerequisites

Running Locally

cd StudentsManager.Mvc
dotnet run

Running with Docker

./run-app.sh

Or using Docker Compose directly:

docker-compose up

Stopping the Application

./run-down-app.sh

🧪 Running Tests

./run-tests.sh

Or manually:

dotnet test StudentsManager.Tests/

🐳 Docker Commands

Script Description
run-app.sh Start the application
run-down-app.sh Stop the application
push-app.sh Push Docker images
run-tests.sh Run test suite

📄 License

See LICENSE for details.

🔒 Security

See SECURITY.md for security policies.

About

A web application built on .NET, React and Azure, designed to manage course-related data at the university. Students actively use the platform while also developing new functionalities for it.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Contributors