Index: ReserveNGo-backend/docker-compose.yml
===================================================================
--- ReserveNGo-backend/docker-compose.yml	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/docker-compose.yml	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,14 @@
+version: '3'
+
+services:
+  wp-db:
+    image: "postgres"
+    container_name: "wp2024_resAndGo"
+    environment:
+      - POSTGRES_USER=za123
+      - POSTGRES_PASSWORD=123
+      - POSTGRES_DB=resandgo
+    ports:
+      - "5432:5432"
+    volumes:
+      - ./postgres-data:/var/lib/postgresql/data
Index: ReserveNGo-backend/pom.xml
===================================================================
--- ReserveNGo-backend/pom.xml	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/pom.xml	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -59,4 +59,22 @@
 
         <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-api</artifactId>
+            <version>0.11.5</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-impl</artifactId>
+            <version>0.11.5</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-jackson</artifactId>
+            <version>0.11.5</version>
+        </dependency>
+
+        <dependency>
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/ReserveNGoApplication.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/ReserveNGoApplication.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/ReserveNGoApplication.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -14,8 +14,3 @@
         SpringApplication.run(ReserveNGoApplication.class, args);
     }
-
-    @Bean
-    PasswordEncoder passwordEncoder() {
-        return new BCryptPasswordEncoder(10);
-    }
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/bootstrap/DataHolder.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/bootstrap/DataHolder.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/bootstrap/DataHolder.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -3,5 +3,7 @@
 import jakarta.annotation.PostConstruct;
 import mk.ukim.finki.it.reservengo.model.*;
-import mk.ukim.finki.it.reservengo.model.enumerations.*;
+import mk.ukim.finki.it.reservengo.model.enumerations.Position;
+import mk.ukim.finki.it.reservengo.model.enumerations.Role;
+import mk.ukim.finki.it.reservengo.model.enumerations.Service;
 import mk.ukim.finki.it.reservengo.repository.*;
 import org.springframework.security.crypto.password.PasswordEncoder;
@@ -17,25 +19,19 @@
     public static List<LocalWorker> workers = new ArrayList<>();
     public static List<LocalManager> managers = new ArrayList<>();
-    public static List<Event> events = new ArrayList<>();
-    public static List<Reservation> reservations = new ArrayList<>();
     public static List<Local> locals = new ArrayList<>();
 
     private final AdminRepository adminRepository;
     private final CustomerRepository customerRepository;
-    private final EventRepository eventRepository;
     private final LocalManagerRepository localManagerRepository;
     private final LocalRepository localRepository;
     private final LocalWorkerRepository localWorkerRepository;
-    private final ReservationRepository reservationRepository;
     private final PasswordEncoder passwordEncoder;
 
