Index: bus-n-go-do-5ta-faza/.gitignore
===================================================================
--- bus-n-go-do-5ta-faza/.gitignore	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/.gitignore	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
Index: bus-n-go-do-5ta-faza/.mvn/wrapper/maven-wrapper.properties
===================================================================
--- bus-n-go-do-5ta-faza/.mvn/wrapper/maven-wrapper.properties	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/.mvn/wrapper/maven-wrapper.properties	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
Index: bus-n-go-do-5ta-faza/README.md
===================================================================
--- bus-n-go-do-5ta-faza/README.md	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/README.md	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,65 @@
+# Documentation for the project 
+
+You can find a detailed documentation in macedonian for the project on our [Wiki page](https://develop.finki.ukim.mk/projects/BusNGo)
+
+# Get the application running
+
+## Install Java JDK 
+
+Download and install Java JDK 8 or above from [Oracle](https://www.oracle.com/java/technologies/javase/jdk21-archive-downloads.html)
+
+## Clone the repository 
+
+Make a clone from the repository onto your machine
+
+```bash
+git clone https://github.com/ppaunovski/Bus-GO.git
+```
+
+Then open the project in your IDE of choice (preferably IntelliJ)
+
+## Connect to the database
+
+Establish a connection to the remote database
+
+## Run the application
+
+Start the application, open a browser and navigate to [https://localhost:8080](https://localhost:8080)
+
+## Registered accounts:
+
+### 1. Admin
+
+Email: vangel.ajanovski@admin.jsp.mk
+
+Password: va
+
+#### Functionalities: 
+Register bus drivers and conductors.
+
+### 2. Bus Driver
+
+Email: petar.gruevski@vozac.jsp.mk
+
+Password: pg
+
+#### Functionalities:
+Start and end routes.
+
+### 3. Conductor
+
+Email: darko.sekulovski@kondukter.jsp.mk
+
+Password: ds
+
+#### Functionalities:
+Control the routes, and write tickets to registered or unregistered commuters which haven't paid for the ride.
+
+### 4. Commuter
+
+Email: pavel.paunovski@patnik.jsp.mk
+
+Password: pp
+
+#### Functionalities:
+Buy tickets for the rides, starting and ending a ride.
Index: bus-n-go-do-5ta-faza/mvnw
===================================================================
--- bus-n-go-do-5ta-faza/mvnw	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/mvnw	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,308 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Apache Maven Wrapper startup batch script, version 3.2.0
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /usr/local/etc/mavenrc ] ; then
+    . /usr/local/etc/mavenrc
+  fi
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "$(uname)" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME
+      else
+        JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=$(java-config --jre-home)
+  fi
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
+    JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="$(which javac)"
+  if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=$(which readlink)
+    if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
+      if $darwin ; then
+        javaHome="$(dirname "\"$javaExecutable\"")"
+        javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac"
+      else
+        javaExecutable="$(readlink -f "\"$javaExecutable\"")"
+      fi
+      javaHome="$(dirname "\"$javaExecutable\"")"
+      javaHome=$(expr "$javaHome" : '\(.*\)/bin')
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=$(cd "$wdir/.." || exit 1; pwd)
+    fi
+    # end of workaround
+  done
+  printf '%s' "$(cd "$basedir" || exit 1; pwd)"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    # Remove \r in case we run on Windows within Git Bash
+    # and check out the repository with auto CRLF management
+    # enabled. Otherwise, we may read lines that are delimited with
+    # \r\n and produce $'-Xarg\r' rather than -Xarg due to word
+    # splitting rules.
+    tr -s '\r\n' ' ' < "$1"
+  fi
+}
+
+log() {
+  if [ "$MVNW_VERBOSE" = true ]; then
+    printf '%s\n' "$1"
+  fi
+}
+
+BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR
+log "$MAVEN_PROJECTBASEDIR"
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
+if [ -r "$wrapperJarPath" ]; then
+    log "Found $wrapperJarPath"
+else
+    log "Couldn't find $wrapperJarPath, downloading it ..."
+
+    if [ -n "$MVNW_REPOURL" ]; then
+      wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+    else
+      wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+    fi
+    while IFS="=" read -r key value; do
+      # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
+      safeValue=$(echo "$value" | tr -d '\r')
+      case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
+      esac
+    done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
+    log "Downloading from: $wrapperUrl"
+
+    if $cygwin; then
+      wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
+    fi
+
+    if command -v wget > /dev/null; then
+        log "Found wget ... using wget"
+        [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        else
+            wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        log "Found curl ... using curl"
+        [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
+        else
+            curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
+        fi
+    else
+        log "Falling back to using Java to download"
+        javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaSource=$(cygpath --path --windows "$javaSource")
+          javaClass=$(cygpath --path --windows "$javaClass")
+        fi
+        if [ -e "$javaSource" ]; then
+            if [ ! -e "$javaClass" ]; then
+                log " - Compiling MavenWrapperDownloader.java ..."
+                ("$JAVA_HOME/bin/javac" "$javaSource")
+            fi
+            if [ -e "$javaClass" ]; then
+                log " - Running MavenWrapperDownloader.java ..."
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+# If specified, validate the SHA-256 sum of the Maven wrapper jar file
+wrapperSha256Sum=""
+while IFS="=" read -r key value; do
+  case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;
+  esac
+done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
+if [ -n "$wrapperSha256Sum" ]; then
+  wrapperSha256Result=false
+  if command -v sha256sum > /dev/null; then
+    if echo "$wrapperSha256Sum  $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then
+      wrapperSha256Result=true
+    fi
+  elif command -v shasum > /dev/null; then
+    if echo "$wrapperSha256Sum  $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then
+      wrapperSha256Result=true
+    fi
+  else
+    echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available."
+    echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties."
+    exit 1
+  fi
+  if [ $wrapperSha256Result = false ]; then
+    echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2
+    echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2
+    echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2
+    exit 1
+  fi
+fi
+
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+# shellcheck disable=SC2086 # safe args
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  $MAVEN_DEBUG_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
Index: bus-n-go-do-5ta-faza/mvnw.cmd
===================================================================
--- bus-n-go-do-5ta-faza/mvnw.cmd	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/mvnw.cmd	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,205 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Apache Maven Wrapper startup batch script, version 3.2.0
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %WRAPPER_URL%
+    )
+
+    powershell -Command "&{"^
+		"$webclient = new-object System.Net.WebClient;"^
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+		"}"^
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^
+		"}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file
+SET WRAPPER_SHA_256_SUM=""
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B
+)
+IF NOT %WRAPPER_SHA_256_SUM%=="" (
+    powershell -Command "&{"^
+       "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^
+       "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^
+       "  Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^
+       "  Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^
+       "  Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^
+       "  exit 1;"^
+       "}"^
+       "}"
+    if ERRORLEVEL 1 goto error
+)
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% ^
+  %JVM_CONFIG_MAVEN_PROPS% ^
+  %MAVEN_OPTS% ^
+  %MAVEN_DEBUG_OPTS% ^
+  -classpath %WRAPPER_JAR% ^
+  "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+  %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
+
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%
Index: bus-n-go-do-5ta-faza/pom.xml
===================================================================
--- bus-n-go-do-5ta-faza/pom.xml	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/pom.xml	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>3.2.1</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+    <groupId>mk.ukim.finki</groupId>
+    <artifactId>BusNGo</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>BusNGo</name>
+    <description>BusNGo</description>
+    <properties>
+        <java.version>21</java.version>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.jcraft</groupId>
+            <artifactId>jsch</artifactId>
+            <version>0.1.55</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-security</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-thymeleaf</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thymeleaf.extras</groupId>
+            <artifactId>thymeleaf-extras-springsecurity6</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>
+                            <groupId>org.projectlombok</groupId>
+                            <artifactId>lombok</artifactId>
+                        </exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/BusNGoApplication.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/BusNGoApplication.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/BusNGoApplication.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,22 @@
+package mk.ukim.finki.busngo;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
+
+@SpringBootApplication
+public class BusNGoApplication {
+
+    public static void main(String[] args) {
+
+
+        SpringApplication.run(BusNGoApplication.class, args);
+    }
+    @Bean
+    PasswordEncoder passwordEncoder(){
+        return new BCryptPasswordEncoder(10);
+    }
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/config/CustomUsernamePasswordAuthenticationProvider.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/config/CustomUsernamePasswordAuthenticationProvider.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/config/CustomUsernamePasswordAuthenticationProvider.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,46 @@
+package mk.ukim.finki.busngo.config;
+
+import mk.ukim.finki.busngo.service.KorisnikService;
+import org.springframework.security.authentication.AuthenticationProvider;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.stereotype.Component;
+
+@Component
+public class CustomUsernamePasswordAuthenticationProvider implements AuthenticationProvider {
+
+    private final KorisnikService userService;
+    private final PasswordEncoder passwordEncoder;
+
+    public CustomUsernamePasswordAuthenticationProvider(KorisnikService userService, PasswordEncoder passwordEncoder) {
+        this.userService = userService;
+        this.passwordEncoder = passwordEncoder;
+    }
+
+    @Override
+    public Authentication authenticate(Authentication authentication) throws AuthenticationException {
+        String username = authentication.getName();
+        String password = authentication.getCredentials().toString();
+
+        if (username.isEmpty() || password.isEmpty()) {
+            throw new BadCredentialsException("Empty credentials!");
+        }
+
+        UserDetails userDetails = this.userService.loadUserByEmail(username);
+
+        if (!passwordEncoder.matches(password, userDetails.getPassword())) {
+            throw new BadCredentialsException("Password is incorrect!");
+        }
+        return new UsernamePasswordAuthenticationToken(userDetails, userDetails.getPassword(), userDetails.getAuthorities());
+    }
+
+    @Override
+    public boolean supports(Class<?> aClass) {
+        return aClass.equals(UsernamePasswordAuthenticationToken.class);
+    }
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/config/WebSecurityConfig.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/config/WebSecurityConfig.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/config/WebSecurityConfig.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,73 @@
+package mk.ukim.finki.busngo.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
+import org.springframework.security.core.userdetails.User;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.security.provisioning.InMemoryUserDetailsManager;
+import org.springframework.security.web.SecurityFilterChain;
+
+
+@Configuration
+@EnableWebSecurity
+@EnableMethodSecurity
+public class WebSecurityConfig {
+
+    private final PasswordEncoder passwordEncoder;
+    private final CustomUsernamePasswordAuthenticationProvider authProvider;
+
+    public WebSecurityConfig(PasswordEncoder passwordEncoder, CustomUsernamePasswordAuthenticationProvider authProvider) {
+        this.passwordEncoder = passwordEncoder;
+        this.authProvider = authProvider;
+    }
+
+    @Bean
+    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception  {
+
+        http
+                .csrf(AbstractHttpConfigurer::disable)
+                .authorizeHttpRequests( (requests) -> requests
+                        .requestMatchers("/", "/home", "/assets/**", "/register")
+                        .permitAll()
+                        .requestMatchers("/admin/**").hasRole("ADMIN")
+                        .anyRequest()
+                        .authenticated()
+                )
+                .formLogin((form) -> form
+                        .loginPage("/login")
+                        .permitAll()
+                        .failureUrl("/login?error=BadCredentials")
+                        .defaultSuccessUrl("/bilet", true)
+                )
+                .logout((logout) -> logout
+                        .logoutUrl("/logout")
+                        .clearAuthentication(true)
+                        .invalidateHttpSession(true)
+                        .deleteCookies("JSESSIONID")
+                        .logoutSuccessUrl("/login")
+                )
+                .exceptionHandling((ex) -> ex
+                        .accessDeniedPage("/access_denied")
+                );
+
+        return http.build();
+    }
+
+
+
+    @Bean
+    public AuthenticationManager authManager(HttpSecurity http) throws Exception {
+        AuthenticationManagerBuilder authenticationManagerBuilder =
+                http.getSharedObject(AuthenticationManagerBuilder.class);
+        authenticationManagerBuilder.authenticationProvider(authProvider);
+        return authenticationManagerBuilder.build();
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Avtobus.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Avtobus.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Avtobus.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,24 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.util.List;
+import java.util.Objects;
+
+@Data
+@Entity
+public class Avtobus {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "a_registracija")
+    private String aRegistracija;
+    @Basic
+    @Column(name = "a_seriski_broj")
+    private String aSeriskiBroj;
+    @Basic
+    @Column(name = "a_broj_sedista")
+    private Short aBrojSedista;
+    @OneToMany(mappedBy = "avtobusByARegistracija")
+    private List<Instancanalinija> instancanalinijaList;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Bilet.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Bilet.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Bilet.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,39 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+import mk.ukim.finki.busngo.model.enums.BILET_STATUS;
+import org.hibernate.annotations.Type;
+
+import java.sql.Timestamp;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+@Data
+@Entity
+public class Bilet {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "b_id")
+    private Long BId;
+
+    @Basic
+    @Column(name = "b_datum_na_kupuvanje")
+    private Timestamp bDatumNaKupuvanje;
+
+    @Basic
+    @Column(name = "b_status", columnDefinition = "string_kratok")
+    @Enumerated(EnumType.STRING)
+    private BILET_STATUS bStatus;
+
+    @ManyToOne
+    @JoinColumn(name = "patnik_k_id", referencedColumnName = "k_id")
+    private Patnik korisnikByPatnikKId;
+
+    @ManyToOne
+    @JoinColumn(name = "tb_id", referencedColumnName = "tb_id")
+    private Tipbilet tipbiletByTbId;
+//    @OneToMany(mappedBy = "biletByBId")
+//    private List<Vozenje> vozenjesByBId;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Instancanalinija.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Instancanalinija.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Instancanalinija.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,37 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.sql.Timestamp;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+@Data
+@Entity
+public class Instancanalinija {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "inl_id")
+    private Long inlId;
+    @Basic
+    @Column(name = "inl_datum_start")
+    private Timestamp inlDatumStart;
+    @Basic
+    @Column(name = "inl_datum_end")
+    private Timestamp inlDatumEnd;
+    @ManyToOne
+    @JoinColumn(name = "vozac_k_id", referencedColumnName = "k_id", nullable = false)
+    private Vozac korisnikByVozacKId;
+    @ManyToOne
+    @JoinColumn(name = "a_registracija", referencedColumnName = "a_registracija")
+    private Avtobus avtobusByARegistracija;
+    @ManyToOne
+    @JoinColumn(name = "li_id", referencedColumnName = "li_id", nullable = false)
+    private Linija linijaByLiId;
+    @OneToMany(mappedBy = "instancanalinijaByInlId")
+    private List<Kontroli> kontrolisByInlId;
+    @OneToMany(mappedBy = "instancanalinijaByInlId")
+    private List<Vozenje> vozenjesByInlId;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kazna.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kazna.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kazna.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,51 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.sql.Timestamp;
+import java.util.Objects;
+
+@Data
+@Entity
+@Inheritance(strategy = InheritanceType.JOINED)
+public class Kazna {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "kz_id")
+    private Long kzId;
+
+    @Basic
+    @Column(name = "kz_iznos")
+    private Double kzIznos;
+
+    @Basic
+    @Column(name = "kz_plateno")
+    private Boolean kzPlateno;
+
+    @Basic
+    @Column(name = "kz_datum")
+    private Timestamp kzDatum;
+
+    @Basic
+    @Column(name = "kz_datum_plateno")
+    private Timestamp kzDatumPlateno;
+
+    @Basic
+    @Column(name = "kz_dokument")
+    private String kzDokument;
+
+    @ManyToOne
+    @JoinColumn(name = "kondukter_k_id", referencedColumnName = "k_id")
+    private Kondukter korisnikByKondukterKId;
+
+    @ManyToOne
+    @JoinColumn(name = "kontrola_id", referencedColumnName = "kontrola_id")
+    private Kontroli kontroliByKontrolaId;
+
+//    @OneToOne(mappedBy = "kaznaByKzId")
+//    private Kaznazaneregistriran kaznazaneregistriranByKzId;
+//
+//    @OneToOne(mappedBy = "kaznaByKzId")
+//    private Kaznazaregistriran kaznazaregistriranByKzId;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kaznazaneregistriran.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kaznazaneregistriran.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kaznazaneregistriran.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,22 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.util.Objects;
+
+@Data
+@Entity
+public class Kaznazaneregistriran extends Kazna {
+    @Basic
+    @Column(name = "kzn_telefon")
+    private String kznTelefon;
+
+    @Basic
+    @Column(name = "kzn_ime")
+    private String kznIme;
+
+    @Basic
+    @Column(name = "kzn_adresa")
+    private String kznAdresa;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kaznazaregistriran.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kaznazaregistriran.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kaznazaregistriran.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,14 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.util.Objects;
+
+@Data
+@Entity
+public class Kaznazaregistriran extends Kazna{
+    @ManyToOne
+    @JoinColumn(name = "patnik_k_id", referencedColumnName = "k_id")
+    private Patnik korisnikByPatnikKId;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kondukter.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kondukter.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kondukter.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,19 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+import java.util.Objects;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Entity
+public class Kondukter extends Vraboten{
+    @OneToMany(mappedBy = "korisnikByKondukterKId")
+    private List<Kazna> kaznasByKId;
+    @OneToMany(mappedBy = "korisnikByKondukterKId")
+    private List<Kontroli> kontrolisByKId;
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kontroli.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kontroli.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Kontroli.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,30 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.sql.Timestamp;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+@Data
+@Entity
+public class Kontroli {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "kontrola_id")
+    private Long kontrolaId;
+    @Basic
+    @Column(name = "kontrola_datum")
+    private Timestamp kontrolaDatum;
+    @OneToMany(mappedBy = "kontroliByKontrolaId")
+    private List<Kazna> kaznasByKontrolaId;
+    @ManyToOne
+    @JoinColumn(name = "kondukter_k_id", referencedColumnName = "k_id")
+    private Kondukter korisnikByKondukterKId;
+    @ManyToOne
+    @JoinColumn(name = "inl_id", referencedColumnName = "inl_id")
+    private Instancanalinija instancanalinijaByInlId;
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Korisnik.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Korisnik.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Korisnik.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,119 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+import mk.ukim.finki.busngo.model.enums.Role;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+
+@Data
+@Entity
+@Inheritance(strategy = InheritanceType.JOINED)
+public class Korisnik implements UserDetails {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "k_id")
+    private Long kId;
+
+    @Basic
+    @Column(name = "k_ime")
+    private String kIme;
+
+    @Basic
+    @Column(name = "k_adresa")
+    private String kAdresa;
+
+    @Basic
+    @Column(name = "k_telefon")
+    private String kTelefon;
+
+    @Basic
+    @Column(name = "k_email")
+    private String kEmail;
+
+    @Basic
+    @Column(name = "k_embg")
+    private String kEmbg;
+
+    @Basic
+    @Column(name = "k_is_admin")
+    private Boolean kIsAdmin;
+
+    @Basic
+    @Column(name = "k_lozinka")
+    private String kLozinka;
+
+    @Basic
+    @Column(name = "k_role")
+    @Enumerated(EnumType.STRING)
+    private Role kRole;
+
+//    @OneToMany(mappedBy = "korisnikByPatnikKId")
+//    private List<Bilet> biletsByKId;
+//    private boolean isAccountNonExpired = true;
+//    private boolean isAccountNonLocked = true;
+//    private boolean isCredentialsNonExpired =  true;
+//    private boolean isEnabled = true;
+
+
+    @Override
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        return Collections.singletonList(kRole);
+    }
+
+    @Override
+    public String getPassword() {
+        return kLozinka;
+    }
+
+    @Override
+    public String getUsername() {
+        return kEmail;
+    }
+
+    @Override
+    public boolean isAccountNonExpired() {
+        return true;
+    }
+
+    @Override
+    public boolean isAccountNonLocked() {
+        return true;
+    }
+
+    @Override
+    public boolean isCredentialsNonExpired() {
+        return true;
+    }
+
+    @Override
+    public boolean isEnabled() {
+        return true;
+    }
+
+
+//    @OneToMany(mappedBy = "korisnikByVozacKId")
+//    private List<Instancanalinija> instancanalinijasByKId;
+//    @OneToMany(mappedBy = "korisnikByKondukterKId")
+//    private List<Kazna> kaznasByKId;
+//    @OneToMany(mappedBy = "korisnikByPatnikKId")
+//    private List<Kaznazaregistriran> kaznazaregistriransByKId;
+//    @OneToOne(mappedBy = "korisnikByKId")
+//    private Kondukter kondukterByKId;
+//    @OneToMany(mappedBy = "korisnikByKondukterKId")
+//    private List<Kontroli> kontrolisByKId;
+//    @OneToOne(mappedBy = "korisnikByKId")
+//    private Patnik patnikByKId;
+//    @OneToOne(mappedBy = "korisnikByKId")
+//    private Vozac vozacByKId;
+//    @OneToMany(mappedBy = "korisnikByPatnikKId")
+//    private List<Vozenje> vozenjesByKId;
+//    @OneToOne(mappedBy = "korisnikByKId")
+//    private Vraboten vrabotenByKId;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Linija.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Linija.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Linija.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,29 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.lang.invoke.CallSite;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+@Data
+@Entity
+public class Linija {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "li_id")
+    private Integer liId;
+    @Basic
+    @Column(name = "li_ime")
+    private String liIme;
+    @Basic
+    @Column(name = "li_pravec")
+    private String liPravec;
+    @OneToMany(mappedBy = "linijaByLiId")
+    private List<Instancanalinija> instancanalinijasByLiId;
+    @OneToMany(mappedBy = "linijaByLiId")
+    private List<Postojkanalinija> postojkanalinijasByLiId;
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Mesto.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Mesto.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Mesto.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,28 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+@Data
+@Entity
+public class Mesto {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "m_id")
+    private Integer mId;
+    @Basic
+    @Column(name = "m_grad")
+    private String mGrad;
+    @Basic
+    @Column(name = "m_opstina")
+    private String mOpstina;
+    @Basic
+    @Column(name = "m_ulica")
+    private String mUlica;
+    @OneToMany(mappedBy = "mestoByMId")
+    private List<Postojka> postojkasByMId;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Patnik.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Patnik.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Patnik.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,22 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+import java.util.Objects;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Entity
+public class Patnik extends Korisnik {
+    @OneToMany(mappedBy = "korisnikByPatnikKId")
+    private List<Bilet> biletsByKId;
+
+    @OneToMany(mappedBy = "korisnikByPatnikKId")
+    private List<Kaznazaregistriran> kaznazaregistriransByKId;
+
+    @OneToMany(mappedBy = "korisnikByPatnikKId")
+    private List<Vozenje> vozenjesByKId;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Postojka.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Postojka.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Postojka.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,26 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+@Data
+@Entity
+public class Postojka {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "p_id")
+    private Integer pId;
+    @Basic
+    @Column(name = "p_ime")
+    private String pIme;
+    @ManyToOne
+    @JoinColumn(name = "m_id", referencedColumnName = "m_id")
+    private Mesto mestoByMId;
+    @OneToMany(mappedBy = "postojkaByPId")
+    private List<Postojkanalinija> postojkanalinijasByPId;
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Postojkanalinija.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Postojkanalinija.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Postojkanalinija.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,28 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+@Data
+@Entity
+public class Postojkanalinija {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "pnl_id")
+    private Long pnlId;
+    @Basic
+    @Column(name = "pnl_reden_broj")
+    private Short pnlRedenBroj;
+    @ManyToOne
+    @JoinColumn(name = "li_id", referencedColumnName = "li_id", nullable = false)
+    private Linija linijaByLiId;
+    @ManyToOne
+    @JoinColumn(name = "p_id", referencedColumnName = "p_id", nullable = false)
+    private Postojka postojkaByPId;
+    @OneToMany(mappedBy = "postojkanalinijaByKacuvaPnlId")
+    private List<Vozenje> vozenjesByPnlId;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/SeSimnuvaNa.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/SeSimnuvaNa.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/SeSimnuvaNa.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,17 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.util.Objects;
+
+@Data
+@Entity
+//@jakarta.persistence.Table(name = "se_simnuva_na", schema = "project", catalog = "db_202324z_va_prj_busngo")
+//@jakarta.persistence.IdClass(mk.ukim.finki.busngo.model.entities.SeSimnuvaNaPK.class)
+public class SeSimnuvaNa {
+    @EmbeddedId
+    private SeSimnuvaNaPK id;
+
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/SeSimnuvaNaPK.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/SeSimnuvaNaPK.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/SeSimnuvaNaPK.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,13 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.Embeddable;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+@Embeddable
+public class SeSimnuvaNaPK implements Serializable {
+    private Long vozenjeId;
+    private Long pnlId;
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Tipbilet.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Tipbilet.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Tipbilet.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,30 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+@Data
+@Entity
+public class Tipbilet {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "tb_id", columnDefinition = "serial")
+    private Long tbId;
+    @Basic
+    @Column(name = "tb_trajnost")
+    private Long tbTrajnost;
+    @Basic
+    @Column(name = "tb_cena")
+    private Float tbCena;
+    @Basic
+    @Column(name = "tb_ime")
+    private String tbIme;
+    @OneToMany(mappedBy = "tipbiletByTbId")
+    private List<Bilet> biletsByTbId;
+
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Vozac.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Vozac.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Vozac.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,17 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+import java.util.Objects;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Entity
+public class Vozac extends Vraboten {
+    @OneToMany(mappedBy = "korisnikByVozacKId")
+    private List<Instancanalinija> instancanalinijasByKId;
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Vozenje.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Vozenje.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Vozenje.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,40 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+import mk.ukim.finki.busngo.model.enums.VOZENJE_STATUS;
+
+import java.sql.Timestamp;
+import java.util.Objects;
+
+@Data
+@Entity
+public class Vozenje {
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Id
+    @Column(name = "vozenje_id")
+    private Long vozenjeId;
+    @Basic
+    @Column(name = "vozenje_start")
+    private Timestamp vozenjeStart;
+    @Basic
+    @Column(name = "vozenje_end")
+    private Timestamp vozenjeEnd;
+    @Basic
+    @Column(name = "vozenje_status")
+    @Enumerated(EnumType.STRING)
+    private VOZENJE_STATUS vozenjeStatus;
+    @ManyToOne
+    @JoinColumn(name = "patnik_k_id", referencedColumnName = "k_id")
+    private Patnik korisnikByPatnikKId;
+    @ManyToOne
+    @JoinColumn(name = "kacuva_pnl_id", referencedColumnName = "pnl_id", nullable = false)
+    private Postojkanalinija postojkanalinijaByKacuvaPnlId;
+    @ManyToOne
+    @JoinColumn(name = "inl_id", referencedColumnName = "inl_id", nullable = false)
+    private Instancanalinija instancanalinijaByInlId;
+    @ManyToOne
+    @JoinColumn(name = "b_id", referencedColumnName = "b_id", nullable = false)
+    private Bilet biletByBId;
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Vraboten.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Vraboten.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/entities/Vraboten.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,27 @@
+package mk.ukim.finki.busngo.model.entities;
+
+import jakarta.persistence.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+import java.sql.Date;
+import java.util.Objects;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Entity
+public class Vraboten extends Korisnik {
+    @Basic
+    @Column(name = "v_plata")
+    private Double vPlata;
+
+    @Basic
+    @Column(name = "v_datum_na_vrabotuvanje")
+    private Date vDatumNaVrabotuvanje;
+
+    @Basic
+    @Column(name = "v_datum_prekin_vrabotuvanje")
+    private Date vDatumPrekinVrabotuvanje;
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/BILET_STATUS.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/BILET_STATUS.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/BILET_STATUS.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.enums;
+
+public enum BILET_STATUS {
+    INACTIVE,
+    ACTIVE,
+    EXPIRED
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/Role.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/Role.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/Role.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,18 @@
+package mk.ukim.finki.busngo.model.enums;
+
+
+import org.springframework.security.core.GrantedAuthority;
+
+public enum Role implements GrantedAuthority {
+    ROLE_USER,
+    ROLE_PASSENGER,
+    ROLE_DRIVER,
+    ROLE_CONDUCTOR,
+    ROLE_ADMIN;
+
+
+    @Override
+    public String getAuthority() {
+        return name();
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/VOZENJE_STATUS.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/VOZENJE_STATUS.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/VOZENJE_STATUS.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,6 @@
+package mk.ukim.finki.busngo.model.enums;
+
+public enum VOZENJE_STATUS {
+    ACTIVE,
+    FINISHED
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/VrabotenType.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/VrabotenType.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/enums/VrabotenType.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.enums;
+
+public enum VrabotenType {
+    KONDUKTER,
+    VOZAC,
+    ADMIN
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidAvtobusRegistracijaException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidAvtobusRegistracijaException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidAvtobusRegistracijaException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidAvtobusRegistracijaException extends RuntimeException{
+    public InvalidAvtobusRegistracijaException() {
+        super("Invalid avtobus registracija!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidBiletIdException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidBiletIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidBiletIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidBiletIdException extends RuntimeException{
+    public InvalidBiletIdException() {
+        super("Invalid bilet id!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidCredentialsException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidCredentialsException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidCredentialsException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidCredentialsException extends RuntimeException{
+    public InvalidCredentialsException() {
+        super("The credentials entered are invalid!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidInstancaNaLinijaIdException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidInstancaNaLinijaIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidInstancaNaLinijaIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidInstancaNaLinijaIdException extends RuntimeException{
+    public InvalidInstancaNaLinijaIdException() {
+        super("Invalid instanca na linija id!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidLinijaIdException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidLinijaIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidLinijaIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidLinijaIdException extends RuntimeException{
+    public InvalidLinijaIdException() {
+        super("Invalid linija id!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidPatnikIdException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidPatnikIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidPatnikIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidPatnikIdException extends RuntimeException{
+    public InvalidPatnikIdException() {
+        super("The given patnik id does not exist!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidPostojkaNaLinijaIdException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidPostojkaNaLinijaIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidPostojkaNaLinijaIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidPostojkaNaLinijaIdException extends RuntimeException {
+    public InvalidPostojkaNaLinijaIdException() {
+        super("Invalid postoja na linija id!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidTipBiletIdException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidTipBiletIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidTipBiletIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidTipBiletIdException extends RuntimeException{
+    public InvalidTipBiletIdException() {
+        super("Invalid tipbilet id!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidUserId.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidUserId.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidUserId.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidUserId extends RuntimeException{
+    public InvalidUserId() {
+        super("The iven user id does not exist!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidVozacIdException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidVozacIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidVozacIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidVozacIdException extends RuntimeException{
+    public InvalidVozacIdException() {
+        super("Invalid vozac id!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidVozenjeIdException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidVozenjeIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/InvalidVozenjeIdException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class InvalidVozenjeIdException extends RuntimeException{
+    public InvalidVozenjeIdException() {
+        super("Inavlid vozenje id!");
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/UnauthorizedAccess.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/UnauthorizedAccess.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/UnauthorizedAccess.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class UnauthorizedAccess extends RuntimeException {
+    public UnauthorizedAccess(String message) {
+        super(message);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/UserAlreadyExistsException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/UserAlreadyExistsException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/UserAlreadyExistsException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class UserAlreadyExistsException extends RuntimeException{
+    public UserAlreadyExistsException(String message) {
+        super(message);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/UserShouldNotBeTicketedException.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/UserShouldNotBeTicketedException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/model/exceptions/UserShouldNotBeTicketedException.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class UserShouldNotBeTicketedException extends RuntimeException{
+    public UserShouldNotBeTicketedException(String message) {
+        super(message);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/AvtobusRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/AvtobusRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/AvtobusRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,12 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Avtobus;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.Optional;
+
+public interface AvtobusRepository extends JpaRepository<Avtobus, Long> {
+    @Query("select a from Avtobus a where a.aRegistracija = ?1")
+    Optional<Avtobus> findByARegistracija(String registracija);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/BiletRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/BiletRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/BiletRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,18 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Bilet;
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.enums.BILET_STATUS;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+import java.util.Optional;
+
+
+public interface BiletRepository extends JpaRepository<Bilet, Long> {
+//    List<Bilet> findAllByKorisnikByPatnikKIdAndBStatus(Korisnik korisnik, BILET_STATUS status);
+//    List<Bilet> findAllByKorisnikByPatnikKId(Korisnik korisnik);
+    Optional<Bilet> findByBIdAndAndKorisnikByPatnikKId(Long bid, Patnik patnik);
+//    List<Bilet> findAllByKorisnikByPatnikKIdAndBStatus(Patnik patnik, BILET_STATUS status);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/InstancaNaLinijaRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/InstancaNaLinijaRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/InstancaNaLinijaRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,13 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Instancanalinija;
+import mk.ukim.finki.busngo.model.entities.Linija;
+import mk.ukim.finki.busngo.service.LinijaService;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+
+public interface InstancaNaLinijaRepository extends JpaRepository<Instancanalinija, Long> {
+    List<Instancanalinija> findAllByLinijaByLiIdAndInlDatumEndIsNull(Linija linija);
+    List<Instancanalinija> findAllByInlDatumEndIsNull();
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KaznaRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KaznaRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KaznaRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,13 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Kazna;
+import mk.ukim.finki.busngo.model.entities.Kontroli;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.repository.NoRepositoryBean;
+
+import java.util.List;
+
+
+public interface KaznaRepository extends JpaRepository<Kazna, Long> {
+    List<Kazna> findAllByKontroliByKontrolaId(Kontroli kontroli);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KaznaZaNeregistriranRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KaznaZaNeregistriranRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KaznaZaNeregistriranRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Kaznazaneregistriran;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface KaznaZaNeregistriranRepository extends JpaRepository<Kaznazaneregistriran, Long> {
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KaznaZaRegistriranRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KaznaZaRegistriranRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KaznaZaRegistriranRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,11 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Kaznazaregistriran;
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+
+public interface KaznaZaRegistriranRepository extends JpaRepository<Kaznazaregistriran, Long> {
+    List<Kaznazaregistriran> findAllByKorisnikByPatnikKId(Patnik patnik);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KondukterRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KondukterRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KondukterRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,13 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Kondukter;
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.Optional;
+
+public interface KondukterRepository extends JpaRepository<Kondukter, Long> {
+    @Query("SELECT p from Kondukter p where p.kEmail = ?1")
+    Optional<Kondukter> findByKEmail(String email);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KontrolaRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KontrolaRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KontrolaRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,11 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Instancanalinija;
+import mk.ukim.finki.busngo.model.entities.Kontroli;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+
+public interface KontrolaRepository extends JpaRepository<Kontroli, Long> {
+    List<Kontroli> findAllByInstancanalinijaByInlId(Instancanalinija inl);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KorisnikRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KorisnikRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/KorisnikRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,17 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import org.aspectj.apache.bcel.classfile.Module;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.NoRepositoryBean;
+
+import java.util.Optional;
+
+
+public interface KorisnikRepository extends JpaRepository<Korisnik, Long> {
+    @Query("SELECT k FROM Korisnik k WHERE k.kEmail = ?1 and k.kLozinka = ?2")
+    Optional<Korisnik> findByKEmailAndKLozinka(String kEmail, String kLozinka);
+    @Query("SELECT k FROM Korisnik k WHERE k.kEmail = ?1")
+    Optional<Korisnik> findByKEmail(String kEmail);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/LinijaRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/LinijaRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/LinijaRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Linija;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface LinijaRepository extends JpaRepository<Linija, Long> {
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/PatnikRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/PatnikRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/PatnikRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,14 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Optional;
+
+public interface PatnikRepository extends JpaRepository<Patnik, Long> {
+    @Query("SELECT p from Patnik p where p.kEmail = ?1")
+    Optional<Patnik> findByKEmail(String email);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/PostojkaNaLinijaRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/PostojkaNaLinijaRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/PostojkaNaLinijaRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,14 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Linija;
+import mk.ukim.finki.busngo.model.entities.Postojkanalinija;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.query.Jpa21Utils;
+
+import java.util.List;
+import java.util.Optional;
+
+public interface PostojkaNaLinijaRepository extends JpaRepository<Postojkanalinija, Long> {
+    List<Postojkanalinija> findAllByLinijaByLiId(Linija linija);
+    List<Postojkanalinija> findAllByLinijaByLiIdAndPnlRedenBrojGreaterThan(Linija linija, Short redenBroj);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/TipBIletRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/TipBIletRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/TipBIletRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,8 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Tipbilet;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface TipBIletRepository extends JpaRepository<Tipbilet, Long> {
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/VozacRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/VozacRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/VozacRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,14 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.entities.Vozac;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.Optional;
+
+public interface VozacRepository extends JpaRepository<Vozac, Long> {
+
+    @Query("SELECT v from Vozac v where v.kEmail = ?1")
+    Optional<Vozac> findByKEmail(String email);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/VozenjeRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/VozenjeRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/VozenjeRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,13 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.entities.Vozenje;
+import mk.ukim.finki.busngo.model.enums.VOZENJE_STATUS;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+
+public interface VozenjeRepository extends JpaRepository<Vozenje, Long> {
+    List<Vozenje> findAllByKorisnikByPatnikKId(Patnik patnik);
+    List<Vozenje> findAllByKorisnikByPatnikKIdAndAndVozenjeStatus(Patnik patnik, VOZENJE_STATUS vozenjeStatus);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/VrabotrenRepository.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/VrabotrenRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/repository/VrabotrenRepository.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,8 @@
+package mk.ukim.finki.busngo.repository;
+
+import mk.ukim.finki.busngo.model.entities.Vraboten;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface VrabotrenRepository extends JpaRepository<Vraboten, Long> {
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/AuthService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/AuthService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/AuthService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,13 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.enums.Role;
+import mk.ukim.finki.busngo.model.enums.VrabotenType;
+
+public interface AuthService {
+    Korisnik login(String email, String password);
+    Korisnik registerPatnik(String ime, String email, String password, String confirmPassword, String address, String telefon);
+    Korisnik registerVraboten(String ime, String email, String password, String confirmPassword, String address, String telefon, VrabotenType type, Double salary);
+
+    Korisnik register(String name, String email, String password, String confirmPassword, String address, String phone, Role role, Double salary);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/AvtobusService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/AvtobusService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/AvtobusService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,12 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Avtobus;
+import mk.ukim.finki.busngo.repository.AvtobusRepository;
+
+import java.util.List;
+
+public interface AvtobusService {
+    List<Avtobus> findAll();
+
+    Avtobus findById(String aRegistracija);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/BiletService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/BiletService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/BiletService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,27 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Bilet;
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.enums.BILET_STATUS;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+public interface BiletService {
+    List<Bilet> listAll();
+    List<Bilet> findAllByPatnikId(Long id);
+    List<Bilet> findAllByPatnikIdAndStatus(Long id, BILET_STATUS status);
+
+    Bilet buy(Long tipbilet, LocalDateTime now, BILET_STATUS biletStatus, String name);
+
+    List<Bilet> findAllByPatnikEmail(String email);
+//    List<Bilet> findAllByPatnikEmailACTIVE(String email);
+    Bilet findBybIdAndPatnikEmail(Long bId, String email);
+
+    Bilet activate(Long bId);
+    Bilet findById(Long bId);
+    Bilet finish(Long bId);
+
+    boolean checkExpiration(Long bId);
+//    void encode();
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/InstancaNaLinijaService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/InstancaNaLinijaService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/InstancaNaLinijaService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,17 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Instancanalinija;
+
+import javax.swing.event.ListDataEvent;
+import java.time.LocalDateTime;
+import java.util.List;
+
+public interface InstancaNaLinijaService {
+    List<Instancanalinija> findAll();
+    Instancanalinija findById(Long inlId);
+    Instancanalinija start(Long liId, String a_registracija, String email);
+    Instancanalinija end(Long inlId, String email);
+    List<Instancanalinija> findAllActive();
+
+    List<Instancanalinija> findByPnlId(Long pnlId);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KaznaService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KaznaService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KaznaService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,12 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Kazna;
+
+import java.util.List;
+
+public interface KaznaService {
+    List<Kazna> findAll();
+    List<Kazna> findAllByKontrolaId(Long kontrolaId);
+    Kazna pay(Long kaznaId);
+    Kazna findById(Long id);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KaznaZaNeregistriranService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KaznaZaNeregistriranService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KaznaZaNeregistriranService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,20 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Kaznazaneregistriran;
+import mk.ukim.finki.busngo.model.entities.Kaznazaregistriran;
+import org.springframework.security.core.Authentication;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+
+public interface KaznaZaNeregistriranService {
+    List<Kaznazaneregistriran> findAll();
+    Kaznazaneregistriran findById(Long id);
+    Kaznazaneregistriran create(Long kontrolaId,
+                                 String dokument,
+                                Double iznos,
+                                 String telefon,
+                                 String ime,
+                                 String adresa,
+                                String email);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KaznaZaRegistriranService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KaznaZaRegistriranService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KaznaZaRegistriranService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,15 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Kazna;
+import mk.ukim.finki.busngo.model.entities.Kaznazaregistriran;
+import mk.ukim.finki.busngo.model.exceptions.UserShouldNotBeTicketedException;
+
+import java.util.List;
+
+public interface KaznaZaRegistriranService {
+    List<Kaznazaregistriran> findAllByPatnik(String email);
+
+    Kaznazaregistriran create(Long kontrolaId, String dokument, Double iznos, Long patnik, String email) throws UserShouldNotBeTicketedException;
+    Kaznazaregistriran pay(Long kaznaId);
+    Kaznazaregistriran findById(Long id);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KondukterService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KondukterService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KondukterService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,10 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Kondukter;
+
+import java.util.List;
+
+public interface KondukterService {
+    List<Kondukter> findAll();
+    Kondukter findByEmail(String email);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KontrolaService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KontrolaService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KontrolaService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,14 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Kontroli;
+
+import java.util.List;
+
+public interface KontrolaService {
+    List<Kontroli> findAll();
+    Kontroli create(Long inlId, String email);
+
+    Kontroli findById(Long kontrolaId);
+
+    List<Kontroli> findAllByInl(Long inlId);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KorisnikService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KorisnikService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/KorisnikService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,14 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.enums.Role;
+
+
+import java.util.List;
+
+public interface KorisnikService {
+    List<Korisnik> listAll();
+    Korisnik findById(Long id);
+    Korisnik loadUserByEmail(String email);
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/LinijaService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/LinijaService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/LinijaService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,11 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Linija;
+
+import java.util.List;
+
+public interface LinijaService {
+    List<Linija> findAll();
+
+    Linija findById(Long liId);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/PatnikService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/PatnikService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/PatnikService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Bilet;
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.entities.Patnik;
+
+import java.util.List;
+
+public interface PatnikService {
+    List<Patnik> listAll();
+    Patnik findById(Long id);
+    Patnik loadUserByEmail(String email);
+
+    Patnik save(Korisnik korisnik);
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/PostojkaNaLinijaService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/PostojkaNaLinijaService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/PostojkaNaLinijaService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,12 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Postojkanalinija;
+
+import java.util.List;
+
+public interface PostojkaNaLinijaService {
+    List<Postojkanalinija> findAll();
+    Postojkanalinija findById(Long id);
+    List<Postojkanalinija> findByLinija(Long liId);
+    List<Postojkanalinija> findByLinijaAfterRedenBroj(Long liId, Short redenBroj);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/TipBiletService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/TipBiletService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/TipBiletService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,9 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Tipbilet;
+
+import java.util.List;
+
+public interface TipBiletService {
+    List<Tipbilet> listAll();
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/VozacService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/VozacService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/VozacService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,11 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Vozac;
+import mk.ukim.finki.busngo.repository.VozacRepository;
+
+import java.util.List;
+
+public interface VozacService {
+    List<Vozac> findAll();
+    Vozac findByEmail(String email);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/VozenjeService.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/VozenjeService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/VozenjeService.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,14 @@
+package mk.ukim.finki.busngo.service;
+
+import mk.ukim.finki.busngo.model.entities.Vozenje;
+import mk.ukim.finki.busngo.model.enums.VOZENJE_STATUS;
+
+import java.util.List;
+
+public interface VozenjeService {
+    List<Vozenje> findVozenjaByPatnik(String email);
+    List<Vozenje> findVozenjaByPatnikAndStatus(String email, VOZENJE_STATUS status);
+    Vozenje start(String email, Long bId, Long pnlId, Long inlId);
+    Vozenje end(Long vozenjeId, Long pnlId);
+    Vozenje findById(Long id);
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/AuthServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/AuthServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/AuthServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,182 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Kondukter;
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.entities.Vozac;
+import mk.ukim.finki.busngo.model.enums.Role;
+import mk.ukim.finki.busngo.model.enums.VrabotenType;
+import mk.ukim.finki.busngo.model.exceptions.InvalidCredentialsException;
+import mk.ukim.finki.busngo.model.exceptions.UserAlreadyExistsException;
+import mk.ukim.finki.busngo.repository.KondukterRepository;
+import mk.ukim.finki.busngo.repository.KorisnikRepository;
+import mk.ukim.finki.busngo.repository.PatnikRepository;
+import mk.ukim.finki.busngo.repository.VozacRepository;
+import mk.ukim.finki.busngo.service.*;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.stereotype.Service;
+
+import java.sql.Date;
+import java.time.LocalDate;
+
+@Service
+public class AuthServiceImpl implements AuthService {
+    private final KorisnikRepository korisnikRepository;
+    private final PatnikRepository patnikRepository;
+    private final VozacRepository vozacRepository;
+    private final KondukterRepository kondukterRepository;
+    private final PasswordEncoder passwordEncoder;
+    private final PatnikService patnikService;
+    private final KondukterService kondukterService;
+    private final VozacService vozacService;
+
+    public AuthServiceImpl(KorisnikRepository korisnikRepository, PatnikRepository patnikRepository, VozacRepository vozacRepository, KondukterRepository kondukterRepository, PasswordEncoder passwordEncoder, PatnikService patnikService, KondukterService kondukterService, VozacService vozacService) {
+        this.korisnikRepository = korisnikRepository;
+        this.patnikRepository = patnikRepository;
+        this.vozacRepository = vozacRepository;
+        this.kondukterRepository = kondukterRepository;
+        this.passwordEncoder = passwordEncoder;
+        this.patnikService = patnikService;
+        this.kondukterService = kondukterService;
+        this.vozacService = vozacService;
+    }
+
+    @Override
+    public Korisnik login(String email, String password) {
+        if(email == null || password == null || email.isEmpty() || password.isEmpty())
+            throw new InvalidCredentialsException();
+        return korisnikRepository.findByKEmailAndKLozinka(email, password).orElseThrow(InvalidCredentialsException::new);
+    }
+
+    @Override
+    public Korisnik registerPatnik(String ime, String email, String password, String confirmPassword, String address, String telefon) {
+        if (email == null || password == null || email.isEmpty() || password.isEmpty()) {
+            throw new InvalidCredentialsException();
+        }
+
+        if (!password.equals(confirmPassword)) {
+            throw new InvalidCredentialsException();
+        }
+
+        if(this.korisnikRepository.findByKEmail(email).isPresent()) {
+            throw new UserAlreadyExistsException(email);
+        }
+
+        Patnik korisnik = new Patnik();
+        korisnik.setKIme(ime);
+        korisnik.setKAdresa(address);
+        korisnik.setKLozinka(passwordEncoder.encode(password));
+        korisnik.setKEmail(email);
+        korisnik.setKTelefon(telefon);
+        korisnik.setKIsAdmin(false);
+
+        return patnikRepository.save(korisnik);
+    }
+
+    @Override
+    public Korisnik registerVraboten(String ime, String email, String password, String confirmPassword, String address, String telefon, VrabotenType type, Double salary) {
+        if (email == null || password == null || email.isEmpty() || password.isEmpty()) {
+            throw new InvalidCredentialsException();
+        }
+
+        if (!password.equals(confirmPassword)) {
+            throw new InvalidCredentialsException();
+        }
+
+        if(this.korisnikRepository.findByKEmail(email).isPresent()) {
+            throw new UserAlreadyExistsException(email);
+        }
+
+
+        switch (type){
+            case ADMIN:
+                Korisnik korisnik = new Korisnik();
+                korisnik.setKIme(ime);
+                korisnik.setKAdresa(address);
+                korisnik.setKLozinka(passwordEncoder.encode(password));
+                korisnik.setKEmail(email);
+                korisnik.setKTelefon(telefon);
+                korisnik.setKIsAdmin(true);
+                return korisnikRepository.save(korisnik);
+            case VOZAC:
+                Vozac vozac = new Vozac();
+                vozac.setKIme(ime);
+                vozac.setKAdresa(address);
+                vozac.setKLozinka(passwordEncoder.encode(password));
+                vozac.setKEmail(email);
+                vozac.setKTelefon(telefon);
+                vozac.setKIsAdmin(false);
+                vozac.setVPlata(salary);
+                vozac.setVDatumNaVrabotuvanje(Date.valueOf(LocalDate.now()));
+                this.korisnikRepository.save(vozac);
+
+                return vozacRepository.save(vozac);
+            case KONDUKTER:
+                Kondukter kondukter = new Kondukter();
+                kondukter.setKIme(ime);
+                kondukter.setKAdresa(address);
+                kondukter.setKLozinka(passwordEncoder.encode(password));
+                kondukter.setKEmail(email);
+                kondukter.setKTelefon(telefon);
+                kondukter.setKIsAdmin(false);
+                kondukter.setVPlata(salary);
+                kondukter.setVDatumNaVrabotuvanje(Date.valueOf(LocalDate.now()));
+                this.korisnikRepository.save(kondukter);
+
+                return kondukterRepository.save(kondukter);
+        }
+        return null;
+    }
+
+    @Override
+    public Korisnik register(String name, String email, String password, String confirmPassword, String address, String phone, Role role, Double salary) {
+        if (email == null || password == null || email.isEmpty() || password.isEmpty()) {
+            throw new InvalidCredentialsException();
+        }
+
+        if(!password.equals(confirmPassword)){
+            throw new InvalidCredentialsException();
+        }
+
+        if(role.equals(Role.ROLE_DRIVER)){
+            Vozac vozac = new Vozac();
+            vozac.setKIme(name);
+            vozac.setKAdresa(address);
+            vozac.setKLozinka(passwordEncoder.encode(password));
+            vozac.setKEmail(email);
+            vozac.setKTelefon(phone);
+            vozac.setKIsAdmin(role.equals(Role.ROLE_ADMIN));
+            vozac.setKRole(role);
+            vozac.setVPlata(salary != null ? salary : 0.0);
+            vozac.setVDatumNaVrabotuvanje(Date.valueOf(LocalDate.now()));
+            this.korisnikRepository.save(vozac);
+            return vozacRepository.save(vozac);
+        } else if(role.equals(Role.ROLE_CONDUCTOR)){
+            Kondukter kondukter = new Kondukter();
+            kondukter.setKIme(name);
+            kondukter.setKAdresa(address);
+            kondukter.setKLozinka(passwordEncoder.encode(password));
+            kondukter.setKEmail(email);
+            kondukter.setKTelefon(phone);
+            kondukter.setKIsAdmin(role.equals(Role.ROLE_ADMIN));
+            kondukter.setKRole(role);
+            kondukter.setVPlata(salary != null ? salary : 0.0);
+            kondukter.setVDatumNaVrabotuvanje(Date.valueOf(LocalDate.now()));
+            this.korisnikRepository.save(kondukter);
+            return kondukterRepository.save(kondukter);
+        } else {
+            Patnik patnik = new Patnik();
+            patnik.setKIme(name);
+            patnik.setKAdresa(address);
+            patnik.setKLozinka(passwordEncoder.encode(password));
+            patnik.setKEmail(email);
+            patnik.setKTelefon(phone);
+            patnik.setKIsAdmin(role.equals(Role.ROLE_ADMIN));
+            patnik.setKRole(role);
+            this.korisnikRepository.save(patnik);
+            return patnikRepository.save(patnik);
+        }
+    }
+
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/AvtobusServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/AvtobusServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/AvtobusServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,28 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Avtobus;
+import mk.ukim.finki.busngo.model.exceptions.InvalidAvtobusRegistracijaException;
+import mk.ukim.finki.busngo.repository.AvtobusRepository;
+import mk.ukim.finki.busngo.service.AvtobusService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class AvtobusServiceImpl implements AvtobusService {
+    private final AvtobusRepository avtobusRepository;
+
+    public AvtobusServiceImpl(AvtobusRepository avtobusRepository) {
+        this.avtobusRepository = avtobusRepository;
+    }
+
+    @Override
+    public List<Avtobus> findAll() {
+        return avtobusRepository.findAll();
+    }
+
+    @Override
+    public Avtobus findById(String aRegistracija) {
+        return avtobusRepository.findByARegistracija(aRegistracija).orElseThrow(InvalidAvtobusRegistracijaException::new);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/BiletServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/BiletServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/BiletServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,135 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Bilet;
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.entities.Tipbilet;
+import mk.ukim.finki.busngo.model.enums.BILET_STATUS;
+import mk.ukim.finki.busngo.model.exceptions.InvalidBiletIdException;
+import mk.ukim.finki.busngo.model.exceptions.InvalidTipBiletIdException;
+import mk.ukim.finki.busngo.repository.BiletRepository;
+import mk.ukim.finki.busngo.repository.KorisnikRepository;
+import mk.ukim.finki.busngo.repository.TipBIletRepository;
+import mk.ukim.finki.busngo.service.BiletService;
+import mk.ukim.finki.busngo.service.KorisnikService;
+import mk.ukim.finki.busngo.service.PatnikService;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.stereotype.Service;
+import org.thymeleaf.expression.Lists;
+
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class BiletServiceImpl implements BiletService {
+    private final BiletRepository biletRepository;
+    private final KorisnikService korisnikService;
+    private final TipBIletRepository tipBIletRepository;
+    private final PatnikService patnikService;
+    private final PasswordEncoder passwordEncoder;
+    private final KorisnikRepository korisnikRepository;
+
+    public BiletServiceImpl(BiletRepository biletRepository, KorisnikService korisnikService, TipBIletRepository tipBIletRepository, PatnikService patnikService, PasswordEncoder passwordEncoder, KorisnikRepository korisnikRepository) {
+        this.biletRepository = biletRepository;
+        this.korisnikService = korisnikService;
+        this.tipBIletRepository = tipBIletRepository;
+        this.patnikService = patnikService;
+        this.passwordEncoder = passwordEncoder;
+        this.korisnikRepository = korisnikRepository;
+    }
+
+    @Override
+    public List<Bilet> listAll() {
+        return biletRepository.findAll();
+    }
+
+    @Override
+    public List<Bilet> findAllByPatnikId(Long id) {
+        Patnik patnik = patnikService.findById(id);
+        return patnik.getBiletsByKId();
+    }
+
+    @Override
+    public List<Bilet> findAllByPatnikIdAndStatus(Long id, BILET_STATUS status) {
+        Korisnik korisnik = korisnikService.findById(id);
+        return new ArrayList<>();
+    }
+
+    @Override
+    public Bilet buy(Long tipbilet, LocalDateTime now, BILET_STATUS biletStatus, String name) {
+        Tipbilet tipbilet1 = tipBIletRepository.findById(tipbilet).orElseThrow(InvalidTipBiletIdException::new);
+        Patnik korisnik = patnikService.loadUserByEmail(name);
+        Bilet bilet = new Bilet();
+        bilet.setBStatus(biletStatus);
+        bilet.setTipbiletByTbId(tipbilet1);
+        bilet.setBDatumNaKupuvanje(Timestamp.valueOf(now));
+        bilet.setKorisnikByPatnikKId(korisnik);
+        return biletRepository.save(bilet);
+    }
+
+    @Override
+    public List<Bilet> findAllByPatnikEmail(String email) {
+        Patnik patnik = patnikService.loadUserByEmail(email);
+        return patnik.getBiletsByKId();
+    }
+
+//    @Override
+//    public List<Bilet> findAllByPatnikEmailACTIVE(String email) {
+//        Patnik patnik = patnikService.loadUserByEmail(email);
+//        List<Bilet> allByKorisnikByPatnikKIdAndBStatus = biletRepository.findAllByKorisnikByPatnikKIdAndBStatus(patnik, BILET_STATUS.ACTIVE);
+//        List<Bilet> allByKorisnikByPatnikKIdAndBStatus1 = biletRepository.findAllByKorisnikByPatnikKIdAndBStatus(patnik, BILET_STATUS.INACTIVE);
+//        allByKorisnikByPatnikKIdAndBStatus1.addAll(allByKorisnikByPatnikKIdAndBStatus);
+//        return allByKorisnikByPatnikKIdAndBStatus1;
+//    }
+
+    @Override
+    public Bilet findBybIdAndPatnikEmail(Long bId, String email) {
+        Patnik patnik = patnikService.loadUserByEmail(email);
+        return biletRepository.findByBIdAndAndKorisnikByPatnikKId(bId, patnik).orElseThrow(InvalidBiletIdException::new);
+    }
+
+    @Override
+    public Bilet activate(Long bId) {
+        Bilet bilet = this.findById(bId);
+        bilet.setBStatus(BILET_STATUS.ACTIVE);
+        return biletRepository.save(bilet);
+    }
+
+    @Override
+    public Bilet findById(Long bId) {
+        return biletRepository.findById(bId).orElseThrow(RuntimeException::new);
+    }
+
+    @Override
+    public Bilet finish(Long bId) {
+        Bilet bilet = this.findById(bId);
+        bilet.setBStatus(BILET_STATUS.EXPIRED);
+        return biletRepository.save(bilet);
+    }
+
+    @Override
+    public boolean checkExpiration(Long bId) {
+        Bilet bilet = this.findById(bId);
+        LocalDateTime timeBought = bilet.getBDatumNaKupuvanje().toLocalDateTime();
+
+        if(timeBought.plusSeconds(bilet.getTipbiletByTbId().getTbTrajnost()).isBefore(LocalDateTime.now())){
+            bilet.setBStatus(BILET_STATUS.EXPIRED);
+            biletRepository.save(bilet);
+            return true;
+        }
+
+        return false;
+    }
+
+//    @Override
+//    public void encode(){
+//        List<Korisnik> all = korisnikRepository.findAll();
+//        all.forEach(p -> p.setKLozinka(passwordEncoder.encode(p.getKLozinka())));
+//        korisnikRepository.saveAll(all);
+//        System.out.println("DONE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+//    }
+
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/InstancaNaLinijaServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/InstancaNaLinijaServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/InstancaNaLinijaServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,72 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.*;
+import mk.ukim.finki.busngo.model.exceptions.InvalidInstancaNaLinijaIdException;
+import mk.ukim.finki.busngo.repository.InstancaNaLinijaRepository;
+import mk.ukim.finki.busngo.service.*;
+import org.springframework.stereotype.Service;
+
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Service
+public class InstancaNaLinijaServiceImpl implements InstancaNaLinijaService{
+    private final InstancaNaLinijaRepository instancaNaLinijaRepository;
+    private final VozacService vozacService;
+    private final AvtobusService avtobusService;
+    private final LinijaService linijaService;
+    private final PostojkaNaLinijaService postojkaNaLinijaService;
+
+    public InstancaNaLinijaServiceImpl(InstancaNaLinijaRepository instancaNaLinijaRepository, VozacService vozacService, AvtobusService avtobusService, LinijaService linijaService, PostojkaNaLinijaService postojkaNaLinijaService) {
+        this.instancaNaLinijaRepository = instancaNaLinijaRepository;
+        this.vozacService = vozacService;
+        this.avtobusService = avtobusService;
+        this.linijaService = linijaService;
+        this.postojkaNaLinijaService = postojkaNaLinijaService;
+    }
+
+    @Override
+    public List<Instancanalinija> findAll() {
+        return instancaNaLinijaRepository.findAll();
+    }
+
+    @Override
+    public Instancanalinija findById(Long inlId) {
+        return instancaNaLinijaRepository.findById(inlId).orElseThrow(InvalidInstancaNaLinijaIdException::new);
+    }
+
+    @Override
+    public Instancanalinija start(Long liId, String a_registracija, String email) {
+        Linija linija = linijaService.findById(liId);
+        Avtobus avtobus = avtobusService.findById(a_registracija);
+        Vozac vozac = vozacService.findByEmail(email);
+        Instancanalinija instancanalinija = new Instancanalinija();
+        instancanalinija.setLinijaByLiId(linija);
+        instancanalinija.setAvtobusByARegistracija(avtobus);
+        instancanalinija.setKorisnikByVozacKId(vozac);
+        instancanalinija.setInlDatumStart(Timestamp.valueOf(LocalDateTime.now()));
+
+        return instancaNaLinijaRepository.save(instancanalinija);
+    }
+
+    @Override
+    public Instancanalinija end(Long inlId, String email) {
+        Vozac vozac = vozacService.findByEmail(email);
+        Instancanalinija instancanalinija = this.findById(inlId);
+        instancanalinija.setInlDatumEnd(Timestamp.valueOf(LocalDateTime.now()));
+        return instancaNaLinijaRepository.save(instancanalinija);
+    }
+
+    @Override
+    public List<Instancanalinija> findAllActive() {
+        return instancaNaLinijaRepository.findAllByInlDatumEndIsNull();
+    }
+
+    @Override
+    public List<Instancanalinija> findByPnlId(Long pnlId) {
+        Postojkanalinija postojkanalinija = postojkaNaLinijaService.findById(pnlId);
+        Linija linijaByLiId = postojkanalinija.getLinijaByLiId();
+        return instancaNaLinijaRepository.findAllByLinijaByLiIdAndInlDatumEndIsNull(linijaByLiId);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KaznaServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KaznaServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KaznaServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,47 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Kazna;
+import mk.ukim.finki.busngo.model.entities.Kontroli;
+import mk.ukim.finki.busngo.repository.KaznaRepository;
+import mk.ukim.finki.busngo.service.KaznaService;
+import mk.ukim.finki.busngo.service.KontrolaService;
+import org.springframework.stereotype.Service;
+
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Service
+public class KaznaServiceImpl implements KaznaService {
+    private final KaznaRepository kaznaRepository;
+    private final KontrolaService kontrolaService;
+
+    public KaznaServiceImpl(KaznaRepository kaznaRepository, KontrolaService kontrolaService) {
+        this.kaznaRepository = kaznaRepository;
+        this.kontrolaService = kontrolaService;
+    }
+
+    @Override
+    public List<Kazna> findAll() {
+        return kaznaRepository.findAll();
+    }
+
+    @Override
+    public List<Kazna> findAllByKontrolaId(Long kontrolaId) {
+        Kontroli kontroli = kontrolaService.findById(kontrolaId);
+        return kaznaRepository.findAllByKontroliByKontrolaId(kontroli);
+    }
+
+    @Override
+    public Kazna pay(Long kaznaId) {
+        Kazna kazna = this.findById(kaznaId);
+        kazna.setKzPlateno(true);
+        kazna.setKzDatumPlateno(Timestamp.valueOf(LocalDateTime.now()));
+        return kaznaRepository.save(kazna);
+    }
+
+    @Override
+    public Kazna findById(Long id) {
+        return kaznaRepository.findById(id).orElseThrow(RuntimeException::new);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KaznaZaNeregistriranServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KaznaZaNeregistriranServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KaznaZaNeregistriranServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,53 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Kaznazaneregistriran;
+import mk.ukim.finki.busngo.model.entities.Kondukter;
+import mk.ukim.finki.busngo.model.entities.Kontroli;
+import mk.ukim.finki.busngo.repository.KaznaZaNeregistriranRepository;
+import mk.ukim.finki.busngo.service.KaznaZaNeregistriranService;
+import mk.ukim.finki.busngo.service.KondukterService;
+import mk.ukim.finki.busngo.service.KontrolaService;
+import org.springframework.stereotype.Service;
+
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.List;
+@Service
+public class KaznaZaNeregistriranServiceImpl implements KaznaZaNeregistriranService {
+    private final KaznaZaNeregistriranRepository kaznaZaNeregistriranRepository;
+    private final KontrolaService kontrolaService;
+    private final KondukterService kondukterService;
+
+    public KaznaZaNeregistriranServiceImpl(KaznaZaNeregistriranRepository kaznaZaNeregistriranRepository, KontrolaService kontrolaService, KondukterService kondukterService) {
+        this.kaznaZaNeregistriranRepository = kaznaZaNeregistriranRepository;
+        this.kontrolaService = kontrolaService;
+        this.kondukterService = kondukterService;
+    }
+
+    @Override
+    public List<Kaznazaneregistriran> findAll() {
+        return kaznaZaNeregistriranRepository.findAll();
+    }
+
+    @Override
+    public Kaznazaneregistriran findById(Long id) {
+        return kaznaZaNeregistriranRepository.findById(id).orElseThrow(RuntimeException::new);
+    }
+
+    @Override
+    public Kaznazaneregistriran create(Long kontrolaId, String dokument, Double iznos, String telefon, String ime, String adresa, String email) {
+        Kondukter byEmail = kondukterService.findByEmail(email);
+        Kontroli kontroli = kontrolaService.findById(kontrolaId);
+        Kaznazaneregistriran kaznazaneregistriran = new Kaznazaneregistriran();
+        kaznazaneregistriran.setKznAdresa(adresa);
+        kaznazaneregistriran.setKznIme(ime);
+        kaznazaneregistriran.setKznTelefon(telefon);
+        kaznazaneregistriran.setKzDatum(Timestamp.valueOf(LocalDateTime.now()));
+        kaznazaneregistriran.setKontroliByKontrolaId(kontroli);
+        kaznazaneregistriran.setKorisnikByKondukterKId(byEmail);
+        kaznazaneregistriran.setKzIznos(iznos);
+        kaznazaneregistriran.setKzDokument(dokument);
+        kaznazaneregistriran.setKzPlateno(false);
+        return kaznaZaNeregistriranRepository.save(kaznazaneregistriran);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KaznaZaRegistriranServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KaznaZaRegistriranServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KaznaZaRegistriranServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,76 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.*;
+import mk.ukim.finki.busngo.model.exceptions.UserShouldNotBeTicketedException;
+import mk.ukim.finki.busngo.repository.KaznaZaRegistriranRepository;
+import mk.ukim.finki.busngo.service.KaznaZaRegistriranService;
+import mk.ukim.finki.busngo.service.KondukterService;
+import mk.ukim.finki.busngo.service.KontrolaService;
+import mk.ukim.finki.busngo.service.PatnikService;
+import org.springframework.stereotype.Service;
+
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+public class KaznaZaRegistriranServiceImpl implements KaznaZaRegistriranService {
+    private final PatnikService patnikService;
+    private final KaznaZaRegistriranRepository kaznaZaRegistriranRepository;
+    private final KontrolaService kontrolaService;
+    private final KondukterService kondukterService;
+
+    public KaznaZaRegistriranServiceImpl(PatnikService patnikService, KaznaZaRegistriranRepository kaznaZaRegistriranRepository, KontrolaService kontrolaService, KondukterService kondukterService) {
+        this.patnikService = patnikService;
+        this.kaznaZaRegistriranRepository = kaznaZaRegistriranRepository;
+        this.kontrolaService = kontrolaService;
+        this.kondukterService = kondukterService;
+    }
+
+    @Override
+    public List<Kaznazaregistriran> findAllByPatnik(String email) {
+        Patnik patnik = patnikService.loadUserByEmail(email);
+        return kaznaZaRegistriranRepository.findAllByKorisnikByPatnikKId(patnik);
+    }
+
+    @Override
+    public Kaznazaregistriran create(Long kontrolaId, String dokument, Double iznos, Long patnik, String email) {
+        Kontroli kontroli = kontrolaService.findById(kontrolaId);
+        Kondukter kondukter = kondukterService.findByEmail(email);
+        Patnik patnik1 = patnikService.findById(patnik);
+        Kaznazaregistriran kaznazaregistriran = new Kaznazaregistriran();
+        kaznazaregistriran.setKzDatum(Timestamp.valueOf(LocalDateTime.now()));
+        kaznazaregistriran.setKzDokument(dokument);
+        kaznazaregistriran.setKzIznos(iznos);
+        kaznazaregistriran.setKzPlateno(false);
+        kaznazaregistriran.setKontroliByKontrolaId(kontroli);
+        kaznazaregistriran.setKorisnikByPatnikKId(patnik1);
+        kaznazaregistriran.setKorisnikByKondukterKId(kondukter);
+        List<Vozenje> vozenjeList = patnik1.getVozenjesByKId().stream()
+                .filter(v -> v.getInstancanalinijaByInlId().getInlId().equals(kontroli.getInstancanalinijaByInlId().getInlId()))
+                .toList();
+        if(vozenjeList.isEmpty())
+            return kaznaZaRegistriranRepository.save(kaznazaregistriran);
+
+        throw new UserShouldNotBeTicketedException(String.format("Patnik with id: %d and email: %s has valid vozenje for the %d instance!",
+                patnik1.getKId(),
+                patnik1.getKEmail(),
+                kontroli.getInstancanalinijaByInlId().getInlId()));
+    }
+
+    @Override
+    public Kaznazaregistriran pay(Long kaznaId) {
+        Kaznazaregistriran kazna = this.findById(kaznaId);
+        if(!kazna.getKzPlateno()){
+            kazna.setKzPlateno(true);
+            kazna.setKzDatumPlateno(Timestamp.valueOf(LocalDateTime.now()));
+        }
+        return kaznaZaRegistriranRepository.save(kazna);
+    }
+
+    @Override
+    public Kaznazaregistriran findById(Long id) {
+        return kaznaZaRegistriranRepository.findById(id).orElseThrow(RuntimeException::new);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KondukterServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KondukterServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KondukterServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,28 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Kondukter;
+import mk.ukim.finki.busngo.model.exceptions.InvalidUserId;
+import mk.ukim.finki.busngo.repository.KondukterRepository;
+import mk.ukim.finki.busngo.service.KondukterService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class KondukterServiceImpl implements KondukterService {
+    private final KondukterRepository kondukterRepository;
+
+    public KondukterServiceImpl(KondukterRepository kondukterRepository) {
+        this.kondukterRepository = kondukterRepository;
+    }
+
+    @Override
+    public List<Kondukter> findAll() {
+        return kondukterRepository.findAll();
+    }
+
+    @Override
+    public Kondukter findByEmail(String email) {
+        return kondukterRepository.findByKEmail(email).orElseThrow(InvalidUserId::new);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KontrolaServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KontrolaServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KontrolaServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,55 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Instancanalinija;
+import mk.ukim.finki.busngo.model.entities.Kondukter;
+import mk.ukim.finki.busngo.model.entities.Kontroli;
+import mk.ukim.finki.busngo.repository.KontrolaRepository;
+import mk.ukim.finki.busngo.service.InstancaNaLinijaService;
+import mk.ukim.finki.busngo.service.KondukterService;
+import mk.ukim.finki.busngo.service.KontrolaService;
+import org.springframework.stereotype.Service;
+
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Service
+public class KontrolaServiceImpl implements KontrolaService {
+    private final KontrolaRepository kontrolaRepository;
+    private final KondukterService kondukterService;
+    private final InstancaNaLinijaService instancaNaLinijaService;
+
+    public KontrolaServiceImpl(KontrolaRepository kontrolaRepository, KondukterService kondukterService, InstancaNaLinijaService instancaNaLinijaService) {
+        this.kontrolaRepository = kontrolaRepository;
+        this.kondukterService = kondukterService;
+        this.instancaNaLinijaService = instancaNaLinijaService;
+    }
+
+    @Override
+    public List<Kontroli> findAll() {
+        return kontrolaRepository.findAll();
+    }
+
+    @Override
+    public Kontroli create(Long inlId, String email) {
+        Kondukter kondukter = kondukterService.findByEmail(email);
+        Instancanalinija instancanalinija = instancaNaLinijaService.findById(inlId);
+        Kontroli kontroli = new Kontroli();
+        kontroli.setKontrolaDatum(Timestamp.valueOf(LocalDateTime.now()));
+        kontroli.setKorisnikByKondukterKId(kondukter);
+        kontroli.setInstancanalinijaByInlId(instancanalinija);
+
+        return kontrolaRepository.save(kontroli);
+    }
+
+    @Override
+    public Kontroli findById(Long kontrolaId) {
+        return kontrolaRepository.findById(kontrolaId).orElseThrow(RuntimeException::new);
+    }
+
+    @Override
+    public List<Kontroli> findAllByInl(Long inlId) {
+        Instancanalinija instancanalinija = instancaNaLinijaService.findById(inlId);
+        return kontrolaRepository.findAllByInstancanalinijaByInlId(instancanalinija);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KorisnikServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KorisnikServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/KorisnikServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,35 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.enums.Role;
+import mk.ukim.finki.busngo.model.exceptions.InvalidUserId;
+import mk.ukim.finki.busngo.repository.KorisnikRepository;
+import mk.ukim.finki.busngo.service.KorisnikService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class KorisnikServiceImpl implements KorisnikService {
+    private final KorisnikRepository korisnikRepository;
+
+    public KorisnikServiceImpl(KorisnikRepository korisnikRepository) {
+        this.korisnikRepository = korisnikRepository;
+    }
+
+
+    @Override
+    public List<Korisnik> listAll() {
+        return korisnikRepository.findAll();
+    }
+
+    @Override
+    public Korisnik findById(Long id) {
+        return korisnikRepository.findById(id).orElseThrow(InvalidUserId::new);
+    }
+
+    @Override
+    public Korisnik loadUserByEmail(String email) {
+        return korisnikRepository.findByKEmail(email).orElseThrow(InvalidUserId::new);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/LinijaServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/LinijaServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/LinijaServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,29 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Linija;
+import mk.ukim.finki.busngo.model.exceptions.InvalidLinijaIdException;
+import mk.ukim.finki.busngo.repository.LinijaRepository;
+import mk.ukim.finki.busngo.service.LinijaService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class LinijaServiceImpl implements LinijaService {
+
+    private final LinijaRepository linijaRepository;
+
+    public LinijaServiceImpl(LinijaRepository linijaRepository) {
+        this.linijaRepository = linijaRepository;
+    }
+
+    @Override
+    public List<Linija> findAll() {
+        return linijaRepository.findAll();
+    }
+
+    @Override
+    public Linija findById(Long liId) {
+        return linijaRepository.findById(liId).orElseThrow(InvalidLinijaIdException::new);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/PatnikServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/PatnikServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/PatnikServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,55 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Instancanalinija;
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.exceptions.InvalidPatnikIdException;
+import mk.ukim.finki.busngo.repository.PatnikRepository;
+import mk.ukim.finki.busngo.service.InstancaNaLinijaService;
+import mk.ukim.finki.busngo.service.PatnikService;
+import org.springframework.stereotype.Service;
+
+import java.util.Collections;
+import java.util.List;
+
+@Service
+public class PatnikServiceImpl implements PatnikService {
+    private final PatnikRepository patnikRepository;
+    private final InstancaNaLinijaService instancaNaLinijaService;
+
+    public PatnikServiceImpl(PatnikRepository patnikRepository, InstancaNaLinijaService instancaNaLinijaService) {
+        this.patnikRepository = patnikRepository;
+        this.instancaNaLinijaService = instancaNaLinijaService;
+    }
+
+    @Override
+    public List<Patnik> listAll() {
+        return  patnikRepository.findAll();
+    }
+
+    @Override
+    public Patnik findById(Long id) {
+        return patnikRepository.findById(id).orElseThrow(InvalidPatnikIdException::new);
+    }
+
+    @Override
+    public Patnik loadUserByEmail(String email) {
+        return patnikRepository.findByKEmail(email).orElseThrow(InvalidPatnikIdException::new);
+    }
+
+    @Override
+    public Patnik save(Korisnik korisnik) {
+        Patnik patnik = new Patnik();
+        patnik.setKId(korisnik.getKId());
+        patnik.setKEmail(korisnik.getKEmail());
+        patnik.setKAdresa(korisnik.getKAdresa());
+        patnik.setKIme(korisnik.getKIme());
+        patnik.setKTelefon(korisnik.getKTelefon());
+        patnik.setKIsAdmin(korisnik.getKIsAdmin());
+        patnik.setKLozinka(korisnik.getKLozinka());
+
+        return patnikRepository.save((Patnik) korisnik);
+    }
+
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/PostojkaNaLinijaServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/PostojkaNaLinijaServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/PostojkaNaLinijaServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,44 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Linija;
+import mk.ukim.finki.busngo.model.entities.Postojkanalinija;
+import mk.ukim.finki.busngo.model.exceptions.InvalidPostojkaNaLinijaIdException;
+import mk.ukim.finki.busngo.repository.PostojkaNaLinijaRepository;
+import mk.ukim.finki.busngo.service.LinijaService;
+import mk.ukim.finki.busngo.service.PostojkaNaLinijaService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class PostojkaNaLinijaServiceImpl implements PostojkaNaLinijaService {
+    private final PostojkaNaLinijaRepository postojkaNaLinijaRepository;
+    private final LinijaService linijaService;
+
+    public PostojkaNaLinijaServiceImpl(PostojkaNaLinijaRepository postojkaNaLinijaRepository, LinijaService linijaService) {
+        this.postojkaNaLinijaRepository = postojkaNaLinijaRepository;
+        this.linijaService = linijaService;
+    }
+
+    @Override
+    public List<Postojkanalinija> findAll() {
+        return postojkaNaLinijaRepository.findAll();
+    }
+
+    @Override
+    public Postojkanalinija findById(Long id) {
+        return postojkaNaLinijaRepository.findById(id).orElseThrow(InvalidPostojkaNaLinijaIdException::new);
+    }
+
+    @Override
+    public List<Postojkanalinija> findByLinija(Long liId) {
+        Linija linija = linijaService.findById(liId);
+        return postojkaNaLinijaRepository.findAllByLinijaByLiId(linija);
+    }
+
+    @Override
+    public List<Postojkanalinija> findByLinijaAfterRedenBroj(Long liId, Short redenBroj) {
+        Linija linija = linijaService.findById(liId);
+        return postojkaNaLinijaRepository.findAllByLinijaByLiIdAndPnlRedenBrojGreaterThan(linija, redenBroj);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/TipBiletServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/TipBiletServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/TipBiletServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,22 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Tipbilet;
+import mk.ukim.finki.busngo.repository.TipBIletRepository;
+import mk.ukim.finki.busngo.service.TipBiletService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class TipBiletServiceImpl implements TipBiletService {
+    private final TipBIletRepository tipBIletRepository;
+
+    public TipBiletServiceImpl(TipBIletRepository tipBIletRepository) {
+        this.tipBIletRepository = tipBIletRepository;
+    }
+
+    @Override
+    public List<Tipbilet> listAll() {
+        return tipBIletRepository.findAll();
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/VozacServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/VozacServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/VozacServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,28 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.Vozac;
+import mk.ukim.finki.busngo.model.exceptions.InvalidVozacIdException;
+import mk.ukim.finki.busngo.repository.VozacRepository;
+import mk.ukim.finki.busngo.service.VozacService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class VozacServiceImpl implements VozacService {
+    private final VozacRepository vozacRepository;
+
+    public VozacServiceImpl(VozacRepository vozacRepository) {
+        this.vozacRepository = vozacRepository;
+    }
+
+    @Override
+    public List<Vozac> findAll() {
+        return vozacRepository.findAll();
+    }
+
+    @Override
+    public Vozac findByEmail(String email) {
+        return vozacRepository.findByKEmail(email).orElseThrow(InvalidVozacIdException::new);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/VozenjeServiceImpl.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/VozenjeServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/service/impl/VozenjeServiceImpl.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,81 @@
+package mk.ukim.finki.busngo.service.impl;
+
+import mk.ukim.finki.busngo.model.entities.*;
+import mk.ukim.finki.busngo.model.enums.BILET_STATUS;
+import mk.ukim.finki.busngo.model.enums.VOZENJE_STATUS;
+import mk.ukim.finki.busngo.model.exceptions.InvalidVozenjeIdException;
+import mk.ukim.finki.busngo.repository.VozenjeRepository;
+import mk.ukim.finki.busngo.service.*;
+import org.springframework.stereotype.Service;
+
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Service
+public class VozenjeServiceImpl  implements VozenjeService {
+    private final VozenjeRepository vozenjeRepository;
+    private final PatnikService patnikService;
+    private final BiletService biletService;
+    private final PostojkaNaLinijaService postojkaNaLinijaService;
+    private final InstancaNaLinijaService instancaNaLinijaService;
+
+    public VozenjeServiceImpl(VozenjeRepository vozenjeRepository, PatnikService patnikService, BiletService biletService, PostojkaNaLinijaService postojkaNaLinijaService, InstancaNaLinijaService instancaNaLinijaService) {
+        this.vozenjeRepository = vozenjeRepository;
+        this.patnikService = patnikService;
+        this.biletService = biletService;
+        this.postojkaNaLinijaService = postojkaNaLinijaService;
+        this.instancaNaLinijaService = instancaNaLinijaService;
+    }
+
+    @Override
+    public List<Vozenje> findVozenjaByPatnik(String email) {
+        Patnik patnik = patnikService.loadUserByEmail(email);
+        return vozenjeRepository.findAllByKorisnikByPatnikKId(patnik);
+    }
+
+    @Override
+    public List<Vozenje> findVozenjaByPatnikAndStatus(String email, VOZENJE_STATUS status) {
+        Patnik patnik = patnikService.loadUserByEmail(email);
+        return vozenjeRepository.findAllByKorisnikByPatnikKIdAndAndVozenjeStatus(patnik, status);
+    }
+
+    @Override
+    public Vozenje start(String email, Long bId, Long pnlId, Long inlId) {
+        Patnik patnik = patnikService.loadUserByEmail(email);
+        Bilet bilet = biletService.findBybIdAndPatnikEmail(bId, email);
+        Postojkanalinija postojkanalinija = postojkaNaLinijaService.findById(pnlId);
+        Instancanalinija instancanalinija = instancaNaLinijaService.findById(inlId);
+
+        Vozenje vozenje = new Vozenje();
+        vozenje.setVozenjeStart(Timestamp.valueOf(LocalDateTime.now()));
+        vozenje.setVozenjeStatus(VOZENJE_STATUS.ACTIVE);
+        vozenje.setInstancanalinijaByInlId(instancanalinija);
+        vozenje.setKorisnikByPatnikKId(patnik);
+        vozenje.setPostojkanalinijaByKacuvaPnlId(postojkanalinija);
+
+        if(bilet.getBStatus().equals(BILET_STATUS.INACTIVE))
+            bilet = biletService.activate(bId);
+        else if(biletService.checkExpiration(bId))
+            throw new RuntimeException("Bilet is expired!");
+        else if(bilet.getBStatus().equals(BILET_STATUS.EXPIRED))
+            throw new RuntimeException("Bilet is expired!");
+
+        vozenje.setBiletByBId(bilet);
+        return vozenjeRepository.save(vozenje);
+    }
+
+    @Override
+    public Vozenje end(Long vozenjeId, Long pnlId) {
+        // TODO : Relacija se simnuva na pnlId
+        Vozenje vozenje = this.findById(vozenjeId);
+        vozenje.setVozenjeEnd(Timestamp.valueOf(LocalDateTime.now()));
+        vozenje.setVozenjeStatus(VOZENJE_STATUS.FINISHED);
+        return vozenjeRepository.save(vozenje);
+    }
+
+    @Override
+    public Vozenje findById(Long id) {
+        return vozenjeRepository.findById(id).orElseThrow(InvalidVozenjeIdException::new);
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/BiletController.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/BiletController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/BiletController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,75 @@
+package mk.ukim.finki.busngo.web;
+
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.enums.BILET_STATUS;
+import mk.ukim.finki.busngo.model.exceptions.InvalidPatnikIdException;
+import mk.ukim.finki.busngo.service.AuthService;
+import mk.ukim.finki.busngo.service.BiletService;
+import mk.ukim.finki.busngo.service.PatnikService;
+import mk.ukim.finki.busngo.service.TipBiletService;
+import org.springframework.security.core.Authentication;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.time.LocalDateTime;
+
+@Controller
+@RequestMapping("/bilet")
+public class BiletController {
+    private final BiletService biletService;
+    private final TipBiletService tipBiletService;
+    private final AuthService authService;
+    private final PatnikService patnikService;
+
+    public BiletController(BiletService biletService, TipBiletService tipBiletService, AuthService authService, PatnikService patnikService) {
+        this.biletService = biletService;
+        this.tipBiletService = tipBiletService;
+        this.authService = authService;
+        this.patnikService = patnikService;
+    }
+
+    @GetMapping()
+    public String getAllBileti(@RequestParam(required = false) Long id,
+                               @RequestParam(required = false) BILET_STATUS status,
+                               Model model,
+                               Authentication authentication){
+        model.addAttribute("bodyContent", "listBileti");
+        Patnik patnik = null;
+        try{
+            patnik = patnikService.loadUserByEmail(authentication.getName());
+            model.addAttribute("bileti", biletService.findAllByPatnikEmail(authentication.getName()));
+        }
+        catch (InvalidPatnikIdException e){
+            model.addAttribute("bodyContent", "listBileti");
+            model.addAttribute("hasError", true);
+            model.addAttribute("error", e.getMessage());
+            return "master-template";
+        }
+
+        return "master-template";
+    }
+
+    @GetMapping("/kupi")
+    public String getKupiPage(Model model){
+        model.addAttribute("bodyContent", "kupiBilet");
+        model.addAttribute("tipbileti", tipBiletService.listAll());
+        return "master-template";
+    }
+
+    @PostMapping("/kupi")
+    public String kupiBilet(@RequestParam Long tipbilet, Authentication authentication){
+        biletService.buy(tipbilet, LocalDateTime.now(), BILET_STATUS.INACTIVE, authentication.getName());
+        return "redirect:/bilet";
+    }
+
+//    @GetMapping("/encode")
+//    public String encode(){
+//        biletService.encode();
+//        return "redirect:/bilet";
+//    }
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/InstancaNaLinijaController.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/InstancaNaLinijaController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/InstancaNaLinijaController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,78 @@
+package mk.ukim.finki.busngo.web;
+
+import mk.ukim.finki.busngo.model.entities.Avtobus;
+import mk.ukim.finki.busngo.model.entities.Instancanalinija;
+import mk.ukim.finki.busngo.model.entities.Linija;
+import mk.ukim.finki.busngo.service.AvtobusService;
+import mk.ukim.finki.busngo.service.InstancaNaLinijaService;
+import mk.ukim.finki.busngo.service.KontrolaService;
+import mk.ukim.finki.busngo.service.LinijaService;
+import org.springframework.security.core.Authentication;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Controller
+@RequestMapping("instanca-na-linija")
+public class InstancaNaLinijaController {
+    private final InstancaNaLinijaService instancaNaLinijaService;
+    private final LinijaService linijaService;
+    private final AvtobusService avtobusService;
+    private final KontrolaService kontrolaService;
+
+    public InstancaNaLinijaController(InstancaNaLinijaService instancaNaLinijaService, LinijaService linijaService, AvtobusService avtobusService, KontrolaService kontrolaService) {
+        this.instancaNaLinijaService = instancaNaLinijaService;
+        this.linijaService = linijaService;
+        this.avtobusService = avtobusService;
+        this.kontrolaService = kontrolaService;
+    }
+
+    @GetMapping()
+    public String getList(Model model){
+        model.addAttribute("bodyContent", "listInstanci");
+        model.addAttribute("inls", instancaNaLinijaService.findAllActive());
+
+        return "master-template";
+    }
+    @GetMapping("/start")
+    public String getStartPage(Model model){
+        List<Linija> linijaList = linijaService.findAll();
+        List<Avtobus> avtobusList = avtobusService.findAll();
+        model.addAttribute("avtobusi", avtobusList);
+        model.addAttribute("linii", linijaList);
+        model.addAttribute("bodyContent", "startInstanca");
+
+        return "master-template";
+    }
+
+    @PostMapping("/start")
+    public String startInstanca(@RequestParam String aRegistracija,
+                                @RequestParam Long liId,
+                                Model model,
+                                Authentication authentication){
+        Instancanalinija start = instancaNaLinijaService.start(liId, aRegistracija, authentication.getName());
+//        model.addAttribute("inl", start);
+//        model.addAttribute("bodyContent", "inlShow");
+
+        return "redirect:/instanca-na-linija/" + start.getInlId();
+    }
+
+    @GetMapping("/{inlId}")
+    public String getInlShow(@PathVariable Long inlId,
+                             Model model){
+        model.addAttribute("inl", instancaNaLinijaService.findById(inlId));
+        model.addAttribute("kontroli", kontrolaService.findAllByInl(inlId));
+        model.addAttribute("bodyContent", "inlShow");
+
+        return "master-template";
+    }
+
+    @PostMapping("/{inlId}/end")
+    public String endInstanca(@PathVariable Long inlId,
+                              Authentication authentication){
+        Instancanalinija ended = instancaNaLinijaService.end(inlId, authentication.getName());
+        return "redirect:/instanca-na-linija/" + ended.getInlId();
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/KaznaController.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/KaznaController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/KaznaController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,49 @@
+package mk.ukim.finki.busngo.web;
+
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.exceptions.InvalidPatnikIdException;
+import mk.ukim.finki.busngo.service.KaznaZaRegistriranService;
+import mk.ukim.finki.busngo.service.VozenjeService;
+import org.springframework.security.core.Authentication;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+@Controller
+@RequestMapping("/kazna")
+public class KaznaController {
+    private final KaznaZaRegistriranService kaznaZaRegistriranService;
+
+    public KaznaController(KaznaZaRegistriranService kaznaZaRegistriranService) {
+        this.kaznaZaRegistriranService = kaznaZaRegistriranService;
+    }
+
+    @GetMapping()
+    public String getKaznaPage(Model model,
+                                 Authentication authentication){
+        model.addAttribute("bodyContent", "listKazni");
+        Patnik patnik = null;
+        try{
+            model.addAttribute("kazni", kaznaZaRegistriranService.findAllByPatnik(authentication.getName()));
+        }
+        catch (InvalidPatnikIdException e){
+            model.addAttribute("bodyContent", "listBileti");
+            model.addAttribute("hasError", true);
+            model.addAttribute("error", e.getMessage());
+            return "master-template";
+        }
+
+        return "master-template";
+    }
+
+    @PostMapping("/{id}/pay")
+    public String pay(@PathVariable Long id,
+                      Model model){
+        kaznaZaRegistriranService.pay(id);
+        return "redirect:/kazna";
+    }
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/KontrolaController.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/KontrolaController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/KontrolaController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,85 @@
+package mk.ukim.finki.busngo.web;
+
+import mk.ukim.finki.busngo.model.entities.Kontroli;
+import mk.ukim.finki.busngo.model.exceptions.UserShouldNotBeTicketedException;
+import mk.ukim.finki.busngo.service.*;
+import org.springframework.security.core.Authentication;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+
+@Controller
+@RequestMapping("/kontrola")
+public class KontrolaController {
+
+    private final KontrolaService kontrolaService;
+    private final KaznaZaRegistriranService kaznaZaRegistriranService;
+    private final KaznaZaNeregistriranService kaznaZaNeregistriranService;
+    private final KaznaService kaznaService;
+    private final PatnikService patnikService;
+    private final VozacService vozacService;
+    private final InstancaNaLinijaService instancaNaLinijaService;
+
+    public KontrolaController(KontrolaService kontrolaService, KaznaZaRegistriranService kaznaZaRegistriranService, KaznaZaNeregistriranService kaznaZaNeregistriranService, KaznaService kaznaService, PatnikService patnikService, VozacService vozacService, InstancaNaLinijaService instancaNaLinijaService) {
+        this.kontrolaService = kontrolaService;
+        this.kaznaZaRegistriranService = kaznaZaRegistriranService;
+        this.kaznaZaNeregistriranService = kaznaZaNeregistriranService;
+        this.kaznaService = kaznaService;
+        this.patnikService = patnikService;
+        this.vozacService = vozacService;
+        this.instancaNaLinijaService = instancaNaLinijaService;
+    }
+
+    @GetMapping("/{kontrolaId}")
+    public String get(@PathVariable Long kontrolaId,
+                      Model model){
+        model.addAttribute("bodyContent", "kontrola");
+        Kontroli kontroli = kontrolaService.findById(kontrolaId);
+
+        model.addAttribute("kontrola", kontroli);
+        model.addAttribute("kazni", kaznaService.findAllByKontrolaId(kontrolaId));
+        model.addAttribute("patnici", patnikService.listAll());
+        return "master-template";
+    }
+    @GetMapping("/start-for/{inlId}")
+    public String getStartPage(@PathVariable Long inlId,
+                               Model model,
+                               Authentication authentication){
+        model.addAttribute("bodyContent", "kontrola");
+        Kontroli kontroli = kontrolaService.create(inlId, authentication.getName());
+
+        model.addAttribute("kontrola", kontroli);
+        return "redirect:/kontrola/" + kontroli.getKontrolaId();
+    }
+
+    @PostMapping("/{kontrolaId}/kazni-registriran")
+    public String kazniRegistriran(@PathVariable Long kontrolaId,
+                                   @RequestParam String dokument,
+                                   @RequestParam Double iznos,
+                                   @RequestParam Long patnik,
+                                   Authentication authentication){
+        try {
+
+            kaznaZaRegistriranService.create(kontrolaId, dokument, iznos, patnik, authentication.getName());
+        }
+        catch (UserShouldNotBeTicketedException exception){
+            return "redirect:/kontrola/" + kontrolaId;
+        }
+
+        return "redirect:/kontrola/" + kontrolaId;
+    }
+
+    @PostMapping("/{kontrolaId}/kazni-neregistriran")
+    public String kazniNeregistriran(@PathVariable Long kontrolaId,
+                                   @RequestParam String dokument,
+                                   @RequestParam Double iznos,
+                                   @RequestParam String telefon,
+                                   @RequestParam String ime,
+                                   @RequestParam String adresa,
+                                   Authentication authentication){
+
+        kaznaZaNeregistriranService.create(kontrolaId, dokument, iznos, telefon, ime, adresa, authentication.getName());
+
+        return "redirect:/kontrola/" + kontrolaId;
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/LoginController.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/LoginController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/LoginController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,47 @@
+package mk.ukim.finki.busngo.web;
+
+import jakarta.servlet.http.HttpServletRequest;
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.exceptions.InvalidCredentialsException;
+import mk.ukim.finki.busngo.service.AuthService;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+@Controller
+@RequestMapping("/login")
+public class LoginController {
+
+    private final AuthService authService;
+
+    public LoginController(AuthService authService) {
+        this.authService = authService;
+    }
+
+    @GetMapping
+    public String getLoginPage(Model model) {
+        model.addAttribute("bodyContent", "login");
+        return "master-template";
+    }
+
+    @PostMapping
+    public String login(HttpServletRequest request, Model model) {
+        Korisnik user = null;
+
+        try {
+            user = authService.login(request.getParameter("username"), request.getParameter("password"));
+        } catch (InvalidCredentialsException exception) {
+            model.addAttribute("bodyContent", "login");
+            model.addAttribute("hasError", true);
+            model.addAttribute("error", exception.getMessage());
+            return "master-template";
+        }
+
+        request.getSession().setAttribute("user", user);
+        return "redirect:/home";
+    }
+
+}
+
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/RegisterController.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/RegisterController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/RegisterController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,73 @@
+package mk.ukim.finki.busngo.web;
+
+import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.enums.Role;
+import mk.ukim.finki.busngo.model.enums.VrabotenType;
+import mk.ukim.finki.busngo.model.exceptions.InvalidCredentialsException;
+import mk.ukim.finki.busngo.model.exceptions.UserAlreadyExistsException;
+import mk.ukim.finki.busngo.service.AuthService;
+import mk.ukim.finki.busngo.service.KorisnikService;
+import mk.ukim.finki.busngo.service.PatnikService;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@Controller
+@RequestMapping("/register")
+public class RegisterController {
+    private final AuthService authService;
+    private final KorisnikService korisnikService;
+    private final PatnikService patnikService;
+
+    public RegisterController(AuthService authService, KorisnikService korisnikService, PatnikService patnikService) {
+        this.authService = authService;
+        this.korisnikService = korisnikService;
+        this.patnikService = patnikService;
+    }
+
+    @GetMapping
+    public String getRegisterPage(@RequestParam(required = false) String error, Model model) {
+        if(error != null && !error.isEmpty()) {
+            model.addAttribute("hasError", true);
+            model.addAttribute("error", error);
+        }
+
+        model.addAttribute("roles", Role.values());
+
+        model.addAttribute("bodyContent", "register");
+        return "master-template";
+    }
+
+    @PostMapping
+    public String register(@RequestParam String name,
+                           @RequestParam String email,
+                           @RequestParam String password,
+                           @RequestParam String confirmPassword,
+                           @RequestParam String address,
+                           @RequestParam String phone,
+                           @RequestParam Role role,
+                           @RequestParam(required = false) Double salary
+                           ) {
+        try{
+            Korisnik korisnik = authService.register(name, email, password, confirmPassword, address, phone, role, salary);
+
+            return "redirect:/login";
+        } catch (InvalidCredentialsException | UserAlreadyExistsException exception) {
+            return "redirect:/register?error=" + exception.getMessage();
+        }
+    }
+
+//    @PostMapping
+//    public String registerVraboten(@RequestParam String name,
+//                                   @RequestParam String email,
+//                                   @RequestParam String password,
+//                                   @RequestParam String confirmPassword,
+//                                   @RequestParam String address,
+//                                   @RequestParam String phone){
+//
+//    }
+
+}
Index: bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/VozenjeController.java
===================================================================
--- bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/VozenjeController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/java/mk/ukim/finki/busngo/web/VozenjeController.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,129 @@
+package mk.ukim.finki.busngo.web;
+
+import mk.ukim.finki.busngo.model.entities.Linija;
+import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.entities.Vozenje;
+import mk.ukim.finki.busngo.model.enums.VOZENJE_STATUS;
+import mk.ukim.finki.busngo.model.exceptions.InvalidPatnikIdException;
+import mk.ukim.finki.busngo.model.exceptions.InvalidPostojkaNaLinijaIdException;
+import mk.ukim.finki.busngo.service.*;
+import org.springframework.security.core.Authentication;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+
+@Controller
+@RequestMapping("/vozenje")
+public class VozenjeController {
+    private final VozenjeService vozenjeService;
+    private final PostojkaNaLinijaService postojkaNaLinijaService;
+    private final InstancaNaLinijaService instancaNaLinijaService;
+    private final BiletService biletService;
+
+    public VozenjeController(VozenjeService vozenjeService, PostojkaNaLinijaService postojkaNaLinijaService, InstancaNaLinijaService instancaNaLinijaService, BiletService biletService) {
+        this.vozenjeService = vozenjeService;
+        this.postojkaNaLinijaService = postojkaNaLinijaService;
+        this.instancaNaLinijaService = instancaNaLinijaService;
+        this.biletService = biletService;
+    }
+
+    @GetMapping()
+    public String getVozenjePage(Model model,
+                                 Authentication authentication,
+                                 @RequestParam(required = false) VOZENJE_STATUS status){
+        model.addAttribute("bodyContent", "listVozenja");
+        Patnik patnik = null;
+        try{
+            if(status != null)
+                model.addAttribute("vozenja", vozenjeService.findVozenjaByPatnikAndStatus(authentication.getName(), status));
+            else
+                model.addAttribute("vozenja", vozenjeService.findVozenjaByPatnikAndStatus(authentication.getName(), VOZENJE_STATUS.ACTIVE));
+            model.addAttribute("vozStatus", VOZENJE_STATUS.values());
+        }
+        catch (InvalidPatnikIdException e){
+            model.addAttribute("bodyContent", "listBileti");
+            model.addAttribute("hasError", true);
+            model.addAttribute("error", e.getMessage());
+            return "master-template";
+        }
+
+        return "master-template";
+    }
+
+//    @GetMapping("/start")
+//    public String getStartVozenjePagePostojkaPage(Model model){
+//        model.addAttribute("postojki", postojkaNaLinijaService.findAll());
+//        model.addAttribute("bodyContent", "choosePostojka");
+//
+//        return "master-template";
+//    }
+    @GetMapping("/start")
+    public String getStartVozenjePageAll(@RequestParam(required = false) Long pnlId,
+                                         Model model,
+                                         Authentication authentication){
+        try{
+            if(pnlId != null){
+                model.addAttribute("postojka", postojkaNaLinijaService.findById(pnlId));
+                model.addAttribute("instanci", instancaNaLinijaService.findByPnlId(pnlId));
+            }
+            model.addAttribute("postojki", postojkaNaLinijaService.findAll());
+
+            model.addAttribute("bileti", biletService.findAllByPatnikEmail(authentication.getName()));
+            model.addAttribute("bodyContent", "startVozenje");
+        }
+        catch (InvalidPostojkaNaLinijaIdException | InvalidPatnikIdException exception){
+            model.addAttribute("bodyContent", "listBileti");
+            model.addAttribute("hasError", true);
+            model.addAttribute("error", exception.getMessage());
+            return "master-template";
+        }
+
+        return "master-template";
+    }
+
+    @PostMapping("/start")
+    public String startVozenje(@RequestParam Long pnlId,
+                               @RequestParam Long inlId,
+                               @RequestParam Long bId,
+                               Authentication authentication,
+                               Model model){
+        try{
+            vozenjeService
+                    .start(authentication.getName(), bId, pnlId, inlId);
+        }
+        catch (RuntimeException e){
+            System.out.println(e.getMessage());
+            model.addAttribute("bodyContent", "listBileti");
+            model.addAttribute("hasError", true);
+            model.addAttribute("error", e.getMessage());
+            return "master-template";
+        }
+
+        return "redirect:/vozenje";
+    }
+
+    @GetMapping("/{vozenjeId}/end")
+    public String getEndVozenje(@PathVariable Long vozenjeId,
+                                Model model){
+        Vozenje vozenje = vozenjeService.findById(vozenjeId);
+        model.addAttribute("vozenje", vozenjeService.findById(vozenjeId));
+        model.addAttribute("pnls",
+                postojkaNaLinijaService
+                        .findByLinijaAfterRedenBroj(Long.valueOf(vozenje
+                                .getInstancanalinijaByInlId()
+                                .getLinijaByLiId()
+                                .getLiId()),
+                                vozenje.getPostojkanalinijaByKacuvaPnlId().getPnlRedenBroj()));
+
+        model.addAttribute("bodyContent", "endVozenje");
+
+        return "master-template";
+    }
+
+    @PostMapping("/{vozenjeId}/end")
+    public String endVozenje(@PathVariable Long vozenjeId,
+                             @RequestParam Long pnlEndId){
+        Vozenje end = vozenjeService.end(vozenjeId, pnlEndId);
+        return "redirect:/vozenje";
+    }
+}
Index: bus-n-go-do-5ta-faza/src/main/resources/application.properties
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/application.properties	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/application.properties	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,17 @@
+#
+spring.datasource.url=jdbc:postgresql://localhost:8081/db_202324z_va_prj_busngo
+spring.datasource.username=db_202324z_va_prj_busngo_owner
+spring.datasource.password=d9f924580e7
+spring.datasource.driver-class-name=org.postgresql.Driver
+
+
+spring.datasource.hikari.connection-timeout=20000
+spring.datasource.hikari.maximum-pool-size=5
+
+#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+spring.jpa.properties.hibernate.jdbc.non_contextual_creation=true
+spring.jpa.properties.hibernate.default_schema=project_new
+
+spring.jpa.hibernate.ddl-auto=validate
+spring.jpa.show-sql=true
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/choosePostojka.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/choosePostojka.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/choosePostojka.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,17 @@
+<div class="container" xmlns:th="http://www.thymeleaf.org">
+    <form class="form-signin mt-xl-5" method="get" action="/vozenje/choose-postojka">
+        <h2 class="form-signin-heading">Odberete postojka na koja se naogjate</h2>
+        <p>
+            <label for="pnlId" class="sr-only">Postojka</label>
+            <select class="form-control" name="pnlId" id="pnlId">
+                <option class="form-control" th:each="postojka : ${postojki}" th:text="${postojka.postojkaByPId.pIme}" th:value="${postojka.pnlId}" ></option>
+            </select>
+
+
+        </p>
+        <div class="col-md-3">
+            <button id="submit" class="btn btn-lg btn-primary btn-block" type="submit">Odberi</button>
+        </div>
+    </form>
+</div>
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/endVozenje.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/endVozenje.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/endVozenje.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,62 @@
+<div class="container" xmlns:th="http://www.thymeleaf.org">
+    <form class="form-signin mt-xl-5" method="post" th:action="@{'/vozenje/{id}/end'(id=${vozenje.vozenjeId})}">
+        <h2 class="form-signin-heading">Start vozenje</h2>
+
+        <p>
+            <label for="pnlId" class="sr-only">Postojka</label>
+            <select   class="form-control" name="pnlId" id="pnlId">
+                <option class="form-control"
+                        th:text="${vozenje.postojkanalinijaByKacuvaPnlId.postojkaByPId.pIme}"
+                        selected
+                        disabled
+                        th:value="${vozenje.postojkanalinijaByKacuvaPnlId.pnlId} "  ></option>
+<!--                        th:selected="${postojka!= null && postojka.pnlId == pos.pnlId} ? 'true' : 'false' " -->
+<!--                        th:disabled="${postojka!= null && postojka.pnlId != pos.pnlId} ? 'true' : 'false' "  -->
+
+            </select>
+        </p>
+
+        <p >
+            <label for="instanca" class="sr-only">Instanca</label>
+            <select id="instanca" name="inlId" class="form-control">
+                <option
+                        selected
+                        disabled
+                        th:value="${vozenje.instancanalinijaByInlId.inlId}"
+                        th:text="${vozenje.instancanalinijaByInlId.linijaByLiId.liIme} + ' - ' + ${vozenje.instancanalinijaByInlId.linijaByLiId.liPravec}"></option>
+            </select>
+        </p>
+
+        <p >
+            <label for="bilet" class="sr-only">Bilet</label>
+            <select id="bilet" name="bId" class="form-control">
+                <option
+                        selected
+                        disabled
+                        th:value="${vozenje.biletByBId.bId}"
+                        th:text="${vozenje.biletByBId.tipbiletByTbId.tbIme} + ' - ' + ${vozenje.biletByBId.bStatus.name()}"></option>
+            </select>
+        </p>
+
+        <p>
+            <label for="pnlEndId" class="sr-only">Postojka Simnuvanje</label>
+            <select   class="form-control" name="pnlEndId" id="pnlEndId">
+                <option class="form-control"
+                        th:each="pos : ${pnls}"
+                        th:text="${pos.postojkaByPId.pIme}"
+                        th:value="${pos.pnlId} "  ></option>
+
+
+            </select>
+        </p>
+
+        <div th:if="${param.error}" th:text="${param.error}" class="text-danger"></div>
+
+        <div class="row">
+            <div class="col-md-3">
+                <button id="submit" class="btn btn-lg btn-primary btn-block" type="submit">End</button>
+            </div>
+        </div>
+    </form>
+</div>
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/fragments/footer.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/fragments/footer.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/fragments/footer.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,48 @@
+<footer class="text-black-50 mt-xl-5" xmlns:th="http://www.thymeleaf.org">
+    <div class="container">
+        <div class="row">
+            <div class="col-md-3 col-lg-4 col-xl-3">
+                <h5>About</h5>
+                <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
+                <p class="mb-0">
+                    Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant
+                    impression.
+                </p>
+            </div>
+
+            <div class="col-md-2 col-lg-2 col-xl-2 mx-auto">
+                <h5>Informations</h5>
+                <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
+                <ul class="list-unstyled">
+                    <li><a href="">Link 1</a></li>
+                    <li><a href="">Link 2</a></li>
+                    <li><a href="">Link 3</a></li>
+                    <li><a href="">Link 4</a></li>
+                </ul>
+            </div>
+
+            <div class="col-md-3 col-lg-2 col-xl-2 mx-auto">
+                <h5>Others links</h5>
+                <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
+                <ul class="list-unstyled">
+                    <li><a href="">Link 1</a></li>
+                    <li><a href="">Link 2</a></li>
+                    <li><a href="">Link 3</a></li>
+                    <li><a href="">Link 4</a></li>
+                </ul>
+            </div>
+
+            <div class="col-md-4 col-lg-3 col-xl-3">
+                <h5>Contact</h5>
+                <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
+                <ul class="list-unstyled">
+                    <li><i class="fa fa-home mr-2"></i> My company</li>
+                    <li><i class="fa fa-envelope mr-2"></i> email@example.com</li>
+                    <li><i class="fa fa-phone mr-2"></i> + 33 12 14 15 16</li>
+                    <li><i class="fa fa-print mr-2"></i> + 33 12 14 15 16</li>
+                </ul>
+            </div>
+        </div>
+    </div>
+</footer>
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/fragments/header.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/fragments/header.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/fragments/header.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,68 @@
+<header xmlns:th="http://www.thymeleaf.org">
+  <nav class="navbar navbar-expand-md navbar-dark bg-dark">
+    <div class="container">
+      <a class="navbar-brand" href="/">Bus & GO</a>
+      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
+              aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
+        <span class="navbar-toggler-icon"></span>
+      </button>
+
+      <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
+        <ul class="navbar-nav m-auto">
+          <li sec:authorize="hasRole('ROLE_PASSENGER')" class="nav-item m-auto">
+            <a class="nav-link active" href="/bilet">Bileti</a>
+          </li>
+          <li sec:authorize="hasAnyRole('ROLE_PASSENGER')" class="nav-item m-auto">
+            <a class="nav-link active" href="/vozenje">Vozenja</a>
+          </li>
+          <li sec:authorize="hasRole('ROLE_PASSENGER')" class="nav-item m-auto">
+            <a class="nav-link active" href="/kazna">Kazni</a>
+          </li>
+          <li sec:authorize="hasAnyRole('ROLE_CONDUCTOR', 'ROLE_DRIVER')" class="nav-item m-auto">
+            <a class="nav-link active" href="/instanca-na-linija">Instanci</a>
+          </li>
+        </ul>
+
+
+        <form class="form-inline my-2 my-lg-0">
+          <div class="input-group input-group-sm">
+            <input type="text" class="form-control" aria-label="Small"
+                   aria-describedby="inputGroup-sizing-sm"
+                   placeholder="Search...">
+            <div class="input-group-append">
+              <button type="button" class="btn btn-secondary btn-number">
+                <i class="fa fa-search"></i>
+              </button>
+            </div>
+          </div>
+        </form>
+        <ul class="nav navbar-nav navbar-right">
+
+          <li class="nav-item">
+            <a class="nav-link" href="#"></a>
+          </li>
+
+          <li class="nav-item" sec:authorize="isAuthenticated()">
+            <a href="#" class="btn btn-light btn-sm ml-3" sec:authentication="name">
+            </a>
+          </li>
+          <li class="nav-item" sec:authorize="isAuthenticated()">
+            <a class="btn btn-light btn-sm ml-3" href="/logout">
+              <i class="fa-solid fa-right-from-bracket"></i> Logout
+            </a>
+          </li>
+          <li class="nav-item" sec:authorize="isAnonymous()">
+            <a class="btn btn-light btn-sm ml-3" href="/login">
+              <i class="fa-solid fa-right-to-bracket"></i> Login
+            </a>
+          </li>
+          <li class="nav-item" sec:authorize="hasRole('ROLE_ADMIN')">
+            <a class="btn btn-light btn-sm ml-3" href="/admin">
+               Admin Menu
+            </a>
+          </li>
+        </ul>
+      </div>
+    </div>
+  </nav>
+</header>
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/inlShow.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/inlShow.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/inlShow.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,115 @@
+<div class="container" xmlns:th="http://www.thymeleaf.org">
+    <form class="form-signin mt-xl-5" method="post" th:action="@{'/instanca-na-linija/{id}/end'(id=${inl.inlId})}">
+        <h2 class="form-signin-heading">Instanca na linija</h2>
+
+        <p>
+            <label for="aRegistracija" class="sr-only">Avtobus</label>
+            <input type="text"
+                   class="form-controll"
+                   th:value="${inl.avtobusByARegistracija.aRegistracija} "
+                   disabled
+                   name="aRegistracija"
+                   id="aRegistracija"
+            >
+        </p>
+
+        <p>
+            <label for="liId" class="sr-only">Linija</label>
+            <select id="liId" name="liId" class="form-control">
+                <option th:value="${inl.linijaByLiId.liId}"
+                        th:text="${inl.linijaByLiId.liIme} + ' - ' + ${inl.linijaByLiId.liPravec}"
+                        selected
+                        disabled></option>
+            </select>
+
+
+        </p>
+
+
+        <div th:if="${param.error}" th:text="${param.error}" class="text-danger"></div>
+
+        <div class="row">
+            <div class="col-md-3">
+                <button th:disabled="${inl.inlDatumEnd != null} ? 'true' : 'false'"
+                        id="submit"
+                        class="btn btn-lg btn-primary btn-block"
+                        type="submit"
+                        th:text="${inl.inlDatumEnd != null} ? 'Already ended' : 'End'"></button>
+            </div>
+        </div>
+    </form>
+
+    <div xmlns:th="http://www.thymeleaf.org">
+
+        <div class="container mb-4">
+            <div class="row">
+                <div class="col-12" >
+                    <div class="table-responsive">
+                        <table class="table table-striped">
+                            <thead>
+                            <tr>
+                                <th scope="col">#</th>
+                                <th scope="col">Timestamp</th>
+                                <th scope="col">Kondukter</th>
+                                <th scope="col"></th>
+                                <th scope="col"></th>
+                                <th scope="col"></th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr th:each="kontrola : ${kontroli}" class="product">
+                                <td >
+                                    <a th:text="${kontrola.kontrolaId}" th:href="@{'/kontrola/{id}'(id= ${kontrola.kontrolaId})}"></a>
+                                </td>
+                                <td th:text="${kontrola.kontrolaDatum}"></td>
+                                <td th:text="${kontrola.korisnikByKondukterKId.kIme}"></td>
+
+                                <td class="text-right">
+                                    <!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+                                    <!--                                    <form th:action="@{'/products/delete/{id}' (id=${vozenje.vozenjeId})}"-->
+                                    <!--                                          th:method="DELETE">-->
+                                    <!--                                        <button type="submit"-->
+                                    <!--                                                class="btn btn-sm btn-danger delete-product">-->
+                                    <!--                                            <i class="fas fa-trash-alt"></i> Delete-->
+                                    <!--                                        </button>-->
+                                    <!--                                    </form>-->
+                                    <!--                                </th:block>-->
+                                </td>
+                                <td>
+                                    <!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+                                    <!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${vozenje.vozenjeId})}"-->
+                                    <!--                                       class="btn btn-sm btn-info edit-product">-->
+                                    <!--                                        <i class="fas fa-edit"></i> Edit-->
+                                    <!--                                    </a>-->
+                                    <!--                                </th:block>-->
+                                </td>
+                                <td>
+<!--                                    <form th:action="@{'/kontrola/start-for/{id}'(id=${inl.inlId})}"-->
+<!--                                          th:method="GET">-->
+<!--                                        <button type="submit" class="btn btn-sm btn-success add-to-cart">-->
+<!--                                            <i class="fas fa-shopping-cart"></i> Kontrola-->
+<!--                                        </button>-->
+<!--                                    </form>-->
+                                </td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+                <div class="col mb-3">
+                    <div class="row">
+                        <div class="col-sm-12 col-md-12">
+                            <a href="/instanca-na-linija/start" class="btn btn-block btn-dark add-product-btn">
+                                Start instanca
+                            </a>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+
+
+</div>
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/kontrola.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/kontrola.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/kontrola.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,150 @@
+<div xmlns:th="http://www.thymeleaf.org">
+
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" >
+
+    <form class="form-signin mt-xl-5" method="post" th:action="@{'/kontrola/{id}/kazni-neregistriran'(id=${kontrola.kontrolaId})}">
+        <h2 class="form-signin-heading">Kazna za neregirstiran</h2>
+
+        <p>
+            <label for="dokument" >Dokument</label>
+            <input class="form-control" name="dokument" id="dokument" type="text">
+        </p>
+
+
+        <p>
+            <label for="telefon" >Telefon</label>
+            <input class="form-control" name="telefon" id="telefon" type="text">
+        </p>
+
+        <p>
+            <label for="ime" >Ime</label>
+            <input class="form-control" name="ime" id="ime" type="text">
+        </p>
+
+        <p>
+            <label for="adresa" >Adresa</label>
+            <input class="form-control" name="adresa" id="adresa" type="text">
+        </p>
+
+
+        <p>
+            <label for="iznos" >Iznos</label>
+            <input class="form-control" name="iznos" id="iznos" type="number">
+        </p>
+
+
+        <div th:if="${param.error}" th:text="${param.error}" class="text-danger"></div>
+
+        <div class="row">
+            <div class="col-md-3">
+                <button id="submit" class="btn btn-lg btn-primary btn-block" type="submit">Kazni</button>
+            </div>
+        </div>
+    </form>
+
+
+
+    <form class="form-signin mt-xl-5" method="post" th:action="@{'/kontrola/{id}/kazni-registriran'(id=${kontrola.kontrolaId})}">
+        <h2 class="form-signin-heading">Kazna za regirstiran</h2>
+
+        <p>
+            <label for="dk" >Dokument</label>
+            <input class="form-control" name="dokument" id="dk" type="text">
+        </p>
+
+        <p>
+            <label for="iz" >Iznos</label>
+            <input class="form-control" name="iznos" id="iz" type="number">
+        </p>
+
+        <p>
+            <label for="patnik" >Patnik</label>
+            <select id="patnik" name="patnik" class="form-control">
+                <option th:each="patnik : ${patnici}"
+                        th:value="${patnik.kId}"
+                        th:text="${patnik.kIme} + ' - ' + ${patnik.kEmail}">
+
+                </option>
+            </select>
+        </p>
+
+
+        <div th:if="${param.error}" th:text="${param.error}" class="text-danger"></div>
+
+        <div class="row">
+            <div class="col-md-3">
+                <button id="sub" class="btn btn-lg btn-primary btn-block" type="submit">Kazni</button>
+            </div>
+        </div>
+    </form>
+
+            </div>
+        </div>
+    </div>
+
+
+
+
+
+
+
+
+
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" >
+                <div class="table-responsive">
+                    <table class="table table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col">#</th>
+                            <th scope="col">Iznos</th>
+                            <th scope="col">Plateno</th>
+                            <th scope="col">Dokument</th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr th:each="kazna : ${kazni}" class="product">
+                            <td th:text="${kazna.kzId}"></td>
+                            <td th:text="${kazna.kzIznos}"></td>
+                            <td th:text="${kazna.kzPlateno}"></td>
+                            <td th:text="${kazna.kzDokument}"></td>
+
+                            <td class="text-right">
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <form th:action="@{'/products/delete/{id}' (id=${kazna.kzId})}"-->
+<!--                                          th:method="DELETE">-->
+<!--                                        <button type="submit"-->
+<!--                                                class="btn btn-sm btn-danger delete-product">-->
+<!--                                            <i class="fas fa-trash-alt"></i> Delete-->
+<!--                                        </button>-->
+<!--                                    </form>-->
+<!--                                </th:block>-->
+                            </td>
+                            <td>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${kazna.kzId})}"-->
+<!--                                       class="btn btn-sm btn-info edit-product">-->
+<!--                                        <i class="fas fa-edit"></i> Edit-->
+<!--                                    </a>-->
+<!--                                </th:block>-->
+                            </td>
+                            <td>
+
+                            </td>
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>
+
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/kupiBilet.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/kupiBilet.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/kupiBilet.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,20 @@
+<div xmlns:th="http://www.thymeleaf.org">
+
+
+    <div style="width: 500px">
+        <form method="post" action="/bilet/kupi">
+
+            <p>
+                <label for="tipbilet" class="sr-only">Tip Bilet</label>
+                <select id="tipbilet" name="tipbilet" class="form-control">
+                    <option class="form-control" th:each="tip : ${tipbileti}" th:value="${tip.tbId}" th:text="${tip.tbIme}"></option>
+                </select>
+            </p>
+
+            <input type="submit" value="Kupi" class="btn btn-success">
+        </form>
+
+    </div>
+</div>
+
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/listBileti.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/listBileti.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/listBileti.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,67 @@
+<div xmlns:th="http://www.thymeleaf.org">
+
+
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" >
+                <div class="table-responsive">
+                    <table class="table table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col">#</th>
+                            <th scope="col">Status</th>
+                            <th scope="col">Korisnik Ime</th>
+                            <th scope="col">Tip Bilet</th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr th:each="bilet : ${bileti}" class="product">
+                            <td th:text="${bilet.bId}"></td>
+                            <td th:text="${bilet.bStatus.name()}"></td>
+                            <td th:text="${bilet.korisnikByPatnikKId.kIme}"></td>
+                            <td th:text="${bilet.tipbiletByTbId.tbIme}"></td>
+
+                            <td class="text-right">
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <form th:action="@{'/products/delete/{id}' (id=${bilet.bId})}"-->
+<!--                                          th:method="DELETE">-->
+<!--                                        <button type="submit"-->
+<!--                                                class="btn btn-sm btn-danger delete-product">-->
+<!--                                            <i class="fas fa-trash-alt"></i> Delete-->
+<!--                                        </button>-->
+<!--                                    </form>-->
+<!--                                </th:block>-->
+                            </td>
+                            <td>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${bilet.bId})}"-->
+<!--                                       class="btn btn-sm btn-info edit-product">-->
+<!--                                        <i class="fas fa-edit"></i> Edit-->
+<!--                                    </a>-->
+<!--                                </th:block>-->
+                            </td>
+                            <td>
+
+                            </td>
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <div class="col mb-3">
+                <div class="row">
+                    <div class="col-sm-12 col-md-12">
+                        <a href="/bilet/kupi" class="btn btn-block btn-dark add-product-btn">
+                            Kupi bilet
+                        </a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/listInstanci.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/listInstanci.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/listInstanci.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,80 @@
+<div xmlns:th="http://www.thymeleaf.org">
+
+
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" >
+                <div class="table-responsive">
+                    <table class="table table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col">#</th>
+                            <th scope="col">Vozac</th>
+                            <th scope="col">Avtobus</th>
+                            <th scope="col">Linija</th>
+                            <th scope="col">Pravec</th>
+                            <th scope="col">Start date</th>
+                            <th scope="col">End date</th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr th:each="inl : ${inls}" class="product">
+                            <td >
+                                <a th:text="${inl.inlId}" th:href="@{'/instanca-na-linija/{id}'(id= ${inl.inlId})}"></a>
+                            </td>
+                            <td th:text="${inl.korisnikByVozacKId.kIme}"></td>
+                            <td th:text="${inl.avtobusByARegistracija.aRegistracija}"></td>
+                            <td th:text="${inl.linijaByLiId.liIme}"></td>
+                            <td th:text="${inl.linijaByLiId.liPravec}"></td>
+                            <td th:text="${inl.inlDatumStart.toString()}"></td>
+                            <td th:text="${inl.inlDatumEnd != null} ? ${inl.inlDatumEnd.toString()} : 'Still active'"></td>
+
+                            <td class="text-right">
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <form th:action="@{'/products/delete/{id}' (id=${vozenje.vozenjeId})}"-->
+<!--                                          th:method="DELETE">-->
+<!--                                        <button type="submit"-->
+<!--                                                class="btn btn-sm btn-danger delete-product">-->
+<!--                                            <i class="fas fa-trash-alt"></i> Delete-->
+<!--                                        </button>-->
+<!--                                    </form>-->
+<!--                                </th:block>-->
+                            </td>
+                            <td>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${vozenje.vozenjeId})}"-->
+<!--                                       class="btn btn-sm btn-info edit-product">-->
+<!--                                        <i class="fas fa-edit"></i> Edit-->
+<!--                                    </a>-->
+<!--                                </th:block>-->
+                            </td>
+                            <td>
+                                <form th:action="@{'/kontrola/start-for/{id}'(id=${inl.inlId})}"
+                                      th:method="GET">
+                                    <button type="submit" class="btn btn-sm btn-success add-to-cart">
+                                         Kontrola
+                                    </button>
+                                </form>
+                            </td>
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <div class="col mb-3">
+                <div class="row">
+                    <div class="col-sm-12 col-md-12">
+                        <a href="/instanca-na-linija/start" class="btn btn-block btn-dark add-product-btn">
+                            Start instanca
+                        </a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/listKazni.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/listKazni.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/listKazni.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,76 @@
+<div xmlns:th="http://www.thymeleaf.org">
+
+
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" >
+                <div class="table-responsive">
+                    <table class="table table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col">#</th>
+                            <th scope="col">Iznos</th>
+                            <th scope="col">Datum</th>
+                            <th scope="col">Plateno</th>
+                            <th scope="col">Datum plateno</th>
+                            <th scope="col">Dokument</th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr th:each="kazna : ${kazni}" class="product">
+                            <td th:text="${kazna.kzId}"></td>
+                            <td th:text="${kazna.kzIznos}"></td>
+                            <td th:text="${kazna.kzDatum}"></td>
+                            <td th:text="${kazna.kzPlateno}"></td>
+                            <td th:text="${kazna.kzDatumPlateno}"></td>
+                            <td th:text="${kazna.kzDokument}"></td>
+
+                            <td class="text-right">
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <form th:action="@{'/products/delete/{id}' (id=${kazna.kzId})}"-->
+<!--                                          th:method="DELETE">-->
+<!--                                        <button type="submit"-->
+<!--                                                class="btn btn-sm btn-danger delete-product">-->
+<!--                                            <i class="fas fa-trash-alt"></i> Delete-->
+<!--                                        </button>-->
+<!--                                    </form>-->
+<!--                                </th:block>-->
+                            </td>
+                            <td>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${kazna.kzId})}"-->
+<!--                                       class="btn btn-sm btn-info edit-product">-->
+<!--                                        <i class="fas fa-edit"></i> Edit-->
+<!--                                    </a>-->
+<!--                                </th:block>-->
+                            </td>
+                            <td>
+                                <form th:action="@{'/kazna/{id}/pay' (id=${kazna.kzId})}"
+                                      th:method="POST">
+                                    <button type="submit" class="btn btn-sm btn-success add-to-cart">
+                                         Pay
+                                    </button>
+                                </form>
+                            </td>
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <div class="col mb-3">
+                <div class="row">
+                    <div class="col-sm-12 col-md-12">
+                        <a href="/bilet/kupi" class="btn btn-block btn-dark add-product-btn">
+                            Kupi bilet
+                        </a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/listVozenja.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/listVozenja.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/listVozenja.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,83 @@
+<div xmlns:th="http://www.thymeleaf.org">
+    <section class="jumbotron text-center">
+        <div class="container">
+            <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
+            <h3 class="jumbotron-heading">All products</h3>
+        </div>
+    </section>
+
+    <form method="get" action="/vozenje">
+        <select name="status">
+            <option th:each="status : ${vozStatus}" th:value="${status}" th:text="${status.name()}"></option>
+        </select>
+
+        <input type="submit" value="Search">
+    </form>
+
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" >
+                <div class="table-responsive">
+                    <table class="table table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col">#</th>
+                            <th scope="col">Status</th>
+                            <th scope="col">Korisnik Ime</th>
+                            <th scope="col">Bilet Id</th>
+                            <th scope="col">Tip Bilet</th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr th:each="vozenje : ${vozenja}" class="product">
+                            <td th:text="${vozenje.vozenjeId}"></td>
+                            <td th:text="${vozenje.vozenjeStatus.name()}"></td>
+                            <td th:text="${vozenje.korisnikByPatnikKId.kIme}"></td>
+                            <td th:text="${vozenje.biletByBId.bId}"></td>
+                            <td th:text="${vozenje.biletByBId.tipbiletByTbId.tbIme}"></td>
+
+                            <td class="text-right">
+                                <th:block  >
+                                    <form th:action="@{'/vozenje/{id}/end' (id=${vozenje.vozenjeId})}"
+                                          th:hidden="${vozenje.vozenjeStatus.name().equals('FINISHED')} ? 'true' : 'false'"
+                                          th:method="GET">
+                                        <button type="submit"
+                                                class="btn btn-sm btn-danger delete-product">
+                                            <i class="fas fa-trash-alt"></i> End
+                                        </button>
+                                    </form>
+                                </th:block>
+                            </td>
+                            <td>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${vozenje.vozenjeId})}"-->
+<!--                                       class="btn btn-sm btn-info edit-product">-->
+<!--                                        <i class="fas fa-edit"></i> Edit-->
+<!--                                    </a>-->
+<!--                                </th:block>-->
+                            </td>
+                            <td>
+
+                            </td>
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <div class="col mb-3">
+                <div class="row">
+                    <div class="col-sm-12 col-md-12">
+                        <a href="/vozenje/start" class="btn btn-block btn-dark add-product-btn">
+                            Start vozenje
+                        </a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/login.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/login.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/login.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,27 @@
+<div class="container" xmlns:th="http://www.thymeleaf.org">
+    <form class="form-signin mt-xl-5" method="post" action="/login">
+        <h2 class="form-signin-heading">Sign in</h2>
+        <p>
+            <label for="username" class="sr-only">Username</label>
+            <input type="text" id="username" name="username" class="form-control" placeholder="Username" required=""
+                   autofocus="">
+        </p>
+        <p>
+            <label for="password" class="sr-only">Password</label>
+            <input type="password" id="password" name="password" class="form-control" placeholder="Password"
+                   required="">
+        </p>
+
+        <div th:if="${param.error}" th:text="${param.error}" class="text-danger"></div>
+
+        <div class="row">
+            <div class="col-md-3">
+                <button id="submit" class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
+            </div>
+            <div class="col-md-3">
+                <a href="/register" class="btn btn-lg btn-block btn-light">Register here</a>
+            </div>
+        </div>
+    </form>
+</div>
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/master-template.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/master-template.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/master-template.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8"/>
+    <title>Products</title>
+    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
+          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
+    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
+            integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
+            crossorigin="anonymous"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
+            integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
+            crossorigin="anonymous"></script>
+    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
+            integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
+            crossorigin="anonymous"></script>
+    <script src="https://kit.fontawesome.com/e59232f0a1.js" crossorigin="anonymous"></script>
+</head>
+<body>
+<header th:replace="fragments/header"/>
+
+<div th:text="${error}"></div>
+
+<section th:include="${bodyContent}">
+
+</section>
+<footer th:replace="fragments/footer"/>
+</body>
+</html>
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/register.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/register.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/register.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,57 @@
+<div xmlns:th="http://www.thymeleaf.org">
+
+  <div class="container mb-4">
+    <form class="form-signin mt-xl-5" method="post" action="/register">
+      <h2 class="form-signin-heading">Register</h2>
+      <p>
+        <label for="username" class="sr-only">Email</label>
+        <input type="text" id="username" name="email" class="form-control" placeholder="Email" required="" autofocus="">
+      </p>
+      <p>
+        <label for="password" class="sr-only">Password</label>
+        <input type="password" id="password" name="password" class="form-control" placeholder="Password" required="">
+      </p>
+      <p>
+        <label for="repeatedPassword" class="sr-only">Repeat Password</label>
+        <input type="password" id="repeatedPassword" name="confirmPassword" class="form-control" placeholder="Repeat Password" required="">
+      </p>
+      <p>
+        <label for="name" class="sr-only">Name</label>
+        <input type="text" id="name" name="name" class="form-control" placeholder="Name" required="" autofocus="">
+      </p>
+      <p>
+        <label for="surname" class="sr-only">Address</label>
+        <input type="text" id="surname" name="address" class="form-control" placeholder="Address" required="" autofocus="">
+      </p>
+      <p>
+        <label for="phone" class="sr-only">Phone</label>
+        <input type="text" id="phone" name="phone" class="form-control" placeholder="Phone" required="" autofocus="">
+      </p>
+
+<!--      <p sec:authorize="hasRole('ROLE_ADMIN')">-->
+        <label for="role" class="sr-only">Role</label>
+        <select name="role" id="role">
+          <option th:each="role : ${roles}"
+                  th:text="${role.name()}"
+                  th:value="${role}" ></option>
+        </select>
+<!--      </p>-->
+
+      <p sec:authorize="hasRole('ROLE_ADMIN')">
+        <label for="salary" class="sr-only">Salary</label>
+        <input type="number" id="salary" name="salary">
+      </p>
+
+
+
+
+      <th:block th:if="${hasError}">
+        <div th:text="${error}" class="text-danger"></div>
+      </th:block>
+
+      <button class="btn btn-lg btn-primary btn-block" type="submit">Sign up</button>
+    </form>
+    <a href="/login" class="btn btn-block btn-light">Already have an account? Login here!</a>
+  </div>
+
+</div>
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/startInstanca.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/startInstanca.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/startInstanca.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,29 @@
+<div class="container" xmlns:th="http://www.thymeleaf.org">
+    <form class="form-signin mt-xl-5" method="post" action="/instanca-na-linija/start">
+        <h2 class="form-signin-heading">Start instanca na linija</h2>
+
+        <p>
+            <label for="aRegistracija" class="sr-only">Avtobus</label>
+            <select   class="form-control" name="aRegistracija" id="aRegistracija">
+                <option class="form-control" th:each="avtobus : ${avtobusi}" th:text="${avtobus.aRegistracija}"  th:value="${avtobus.aRegistracija} "  ></option>
+            </select>
+        </p>
+
+        <p>
+            <label for="liId" class="sr-only">Password</label>
+            <select id="liId" name="liId" class="form-control">
+                <option th:each="linija : ${linii}" th:value="${linija.liId}" th:text="${linija.liIme} + ' - ' + ${linija.liPravec}"></option>
+            </select>
+        </p>
+
+
+        <div th:if="${param.error}" th:text="${param.error}" class="text-danger"></div>
+
+        <div class="row">
+            <div class="col-md-3">
+                <button id="submit" class="btn btn-lg btn-primary btn-block" type="submit">Start</button>
+            </div>
+        </div>
+    </form>
+</div>
+
Index: bus-n-go-do-5ta-faza/src/main/resources/templates/startVozenje.html
===================================================================
--- bus-n-go-do-5ta-faza/src/main/resources/templates/startVozenje.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/main/resources/templates/startVozenje.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,35 @@
+<div class="container" xmlns:th="http://www.thymeleaf.org">
+    <form class="form-signin mt-xl-5" th:method="${postojka} != null ? 'post' : 'get'" action="/vozenje/start">
+        <h2 class="form-signin-heading">Start vozenje</h2>
+
+        <p>
+            <label for="pnlId" class="sr-only">Postojka</label>
+            <select   class="form-control" name="pnlId" id="pnlId">
+                <option class="form-control" th:each="pos : ${postojki}" th:text="${pos.postojkaByPId.pIme}" th:selected="${postojka!= null && postojka.pnlId == pos.pnlId} ? 'true' : 'false' " th:disabled="${postojka!= null && postojka.pnlId != pos.pnlId} ? 'true' : 'false' "  th:value="${pos.pnlId} "  ></option>
+            </select>
+        </p>
+
+        <p th:hidden="${instanci} == null">
+            <label for="instanca" class="sr-only">Password</label>
+            <select id="instanca" name="inlId" class="form-control">
+                <option th:each="instanca : ${instanci}" th:value="${instanca.inlId}" th:text="${instanca.linijaByLiId.liIme} + ' - ' + ${instanca.linijaByLiId.liPravec}"></option>
+            </select>
+        </p>
+
+        <p th:hidden="${instanci} == null">
+            <label for="bilet" class="sr-only">Password</label>
+            <select id="bilet" name="bId" class="form-control">
+                <option th:each="bilet : ${bileti}" th:value="${bilet.bId}" th:text="${bilet.tipbiletByTbId.tbIme} + ' - ' + ${bilet.bStatus.name()}"></option>
+            </select>
+        </p>
+
+        <div th:if="${param.error}" th:text="${param.error}" class="text-danger"></div>
+
+        <div class="row">
+            <div class="col-md-3">
+                <button id="submit" class="btn btn-lg btn-primary btn-block" type="submit">Start</button>
+            </div>
+        </div>
+    </form>
+</div>
+
Index: bus-n-go-do-5ta-faza/src/test/java/mk/ukim/finki/busngo/BusNGoApplicationTests.java
===================================================================
--- bus-n-go-do-5ta-faza/src/test/java/mk/ukim/finki/busngo/BusNGoApplicationTests.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-do-5ta-faza/src/test/java/mk/ukim/finki/busngo/BusNGoApplicationTests.java	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,13 @@
+package mk.ukim.finki.busngo;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class BusNGoApplicationTests {
+
+    @Test
+    void contextLoads() {
+    }
+
+}