-    public DataHolder(AdminRepository adminRepository, CustomerRepository customerRepository, EventRepository eventRepository, LocalManagerRepository localManagerRepository, LocalRepository localRepository, LocalWorkerRepository localWorkerRepository, ReservationRepository reservationRepository, PasswordEncoder passwordEncoder) {
+    public DataHolder(AdminRepository adminRepository, CustomerRepository customerRepository, LocalManagerRepository localManagerRepository, LocalRepository localRepository, LocalWorkerRepository localWorkerRepository, PasswordEncoder passwordEncoder) {
         this.adminRepository = adminRepository;
         this.customerRepository = customerRepository;
-        this.eventRepository = eventRepository;
         this.localManagerRepository = localManagerRepository;
         this.localRepository = localRepository;
         this.localWorkerRepository = localWorkerRepository;
-        this.reservationRepository = reservationRepository;
         this.passwordEncoder = passwordEncoder;
     }
@@ -61,6 +57,58 @@
         customerRepository.saveAll(customers);
 
-        // Print for debugging purposes
-        System.out.println("Initialization complete!");
+        //Local worker
+        for (int i = 1; i <= 3; i++) {
+            LocalWorker localWorker = new LocalWorker(
+                    "FirstName" + i,
+                    "LastName" + i,
+                    "Email" + i,
+                    "Password" + i,
+                    "PhoneNumber" + i,
+                    Role.LOCAL_WORKER
+            );
+            workers.add(localWorker);
+        }
+        localWorkerRepository.saveAll(workers);
+
+        //Local manager
+        for (int i = 1; i <= 3; i++) {
+            LocalManager manager = new LocalManager(
+                    "FirstName" + i,
+                    "LastName" + i,
+                    "EmailManager" + i,
+                    "Password" + i,
+                    "PhoneNumber" + i,
+                    Role.LOCAL_MANAGER
+            );
+            managers.add(manager);
+        }
+        localManagerRepository.saveAll(managers);
+
+        //Local
+        List<Service> serviceList = new ArrayList<>(List.of(Service.values()));
+        List<String> localPhotos;
+        for (int i = 1; i <= 3; i++) {
+            localPhotos = new ArrayList<>();
+            for (int j = 1; j <= 3; j++) {
+                localPhotos.add("Picture number: " + j);
+            }
+            Local local = new Local(
+                    "Name" + i,
+                    "Description" + i,
+                    "Address" + i,
+                    "WorkingHours" + i,
+                    serviceList,
+                    null,
+                    null,
+                    localPhotos,
+                    "MenuPhoto" + i,
+                    "MenuLink" + i,
+                    null,
+                    null,
+                    null
+            );
+            locals.add(local);
+        }
+        localRepository.saveAll(locals);
     }
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/config/ApplicationConfig.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/config/ApplicationConfig.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/config/ApplicationConfig.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,47 @@
+package mk.ukim.finki.it.reservengo.config;
+
+import mk.ukim.finki.it.reservengo.model.exceptions.EmailNotFoundException;
+import mk.ukim.finki.it.reservengo.repository.UserRepository;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.AuthenticationProvider;
+import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
+import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
+
+@Configuration
+public class ApplicationConfig {
+
+    private final UserRepository userRepository;
+
+    public ApplicationConfig(UserRepository userRepository) {
+        this.userRepository = userRepository;
+    }
+
+    @Bean
+    PasswordEncoder passwordEncoder() {
+        return new BCryptPasswordEncoder(10);
+
+    }
+
+    @Bean
+    public UserDetailsService userDetailsService() {
+        return username -> this.userRepository.findByEmail(username).orElseThrow(() -> new EmailNotFoundException(username));
+    }
+
+    @Bean
+    public AuthenticationProvider authenticationProvider() {
+        DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider();
+        authProvider.setUserDetailsService(userDetailsService());
+        authProvider.setPasswordEncoder(passwordEncoder());
+        return authProvider;
+    }
+
+    @Bean
+    public AuthenticationManager authenticationManager(AuthenticationConfiguration config) throws Exception {
+        return config.getAuthenticationManager();
+    }
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/config/WebSecurityConfig.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/config/WebSecurityConfig.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/config/WebSecurityConfig.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -1,6 +1,8 @@
 package mk.ukim.finki.it.reservengo.config;
 
+import mk.ukim.finki.it.reservengo.config.filter.JWTAuthenticationFilter;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.security.authentication.AuthenticationProvider;
 import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@@ -8,5 +10,7 @@
 import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
 import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer;
+import org.springframework.security.config.http.SessionCreationPolicy;
 import org.springframework.security.web.SecurityFilterChain;
+import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
 
 @Configuration
@@ -14,4 +18,13 @@
 @EnableMethodSecurity
 public class WebSecurityConfig {
+
+
+    private final JWTAuthenticationFilter jwtAuthFilter;
+    private final AuthenticationProvider authenticationProvider;
+
+    public WebSecurityConfig(JWTAuthenticationFilter jwtAuthFilter, AuthenticationProvider authenticationProvider) {
+        this.jwtAuthFilter = jwtAuthFilter;
+        this.authenticationProvider = authenticationProvider;
+    }
 
     @Bean
@@ -23,10 +36,8 @@
                 )
                 .authorizeHttpRequests((requests) -> requests
-                        .requestMatchers("/**")
+                        .requestMatchers("/api/auth/**", "/h2/**")
                         .permitAll()
-                )
-                .formLogin((form) -> form
-                        .permitAll()
-                        .defaultSuccessUrl("/", true)
+                        .anyRequest()
+                        .authenticated()
                 )
                 .logout((logout) -> logout
@@ -35,5 +46,11 @@
                         .deleteCookies("JSESSIONID")
                         .logoutSuccessUrl("/login")
-                );
+                )
+                .sessionManagement(manager -> manager
+                        .sessionCreationPolicy(SessionCreationPolicy.STATELESS)
+                )
+                .authenticationProvider(authenticationProvider)
+                .addFilterBefore(jwtAuthFilter, UsernamePasswordAuthenticationFilter.class)
+        ;
 
         return http.build();
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/config/filter/JWTAuthenticationFilter.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/config/filter/JWTAuthenticationFilter.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/config/filter/JWTAuthenticationFilter.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,53 @@
+package mk.ukim.finki.it.reservengo.config.filter;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.NonNull;
+import mk.ukim.finki.it.reservengo.service.impl.JWTServiceImpl;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
+import org.springframework.stereotype.Component;
+import org.springframework.web.filter.OncePerRequestFilter;
+
+import java.io.IOException;
+
+@Component
+public class JWTAuthenticationFilter extends OncePerRequestFilter {
+
+    private final JWTServiceImpl jwtService;
+    private final UserDetailsService userDetailsService;
+
+    public JWTAuthenticationFilter(JWTServiceImpl jwtService, UserDetailsService userDetailsService) {
+        this.jwtService = jwtService;
+        this.userDetailsService = userDetailsService;
+    }
+
+    @Override
+    protected void doFilterInternal(@NonNull HttpServletRequest request,
+                                    @NonNull HttpServletResponse response,
+                                    @NonNull FilterChain filterChain) throws ServletException, IOException {
+        final String authHeader = request.getHeader("Authorization");
+        final String jwt;
+        final String userEmail;
+        if (authHeader == null || !authHeader.startsWith("Bearer ")) {
+            filterChain.doFilter(request, response);
+            return;
+        }
+        jwt = authHeader.substring(7);
+        userEmail = jwtService.extractUsername(jwt);
+        if (userEmail != null && SecurityContextHolder.getContext().getAuthentication() == null) {
+            UserDetails userDetails = userDetailsService.loadUserByUsername(userEmail);
+            if (jwtService.isTokenValid(jwt, userDetails)) {
+                UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
+                authenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
+                SecurityContextHolder.getContext().setAuthentication(authenticationToken);
+            }
+        }
+        filterChain.doFilter(request, response);
+    }
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Admin.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Admin.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Admin.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -11,21 +11,7 @@
 @AllArgsConstructor
 @NoArgsConstructor
-public class Admin {
-    public Admin(String username, String password, Role userRole) {
-        this.username = username;
-        this.password = password;
-        this.userRole = userRole;
+public class Admin extends User {
+    public Admin(String email, String password, Role userRole) {
+        super(null, null, email, password, null, userRole);
     }
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    private Long id;
-
-    @Column(unique = true)
-    private String username;
-
-    private String password;
-
-    @Enumerated(EnumType.STRING)
-    private Role userRole = Role.ADMIN;
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Contact.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Contact.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Contact.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -16,5 +16,4 @@
 @Embeddable
 public class Contact {
-
     private String phone;
     private String email;
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Customer.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Customer.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Customer.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -19,5 +19,10 @@
 @NoArgsConstructor
 public class Customer extends User {
-    public Customer(String firstName, String lastName, String email, String password, String phoneNumber, Role userRole) {
+    public Customer(String firstName,
+                    String lastName,
+                    String email,
+                    String password,
+                    String phoneNumber,
+                    Role userRole) {
         super(firstName, lastName, email, password, phoneNumber, userRole);
     }
@@ -28,3 +33,5 @@
     @OneToMany
     private List<Local> favouriteLocals;
+
+
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/JWTAuthenticationResponse.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/JWTAuthenticationResponse.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/JWTAuthenticationResponse.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,31 @@
+package mk.ukim.finki.it.reservengo.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import mk.ukim.finki.it.reservengo.model.enumerations.Role;
+
+@Data
+//@AllArgsConstructor
+@NoArgsConstructor
+public class JWTAuthenticationResponse {
+    private Long id;
+    private String firstName;
+    private String lastName;
+    private String email;
+    private String password;
+    private String phoneNumber;
+    private Role role;
+    private String token;
+
+
+    public JWTAuthenticationResponse(Long id, String firstName, String lastName, String email, String phoneNumber, Role role, String token) {
+        this.id = id;
+        this.firstName = firstName;
+        this.lastName = lastName;
+        this.email = email;
+        this.phoneNumber = phoneNumber;
+        this.role = role;
+        this.token = token;
+    }
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/LocalManager.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/LocalManager.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/LocalManager.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -15,6 +15,6 @@
 @NoArgsConstructor
 public class LocalManager extends LocalWorker{
-    public LocalManager(String firstName, String lastName, String email, String password, String phoneNumber, Role userRole, Local local, Position position) {
-        super(firstName, lastName, email, password, phoneNumber, userRole, local, position);
+    public LocalManager(String firstName, String lastName, String email, String password, String phoneNumber, Role userRole) {
+        super(firstName, lastName, email, password, phoneNumber, userRole);
     }
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/LocalWorker.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/LocalWorker.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/LocalWorker.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -14,9 +14,7 @@
 @AllArgsConstructor
 @NoArgsConstructor
-public class LocalWorker extends User{
-    public LocalWorker(String firstName, String lastName, String email, String password, String phoneNumber, Role userRole, Local local, Position position) {
+public class LocalWorker extends User {
+    public LocalWorker(String firstName, String lastName, String email, String password, String phoneNumber, Role userRole) {
         super(firstName, lastName, email, password, phoneNumber, userRole);
-        this.local = local;
-        this.position = position;
     }
 
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/RegisterRequest.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/RegisterRequest.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/RegisterRequest.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,74 @@
+package mk.ukim.finki.it.reservengo.model;
+
+import mk.ukim.finki.it.reservengo.model.enumerations.Role;
+
+public class RegisterRequest {
+    private String firstName;
+    private String lastName;
+    private String email;
+    private String password;
+    private String phoneNumber;
+    private Role role;
+
+    // Constructors
+    public RegisterRequest() {
+    }
+
+    public RegisterRequest(String firstName, String lastName, String email, String password, String phoneNumber, Role role) {
+        this.firstName = firstName;
+        this.lastName = lastName;
+        this.email = email;
+        this.password = password;
+        this.phoneNumber = phoneNumber;
+        this.role = role;
+    }
+
+    // Getters and Setters
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getPhoneNumber() {
+        return phoneNumber;
+    }
+
+    public void setPhoneNumber(String phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+
+    public Role getRole() {
+        return role;
+    }
+
+    public void setRole(Role role) {
+        this.role = role;
+    }
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/User.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/User.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/User.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -4,8 +4,15 @@
 import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.Getter;
 import lombok.NoArgsConstructor;
 import mk.ukim.finki.it.reservengo.model.enumerations.Role;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
 
-@Data
+import java.util.Collection;
+import java.util.List;
+
+//@Data
 @Entity
 @AllArgsConstructor
@@ -13,5 +20,5 @@
 @Inheritance(strategy = InheritanceType.JOINED)
 @Table(name = "app_user")
-public class User {
+public class User implements UserDetails {
     public User(String firstName, String lastName, String email, String password, String phoneNumber, Role userRole) {
         this.firstName = firstName;
@@ -23,4 +30,7 @@
     }
 
+
+
+    @Getter
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -40,3 +50,75 @@
     @Enumerated(EnumType.STRING)
     private Role userRole;
+
+    @Override
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        return List.of(new SimpleGrantedAuthority(userRole.name())); //check here:IMPORTANT
+    }
+
+    @Override
+    public String getPassword() {
+        return password;
+    }
+
+    @Override
+    public String getUsername() {
+        return email;
+    }
+
+    @Override
+    public boolean isAccountNonExpired() {
+        return true;
+    }
+
+    @Override
+    public boolean isAccountNonLocked() {
+        return true;
+    }
+
+    @Override
+    public boolean isCredentialsNonExpired() {
+        return true;
+    }
+
+    @Override
+    public boolean isEnabled() {
+        return true;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public String getPhoneNumber() {
+        return phoneNumber;
+    }
+
+    public Role getUserRole() {
+        return userRole;
+    }
+
+    @Override
+    public String toString() {
+        return "User{" +
+                "id=" + id +
+                ", firstName='" + firstName + '\'' +
+                ", lastName='" + lastName + '\'' +
+                ", email='" + email + '\'' +
+                ", password='" + password + '\'' +
+                ", phoneNumber='" + phoneNumber + '\'' +
+                ", userRole=" + userRole +
+                '}';
+    }
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/enumerations/Role.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/enumerations/Role.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/enumerations/Role.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -4,5 +4,5 @@
     ADMIN,
     CUSTOMER,
-    RESTAURANT_MANAGER,
-    RESTAURANT_WORKER
+    LOCAL_MANAGER,
+    LOCAL_WORKER
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/exceptions/EmailNotFoundException.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/exceptions/EmailNotFoundException.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/exceptions/EmailNotFoundException.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.it.reservengo.model.exceptions;
+
+public class EmailNotFoundException extends RuntimeException {
+    public EmailNotFoundException(String username) {
+        super(String.format("User with email: %s was not found", username));
+    }
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/CustomerRepository.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/CustomerRepository.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/CustomerRepository.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -5,5 +5,9 @@
 import org.springframework.stereotype.Repository;
 
+import java.util.Optional;
+
 @Repository
 public interface CustomerRepository extends JpaRepository<Customer, Long> {
+
+    Optional<Customer> findByEmail(String email);
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/LocalManagerRepository.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/LocalManagerRepository.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/LocalManagerRepository.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -5,5 +5,8 @@
 import org.springframework.stereotype.Repository;
 
+import java.util.Optional;
+
 @Repository
 public interface LocalManagerRepository extends JpaRepository<LocalManager, Long> {
+    Optional<LocalManager> findByEmail(String email);
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/LocalWorkerRepository.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/LocalWorkerRepository.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/LocalWorkerRepository.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -5,5 +5,8 @@
 import org.springframework.stereotype.Repository;
 
+import java.util.Optional;
+
 @Repository
 public interface LocalWorkerRepository extends JpaRepository<LocalWorker, Long> {
+    Optional<LocalWorker> findByEmail(String email);
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/UserRepository.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/UserRepository.java	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/repository/UserRepository.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -5,6 +5,8 @@
 import org.springframework.stereotype.Repository;
 
+import java.util.Optional;
+
 @Repository
 public interface UserRepository extends JpaRepository<User, Long> {
-
+    Optional<User> findByEmail(String email);
 }
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/AdminServiceImpl.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/AdminServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/AdminServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,8 @@
+package mk.ukim.finki.it.reservengo.service.impl;
+
+import mk.ukim.finki.it.reservengo.service.intf.AdminService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class AdminServiceImpl implements AdminService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/AuthServiceImpl.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/AuthServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/AuthServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,106 @@
+package mk.ukim.finki.it.reservengo.service.impl;
+
+import mk.ukim.finki.it.reservengo.model.*;
+import mk.ukim.finki.it.reservengo.model.enumerations.Role;
+import mk.ukim.finki.it.reservengo.model.exceptions.EmailNotFoundException;
+import mk.ukim.finki.it.reservengo.repository.CustomerRepository;
+import mk.ukim.finki.it.reservengo.repository.LocalManagerRepository;
+import mk.ukim.finki.it.reservengo.repository.LocalWorkerRepository;
+import mk.ukim.finki.it.reservengo.repository.UserRepository;
+import mk.ukim.finki.it.reservengo.service.intf.AuthService;
+import mk.ukim.finki.it.reservengo.service.intf.JWTService;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.stereotype.Service;
+
+@Service
+public class AuthServiceImpl implements AuthService {
+    private final CustomerRepository customerRepository;
+    private final LocalWorkerRepository localWorkerRepository;
+    private final LocalManagerRepository localManagerRepository;
+    private final JWTService jwtService;
+    private final PasswordEncoder passwordEncoder;
+    private final AuthenticationManager authenticationManager;
+    private final UserRepository userRepository;
+
+    public AuthServiceImpl(CustomerRepository customerRepository, LocalWorkerRepository localWorkerRepository, LocalManagerRepository localManagerRepository, JWTService jwtService, PasswordEncoder passwordEncoder, AuthenticationManager authenticationManager, UserRepository userRepository) {
+        this.customerRepository = customerRepository;
+        this.localWorkerRepository = localWorkerRepository;
+        this.localManagerRepository = localManagerRepository;
+        this.jwtService = jwtService;
+        this.passwordEncoder = passwordEncoder;
+        this.authenticationManager = authenticationManager;
+        this.userRepository = userRepository;
+    }
+
+    @Override
+    public JWTAuthenticationResponse registerCustomer(String firstName, String lastName, String email, String password, String phoneNumber) {
+        Customer customer = new Customer(firstName, lastName, email, passwordEncoder.encode(password), phoneNumber, Role.CUSTOMER);
+        customerRepository.save(customer);
+        Customer customer1 = customerRepository.findByEmail(email).orElseThrow(() -> new EmailNotFoundException(email));
+        String jwt = jwtService.generateTokenNoClaims(customer);
+        System.out.println(jwt);
+        System.out.println(customer1);
+        return new JWTAuthenticationResponse(
+                customer1.getId(),
+                customer1.getFirstName(),
+                customer1.getLastName(),
+                customer1.getEmail(),
+                customer1.getPhoneNumber(),
+                Role.CUSTOMER,
+                jwt);
+    }
+
+    @Override
+    public JWTAuthenticationResponse registerLocalWorker(String firstName, String lastName, String email, String password, String phoneNumber) {
+        LocalWorker localWorker = new LocalWorker(firstName, lastName, email, passwordEncoder.encode(password), phoneNumber, Role.LOCAL_WORKER);
+        localWorkerRepository.save(localWorker);
+        LocalWorker localWorker1 = localWorkerRepository.findByEmail(email).orElseThrow(() -> new EmailNotFoundException(email));
+        String jwt = jwtService.generateTokenNoClaims(localWorker);
+
+        return new JWTAuthenticationResponse(
+                localWorker1.getId(),
+                localWorker1.getFirstName(),
+                localWorker1.getLastName(),
+                localWorker1.getEmail(),
+                localWorker1.getPhoneNumber(),
+                Role.LOCAL_WORKER,
+                jwt);
+    }
+
+    @Override
+    public JWTAuthenticationResponse registerLocalManager(String firstName, String lastName, String email, String password, String phoneNumber) {
+        LocalManager localManager = new LocalManager(firstName, lastName, email, passwordEncoder.encode(password), phoneNumber, Role.LOCAL_MANAGER);
+        localManagerRepository.save(localManager);
+        LocalManager localManager1 = localManagerRepository.findByEmail(email).orElseThrow(() -> new EmailNotFoundException(email));
+        String jwt = jwtService.generateTokenNoClaims(localManager);
+
+        return new JWTAuthenticationResponse(
+                localManager1.getId(),
+                localManager1.getFirstName(),
+                localManager1.getLastName(),
+                localManager1.getEmail(),
+                localManager1.getPhoneNumber(),
+                Role.LOCAL_MANAGER,
+                jwt);
+    }
+
+    @Override
+    public JWTAuthenticationResponse login(String email, String password) {
+        authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(email,password));
+        User user = userRepository.findByEmail(email).orElseThrow(() -> new EmailNotFoundException(email));
+        String jwt = jwtService.generateTokenNoClaims(user);
+        System.out.println(jwt);
+        System.out.println(user);
+        return new JWTAuthenticationResponse(
+                user.getId(),
+                user.getFirstName(),
+                user.getLastName(),
+                user.getEmail(),
+                user.getPhoneNumber(),
+                user.getUserRole(),
+                jwt);
+    }
+
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/CustomerServiceImpl.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/CustomerServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/CustomerServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,8 @@
+package mk.ukim.finki.it.reservengo.service.impl;
+
+import mk.ukim.finki.it.reservengo.service.intf.AdminService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CustomerServiceImpl implements AdminService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/EventServiceImpl.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/EventServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/EventServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,8 @@
+package mk.ukim.finki.it.reservengo.service.impl;
+
+import mk.ukim.finki.it.reservengo.service.intf.EventService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class EventServiceImpl implements EventService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/JWTServiceImpl.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/JWTServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/JWTServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,82 @@
+package mk.ukim.finki.it.reservengo.service.impl;
+
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.SignatureAlgorithm;
+import io.jsonwebtoken.io.Decoders;
+import io.jsonwebtoken.security.Keys;
+import mk.ukim.finki.it.reservengo.service.intf.JWTService;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.stereotype.Service;
+
+import java.security.Key;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.Function;
+
+@Service
+public class JWTServiceImpl implements JWTService {
+
+    private static final String SECRET_KEY = "7bce06d6331e532e8c4c85e6eaae4217711768fe1aa582b4549c2722a8ef0497";
+
+    @Override
+    public String extractUsername(String token) {
+        return extractClaim(token, Claims::getSubject);
+    }
+
+    @Override
+    public Claims extractAllClaims(String token) {
+        return Jwts.parserBuilder()
+                .setSigningKey(getSignInKey())
+                .build()
+                .parseClaimsJws(token)
+                .getBody();
+    }
+
+    @Override
+    public Key getSignInKey() {
+        byte[] keyBytes = Decoders.BASE64.decode(SECRET_KEY);
+        return Keys.hmacShaKeyFor(keyBytes);
+    }
+
+    @Override
+    public <T> T extractClaim(String token, Function<Claims, T> claimsResolver) {
+        final Claims claims = extractAllClaims(token);
+        return claimsResolver.apply(claims);
+    }
+
+    @Override
+    public String generateToken(Map<String, Object> extraClaims, UserDetails userDetails) {
+
+        return Jwts
+                .builder()
+                .setClaims(extraClaims)
+                .setSubject(userDetails.getUsername())
+                .setIssuedAt(new Date(System.currentTimeMillis()))
+                .setExpiration(new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 24))
+                .signWith(getSignInKey(), SignatureAlgorithm.HS256)
+                .compact();
+    }
+
+    @Override
+    public String generateTokenNoClaims(UserDetails userDetails) {
+        return generateToken(new HashMap<>(), userDetails);
+    }
+
+    @Override
+    public boolean isTokenValid(String token, UserDetails userDetails) {
+        final String username = extractUsername(token);
+        return (username.equals(userDetails.getUsername())) && !isTokenExpired(token);
+    }
+
+    @Override
+    public boolean isTokenExpired(String token) {
+        return extractExpiration(token).before(new Date());
+    }
+
+    @Override
+    public Date extractExpiration(String token) {
+        return extractClaim(token, Claims::getExpiration);
+    }
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/LocalManagerServiceImpl.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/LocalManagerServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/LocalManagerServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,8 @@
+package mk.ukim.finki.it.reservengo.service.impl;
+
+import mk.ukim.finki.it.reservengo.service.intf.LocalManagerService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class LocalManagerServiceImpl implements LocalManagerService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/LocalServiceImpl.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/LocalServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/LocalServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,8 @@
+package mk.ukim.finki.it.reservengo.service.impl;
+
+import mk.ukim.finki.it.reservengo.service.intf.LocalService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class LocalServiceImpl implements LocalService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/LocalWorkerServiceImpl.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/LocalWorkerServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/LocalWorkerServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,8 @@
+package mk.ukim.finki.it.reservengo.service.impl;
+
+import mk.ukim.finki.it.reservengo.service.intf.LocalWorkerService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class LocalWorkerServiceImpl implements LocalWorkerService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/ReservationServiceImpl.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/ReservationServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/ReservationServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,8 @@
+package mk.ukim.finki.it.reservengo.service.impl;
+
+import mk.ukim.finki.it.reservengo.service.intf.ReservationService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ReservationServiceImpl implements ReservationService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/UserServiceImpl.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/UserServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/impl/UserServiceImpl.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,8 @@
+package mk.ukim.finki.it.reservengo.service.impl;
+
+import mk.ukim.finki.it.reservengo.service.intf.UserService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class UserServiceImpl implements UserService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/AdminService.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/AdminService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/AdminService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,4 @@
+package mk.ukim.finki.it.reservengo.service.intf;
+
+public interface AdminService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/AuthService.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/AuthService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/AuthService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,14 @@
+package mk.ukim.finki.it.reservengo.service.intf;
+
+import mk.ukim.finki.it.reservengo.model.JWTAuthenticationResponse;
+import mk.ukim.finki.it.reservengo.model.exceptions.EmailNotFoundException;
+
+public interface AuthService {
+    JWTAuthenticationResponse registerCustomer(String firstName, String lastName, String email, String password, String phoneNumber) throws EmailNotFoundException;
+
+    JWTAuthenticationResponse registerLocalWorker(String firstName, String lastName, String email, String password, String phoneNumber);
+
+    JWTAuthenticationResponse registerLocalManager(String firstName, String lastName, String email, String password, String phoneNumber);
+
+    JWTAuthenticationResponse login(String email, String password);
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/CustomerService.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/CustomerService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/CustomerService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,4 @@
+package mk.ukim.finki.it.reservengo.service.intf;
+
+public interface CustomerService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/EventService.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/EventService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/EventService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,4 @@
+package mk.ukim.finki.it.reservengo.service.intf;
+
+public interface EventService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/JWTService.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/JWTService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/JWTService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,29 @@
+package mk.ukim.finki.it.reservengo.service.intf;
+
+import io.jsonwebtoken.Claims;
+import org.springframework.security.core.userdetails.UserDetails;
+
+import java.security.Key;
+import java.util.Date;
+import java.util.Map;
+import java.util.function.Function;
+
+public interface JWTService {
+    String extractUsername(String token);
+
+    Claims extractAllClaims(String token);
+
+    Key getSignInKey();
+
+    <T> T extractClaim(String token, Function<Claims, T> claimsResolver);
+
+    String generateToken(Map<String, Object> extraClaims, UserDetails userDetails);
+
+    String generateTokenNoClaims(UserDetails userDetails);
+
+    boolean isTokenValid(String token, UserDetails userDetails);
+
+    boolean isTokenExpired(String token);
+
+    Date extractExpiration(String token);
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/LocalManagerService.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/LocalManagerService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/LocalManagerService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,4 @@
+package mk.ukim.finki.it.reservengo.service.intf;
+
+public interface LocalManagerService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/LocalService.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/LocalService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/LocalService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,4 @@
+package mk.ukim.finki.it.reservengo.service.intf;
+
+public interface LocalService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/LocalWorkerService.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/LocalWorkerService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/LocalWorkerService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,4 @@
+package mk.ukim.finki.it.reservengo.service.intf;
+
+public interface LocalWorkerService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/ReservationService.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/ReservationService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/ReservationService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,4 @@
+package mk.ukim.finki.it.reservengo.service.intf;
+
+public interface ReservationService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/UserService.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/UserService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/service/intf/UserService.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,4 @@
+package mk.ukim.finki.it.reservengo.service.intf;
+
+public interface UserService {
+}
Index: ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/web/AuthController.java
===================================================================
--- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/web/AuthController.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/web/AuthController.java	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,53 @@
+package mk.ukim.finki.it.reservengo.web;
+
+import mk.ukim.finki.it.reservengo.model.JWTAuthenticationResponse;
+import mk.ukim.finki.it.reservengo.model.RegisterRequest;
+import mk.ukim.finki.it.reservengo.service.intf.AuthService;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/api/auth")
+@CrossOrigin(origins = "*")
+public class AuthController {
+    private final AuthService authenticationService;
+
+    public AuthController(AuthService authenticationService) {
+        this.authenticationService = authenticationService;
+    }
+
+    @PostMapping(value = "/register/customer", produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<JWTAuthenticationResponse> registerCustomer(@RequestParam String firstName,
+                                                                      @RequestParam String lastName,
+                                                                      @RequestParam String email,
+                                                                      @RequestParam String password,
+                                                                      @RequestParam String phoneNumber) {
+        return new ResponseEntity<>(authenticationService.registerCustomer(firstName, lastName, email, password, phoneNumber), HttpStatus.OK);
+    }
+
+    @PostMapping("/register/local-worker")
+    public ResponseEntity<JWTAuthenticationResponse> registerLocalWorker(@RequestParam String firstName,
+                                                                         @RequestParam String lastName,
+                                                                         @RequestParam String email,
+                                                                         @RequestParam String password,
+                                                                         @RequestParam String phoneNumber) {
+        return new ResponseEntity<>(authenticationService.registerLocalWorker(firstName, lastName, email, password, phoneNumber), HttpStatus.CREATED);
+    }
+
+    @PostMapping("/register/local-manager")
+    public ResponseEntity<JWTAuthenticationResponse> registerLocalManager(@RequestParam String firstName,
+                                                                          @RequestParam String lastName,
+                                                                          @RequestParam String email,
+                                                                          @RequestParam String password,
+                                                                          @RequestParam String phoneNumber) {
+        return new ResponseEntity<>(authenticationService.registerLocalManager(firstName, lastName, email, password, phoneNumber), HttpStatus.CREATED);
+    }
+
+    @PostMapping("/login")
+    public ResponseEntity<JWTAuthenticationResponse> login(@RequestParam String email,
+                                                           @RequestParam String password) {
+        return new ResponseEntity<>(authenticationService.login(email, password), HttpStatus.OK);
+    }
+}
Index: ReserveNGo-backend/src/main/resources/application-prod.properties
===================================================================
--- ReserveNGo-backend/src/main/resources/application-prod.properties	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
+++ ReserveNGo-backend/src/main/resources/application-prod.properties	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -0,0 +1,12 @@
+spring.datasource.url=jdbc:postgresql://localhost:5432/resandgo
+
+spring.datasource.username=za123
+spring.datasource.password=123
+
+#spring.datasource.hikari.connection-timeout=20000
+#spring.datasource.hikari.maximum-pool-size=5
+
+spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
+
+spring.jpa.hibernate.ddl-auto=update
+spring.jpa.show-sql=true
Index: ReserveNGo-backend/src/main/resources/application.properties
===================================================================
--- ReserveNGo-backend/src/main/resources/application.properties	(revision d157fcd2d390b102af10d2084b1c5dbeb1cd28ef)
+++ ReserveNGo-backend/src/main/resources/application.properties	(revision 5b3215369620db627572d46d140dc76d2ba25b8c)
@@ -3,2 +3,3 @@
 spring.profiles.active=h2
 
+
