Index: pom.xml
===================================================================
--- pom.xml	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ pom.xml	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -69,5 +69,4 @@
             <version>3.1.2.RELEASE</version>
         </dependency>
-
     </dependencies>
 
@@ -100,4 +99,3 @@
         </plugins>
     </build>
-
 </project>
Index: src/main/java/mk/ukim/finki/easyfood/model/AppUser.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/model/AppUser.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/model/AppUser.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -57,4 +57,66 @@
     }
 
+    public Long getId() {
+        return id;
+    }
 
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    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 getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public ROLE getRole() {
+        return role;
+    }
+
+    public void setRole(ROLE role) {
+        this.role = role;
+    }
+
+    public List<Address> getAddresses() {
+        return addresses;
+    }
+
+    public void setAddresses(List<Address> addresses) {
+        this.addresses = addresses;
+    }
 }
Index: src/main/java/mk/ukim/finki/easyfood/model/Category.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/model/Category.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/model/Category.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -38,4 +38,9 @@
         this.description = description;
     }
+
+    public Long getId() {
+        return id;
+    }
+
 }
 
Index: src/main/java/mk/ukim/finki/easyfood/model/Order.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/model/Order.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/model/Order.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -43,4 +43,19 @@
     @Column(name = "total_amount")
     private BigDecimal totalAmount;
+
+    @OneToMany(mappedBy = "order", fetch = FetchType.LAZY)
+    private List<OrderItems> orderItems;
+
+    public Restaurant getRestaurant() {
+        return restaurant;
+    }
+
+    public List<OrderItems> getOrderItems() {
+        return orderItems;
+    }
+
+    public void setOrderItems(List<OrderItems> orderItems) {
+        this.orderItems = orderItems;
+    }
 
     // getters and setters
Index: src/main/java/mk/ukim/finki/easyfood/repository/CartItemsRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/repository/CartItemsRepository.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/repository/CartItemsRepository.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -6,6 +6,10 @@
 import mk.ukim.finki.easyfood.model.ShoppingCart;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
 import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
 
+import java.util.List;
 import java.util.Optional;
 
@@ -16,3 +20,10 @@
 
     Optional<CartItems> findByCart_CustomerAndItem(Customer customer, Item item);
+
+    @Modifying
+    @Transactional
+    @Query("DELETE FROM CartItems c WHERE c.item.id = :itemId")
+    void deleteByItemId(Long itemId);
+
+    List<CartItems> findByCart_Customer_Id(Long id);
 }
Index: src/main/java/mk/ukim/finki/easyfood/repository/ItemCategoryRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/repository/ItemCategoryRepository.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/java/mk/ukim/finki/easyfood/repository/ItemCategoryRepository.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,13 @@
+package mk.ukim.finki.easyfood.repository;
+
+import mk.ukim.finki.easyfood.model.ItemCategory;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
+
+
+@Repository
+public interface ItemCategoryRepository extends JpaRepository<ItemCategory, Long> {
+}
Index: src/main/java/mk/ukim/finki/easyfood/repository/ItemIngredientRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/repository/ItemIngredientRepository.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/java/mk/ukim/finki/easyfood/repository/ItemIngredientRepository.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,11 @@
+package mk.ukim.finki.easyfood.repository;
+
+import mk.ukim.finki.easyfood.model.ItemIngredient;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
+
+@Repository
+public interface ItemIngredientRepository extends JpaSpecificationRepository<ItemIngredient, Long> {
+}
Index: src/main/java/mk/ukim/finki/easyfood/repository/ItemRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/repository/ItemRepository.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/repository/ItemRepository.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -4,4 +4,6 @@
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
@@ -14,3 +16,42 @@
 
     List<Item> findAllByIdIn(List<Long> ids);
+
+    @Query("SELECT i FROM Item i JOIN ItemCategory ic ON i.id = ic.item.id WHERE ic.category.id = :categoryId")
+    List<Item> findItemsByCategoryId(@Param("categoryId") Long categoryId);
+
+    @Query(value = """
+                SELECT i.* FROM item i
+                JOIN order_items oi ON i.item_id = oi.item_id
+                GROUP BY i.item_id
+                ORDER BY SUM(oi.quantity) DESC
+                LIMIT 5
+            """, nativeQuery = true)
+    List<Item> findTop5PopularItems();
+
+
+    @Query(value = """
+                SELECT i.* FROM item i
+                JOIN order_items oi ON i.item_id = oi.item_id
+                JOIN orders o ON o.order_id = oi.order_id
+                WHERE o.user_id = :userId
+                GROUP BY i.item_id
+                ORDER BY SUM(oi.quantity) DESC
+                LIMIT 5
+            """, nativeQuery = true)
+    List<Item> findTop5ItemsForUser(@Param("userId") Long userId);
+
+
+    @Query(value = """
+                SELECT i.* 
+                FROM item i
+                JOIN order_items oi ON i.item_id = oi.item_id
+                JOIN order_items oi2 ON oi2.order_id = oi.order_id
+                WHERE oi2.item_id IN :cartItemIds AND i.item_id NOT IN :cartItemIds
+                GROUP BY i.item_id
+                ORDER BY COUNT(*) DESC
+                LIMIT 5
+            """, nativeQuery = true)
+    List<Item> findItemsBoughtTogether(@Param("cartItemIds") List<Long> cartItemIds);
+
 }
+
Index: src/main/java/mk/ukim/finki/easyfood/repository/MenuItemRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/repository/MenuItemRepository.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/repository/MenuItemRepository.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -5,5 +5,8 @@
 import mk.ukim.finki.easyfood.model.MenuItem;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
 import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
@@ -17,3 +20,7 @@
 
     Optional<MenuItem> findFirstByItem(Item item);
+
+    List<MenuItem> findByMenuId(Long menuId);
+
+    void deleteByItemId(Long itemId);
 }
Index: src/main/java/mk/ukim/finki/easyfood/repository/OrderItemsRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/repository/OrderItemsRepository.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/repository/OrderItemsRepository.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -1,6 +1,10 @@
 package mk.ukim.finki.easyfood.repository;
 
+import mk.ukim.finki.easyfood.model.Order;
 import mk.ukim.finki.easyfood.model.OrderItems;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
@@ -9,5 +13,13 @@
 @Repository
 public interface OrderItemsRepository extends JpaRepository<OrderItems, Long> {
-    List<OrderItems> findByOrderId(Long orderId);
+    List<OrderItems> findByOrder(Order order);
+
+    @Query("SELECT oi FROM OrderItems oi WHERE oi.order.id = :orderId")
+    List<OrderItems> findByOrderId(@Param("orderId") Long orderId);
+
+    @Modifying
+    @Query("UPDATE OrderItems SET item = null WHERE item.id = :itemId")
+    void setItemIdToNull(@Param("itemId") Long itemId);
+
 
 }
Index: src/main/java/mk/ukim/finki/easyfood/repository/OrderRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/repository/OrderRepository.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/repository/OrderRepository.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -4,4 +4,7 @@
 import mk.ukim.finki.easyfood.model.Order;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
@@ -15,4 +18,12 @@
 
     List<Order> findByCustomerIdOrderByOrderDateDesc(Long customerId);
+
+    @Modifying
+    @Query("UPDATE Order SET customer = null WHERE customer.id = :userId")
+    void setUserIdToNull(@Param("userId") Long userId);
+
+    @Modifying
+    @Query("UPDATE Order SET restaurant = null WHERE restaurant.id = :restaurantId")
+    void setRestaurantIdToNull(@Param("restaurantId") Long restaurantId);
 }
 
Index: src/main/java/mk/ukim/finki/easyfood/service/AdminService.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/service/AdminService.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/java/mk/ukim/finki/easyfood/service/AdminService.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,51 @@
+package mk.ukim.finki.easyfood.service;
+
+import mk.ukim.finki.easyfood.model.AppUser;
+import mk.ukim.finki.easyfood.model.Restaurant;
+import mk.ukim.finki.easyfood.model.Menu;
+import mk.ukim.finki.easyfood.model.Item;
+
+import java.util.List;
+
+public interface AdminService {
+
+    long getTotalUsersCount();
+
+    long getTotalRestaurantsCount();
+
+    long getTotalMenusCount();
+
+    long getTotalItemsCount();
+
+    List<AppUser> getAllUsers();
+
+    AppUser getUserById(Long id);
+
+    void updateUser(Long id, String firstName, String lastName, String email, String phone);
+
+    void deleteUser(Long id);
+
+    List<Restaurant> getAllRestaurants();
+
+    Restaurant getRestaurantById(Long id);
+
+    void updateRestaurant(Long id, String name, String address, String phoneNumber);
+
+    void deleteRestaurant(Long id);
+
+    List<Menu> getAllMenus();
+
+    Menu getMenuById(Long id);
+
+    void updateMenu(Long id, String name, Long restaurantId);
+
+    void deleteMenu(Long id);
+
+    List<Item> getAllItems();
+
+    Item getItemById(Long id);
+
+    void updateItem(Long id, String name, String description, String price, String imageUrl);
+
+    void deleteItem(Long id);
+}
Index: src/main/java/mk/ukim/finki/easyfood/service/ItemService.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/service/ItemService.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/service/ItemService.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -11,7 +11,6 @@
     List<Item> findAll();
 
-    List<Item> findRecommendedItems();
+    List<Item> findRecommendedItems(Long userId);
 
-    // List<Item> findItemsByRestaurantId(Long restaurantId);
     public List<Item> getItemsByMenuId(Long menuId);
 
@@ -19,3 +18,5 @@
 
     List<Item> searchItems(String searchTerm);
+
+    List<Item> findItemsByCategoryId(Long categoryId);
 }
Index: src/main/java/mk/ukim/finki/easyfood/service/impl/AdminServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/service/impl/AdminServiceImpl.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/java/mk/ukim/finki/easyfood/service/impl/AdminServiceImpl.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,182 @@
+package mk.ukim.finki.easyfood.service.impl;
+
+import mk.ukim.finki.easyfood.model.*;
+import mk.ukim.finki.easyfood.repository.*;
+import mk.ukim.finki.easyfood.service.AdminService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Service
+public class AdminServiceImpl implements AdminService {
+
+    private final AppUserRepository userRepository;
+    private final RestaurantRepository restaurantRepository;
+    private final MenuRepository menuRepository;
+    private final ItemRepository itemRepository;
+    private final MenuItemRepository menuItemRepository;
+    private final OrderRepository ordersRepository;
+
+    public AdminServiceImpl(AppUserRepository userRepository,
+                            RestaurantRepository restaurantRepository,
+                            MenuRepository menuRepository,
+                            ItemRepository itemRepository,
+                            MenuItemRepository menuItemRepository,
+                            OrderRepository ordersRepository) {
+        this.userRepository = userRepository;
+        this.restaurantRepository = restaurantRepository;
+        this.menuRepository = menuRepository;
+        this.itemRepository = itemRepository;
+        this.menuItemRepository = menuItemRepository;
+        this.ordersRepository = ordersRepository;
+    }
+
+    @Override
+    public long getTotalUsersCount() {
+        return userRepository.count();
+    }
+
+    @Override
+    public long getTotalRestaurantsCount() {
+        return restaurantRepository.count();
+    }
+
+    @Override
+    public long getTotalMenusCount() {
+        return menuRepository.count();
+    }
+
+    @Override
+    public long getTotalItemsCount() {
+        return itemRepository.count();
+    }
+
+    @Override
+    public List<AppUser> getAllUsers() {
+        return userRepository.findAll();
+    }
+
+    @Override
+    public AppUser getUserById(Long id) {
+        return userRepository.findById(id)
+                .orElseThrow(() -> new RuntimeException("User not found with id: " + id));
+    }
+
+    @Override
+    public void updateUser(Long id, String firstName, String lastName, String email, String phone) {
+        AppUser user = getUserById(id);
+        user.setFirstName(firstName);
+        user.setLastName(lastName);
+        user.setEmail(email);
+        user.setPhone(phone);
+        userRepository.save(user);
+    }
+
+    @Override
+    @Transactional
+    public void deleteUser(Long id) {
+        if (!userRepository.existsById(id)) {
+            throw new RuntimeException("User not found with id: " + id);
+        }
+
+        ordersRepository.setUserIdToNull(id);
+
+        userRepository.deleteById(id);
+    }
+
+    @Override
+    public List<Restaurant> getAllRestaurants() {
+        return restaurantRepository.findAll();
+    }
+
+    @Override
+    public Restaurant getRestaurantById(Long id) {
+        return restaurantRepository.findById(id)
+                .orElseThrow(() -> new RuntimeException("Restaurant not found with id: " + id));
+    }
+
+    @Override
+    public void updateRestaurant(Long id, String name, String websiteUrl, String phoneNumber) {
+        Restaurant restaurant = getRestaurantById(id);
+        restaurant.setName(name);
+        restaurant.setWebsiteUrl(websiteUrl);
+        restaurant.setPhoneNumber(phoneNumber);
+        restaurantRepository.save(restaurant);
+    }
+
+    @Override
+    @Transactional
+    public void deleteRestaurant(Long id) {
+        if (!restaurantRepository.existsById(id)) {
+            throw new RuntimeException("Restaurant not found with id: " + id);
+        }
+        ordersRepository.setRestaurantIdToNull(id);
+        restaurantRepository.deleteById(id);
+    }
+
+    @Override
+    public List<Menu> getAllMenus() {
+        return menuRepository.findAll();
+    }
+
+    @Override
+    public Menu getMenuById(Long id) {
+        return menuRepository.findById(id)
+                .orElseThrow(() -> new RuntimeException("Menu not found with id: " + id));
+    }
+
+    @Override
+    public void updateMenu(Long id, String name, Long restaurantId) {
+        Menu menu = getMenuById(id);
+        Restaurant restaurant = getRestaurantById(restaurantId);
+
+        menu.setName(name);
+        menu.setRestaurant(restaurant);
+        menu.setUpdatedAt(LocalDateTime.now());
+        menuRepository.save(menu);
+    }
+
+    @Override
+    @Transactional
+    public void deleteMenu(Long id) {
+        if (!menuRepository.existsById(id)) {
+            throw new RuntimeException("Menu not found with id: " + id);
+        }
+        List<MenuItem> menuItems = menuItemRepository.findByMenuId(id);
+        for (MenuItem menuItem : menuItems) {
+            deleteItem(menuItem.getMenu().getId());
+        }
+        menuRepository.deleteById(id);
+    }
+    @Override
+    public List<Item> getAllItems() {
+        return itemRepository.findAll();
+    }
+
+    @Override
+    public Item getItemById(Long id) {
+        return itemRepository.findById(id)
+                .orElseThrow(() -> new RuntimeException("Item not found with id: " + id));
+    }
+
+    @Override
+    public void updateItem(Long id, String name, String description, String price, String imageUrl) {
+        Item item = getItemById(id);
+        item.setName(name);
+        item.setDescription(description);
+        item.setPrice(new BigDecimal(price));
+        item.setImageUrl(imageUrl);
+        itemRepository.save(item);
+    }
+
+    @Override
+    @Transactional
+    public void deleteItem(Long id) {
+        if (!itemRepository.existsById(id)) {
+            throw new RuntimeException("Item not found with id: " + id);
+        }
+    }
+}
Index: src/main/java/mk/ukim/finki/easyfood/service/impl/ItemServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/service/impl/ItemServiceImpl.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/service/impl/ItemServiceImpl.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -5,12 +5,10 @@
 
 import mk.ukim.finki.easyfood.model.exceptions.ItemNotFoundException;
-import mk.ukim.finki.easyfood.repository.ItemRepository;
-import mk.ukim.finki.easyfood.repository.MenuItemRepository;
-import mk.ukim.finki.easyfood.repository.MenuRepository;
-import mk.ukim.finki.easyfood.repository.RestaurantRepository;
+import mk.ukim.finki.easyfood.repository.*;
 import mk.ukim.finki.easyfood.service.ItemService;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 import jakarta.persistence.criteria.Predicate; // This is the correct one
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.ArrayList;
@@ -25,13 +23,15 @@
     private final MenuRepository menuRepository;
     private final RestaurantRepository restaurantRepository;
+    private final CartItemsRepository cartItemsRepository;
 
     public ItemServiceImpl(ItemRepository itemRepository,
                            MenuItemRepository menuItemRepository,
                            MenuRepository menuRepository,
-                           RestaurantRepository restaurantRepository) {
+                           RestaurantRepository restaurantRepository, CartItemsRepository cartItemsRepository) {
         this.itemRepository = itemRepository;
         this.menuItemRepository = menuItemRepository;
         this.menuRepository = menuRepository;
         this.restaurantRepository = restaurantRepository;
+        this.cartItemsRepository = cartItemsRepository;
     }
 
@@ -42,21 +42,18 @@
 
     @Override
-    public List<Item> findRecommendedItems() {
-        return itemRepository.findAll().stream().limit(5).collect(Collectors.toList());
+    @Transactional(readOnly = true)
+    public List<Item> findRecommendedItems(Long userId) {
+        List<CartItems> cartItems = cartItemsRepository.findByCart_Customer_Id(userId);
+        List<Long> cartItemIds = cartItems.stream()
+                .map(ci -> ci.getItem().getId())
+                .toList();
+
+        if (cartItemIds.isEmpty()) {
+            return itemRepository.findTop5PopularItems();
+        } else {
+            return itemRepository.findItemsBoughtTogether(cartItemIds);
+        }
     }
 
-//    @Override
-//    public List<Item> findItemsByRestaurantId(Long restaurantId) {
-//        Restaurant restaurant = restaurantRepository.findById(restaurantId)
-//                .orElseThrow(() -> new RuntimeException("Restaurant not found"));
-//
-//        Menu menu = menuRepository.findByRestaurant(restaurant);
-//        if (menu == null) return List.of();
-//
-//        List<MenuItem> menuItems = menuItemRepository.findByMenu(menu);
-//        return menuItems.stream()
-//                .map(MenuItem::getItem)
-//                .collect(Collectors.toList());
-//    }
 
     public List<Item> getItemsByMenuId(Long menuId) {
@@ -104,3 +101,8 @@
     }
 
+    @Override
+    public List<Item> findItemsByCategoryId(Long categoryId) {
+        return this.itemRepository.findItemsByCategoryId(categoryId);
+    }
+
 }
Index: src/main/java/mk/ukim/finki/easyfood/service/impl/OrderServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/service/impl/OrderServiceImpl.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/service/impl/OrderServiceImpl.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -9,4 +9,5 @@
 import mk.ukim.finki.easyfood.repository.OrderRepository;
 import mk.ukim.finki.easyfood.service.OrderService;
+import mk.ukim.finki.easyfood.service.ShoppingCartService;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -21,9 +22,11 @@
     private final DeliveryManRepository deliveryManRepository;
     private final OrderItemsRepository orderItemsRepository;
+    private final ShoppingCartService shoppingCartService;
 
-    public OrderServiceImpl(OrderRepository orderRepository, DeliveryManRepository deliveryManRepository, OrderItemsRepository orderItemsRepository) {
+    public OrderServiceImpl(OrderRepository orderRepository, DeliveryManRepository deliveryManRepository, OrderItemsRepository orderItemsRepository, ShoppingCartService shoppingCartService) {
         this.orderRepository = orderRepository;
         this.deliveryManRepository = deliveryManRepository;
         this.orderItemsRepository = orderItemsRepository;
+        this.shoppingCartService = shoppingCartService;
     }
 
@@ -61,4 +64,6 @@
         Order savedOrder = orderRepository.save(order);
 
+        BigDecimal totalAmount = BigDecimal.ZERO;
+
         for (CartItems cartItem : cartItems) {
             OrderItems orderItem = new OrderItems();
@@ -66,9 +71,19 @@
             orderItem.setItem(cartItem.getItem());
             orderItem.setQuantity(cartItem.getQuantity());
-            orderItem.setTotalPrice(cartItem.getItem().getPrice()
-                    .multiply(BigDecimal.valueOf(cartItem.getQuantity())));
+
+            BigDecimal itemTotal = cartItem.getItem().getPrice()
+                    .multiply(BigDecimal.valueOf(cartItem.getQuantity()));
+
+            orderItem.setTotalPrice(itemTotal);
+            totalAmount = totalAmount.add(itemTotal);
 
             orderItemsRepository.save(orderItem);
         }
+
+        savedOrder.setTotalAmount(totalAmount);
+        orderRepository.save(savedOrder);
+
+        // ✅ clear cart inside same transaction
+        shoppingCartService.clearCart(order.getCustomer().getId());
 
         return savedOrder;
Index: src/main/java/mk/ukim/finki/easyfood/service/impl/ShoppingCartServiceImp.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/service/impl/ShoppingCartServiceImp.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/service/impl/ShoppingCartServiceImp.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -156,5 +156,4 @@
     @Override
     public ShoppingCart getActiveShoppingCart(Long userId) {
-        // Find by customer ID instead of customer ID and active flag
         Optional<Customer> customer = customerRepository.findById(userId);
         if (customer.isPresent()) {
@@ -175,5 +174,4 @@
             if (cartOpt.isPresent()) {
                 ShoppingCart cart = cartOpt.get();
-                // Delete all cart items first
                 if (cart.getCartItems() != null) {
                     cartItemsRepository.deleteAll(cart.getCartItems());
@@ -190,5 +188,4 @@
         ShoppingCart cart = getActiveShoppingCart(userId);
         if (cart != null) {
-            // Delete all cart items first
             if (cart.getCartItems() != null) {
                 cartItemsRepository.deleteAll(cart.getCartItems());
Index: src/main/java/mk/ukim/finki/easyfood/web/controller/AdminHomeController.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/web/controller/AdminHomeController.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/java/mk/ukim/finki/easyfood/web/controller/AdminHomeController.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,183 @@
+package mk.ukim.finki.easyfood.web.controller;
+
+import mk.ukim.finki.easyfood.model.AppUser;
+import mk.ukim.finki.easyfood.model.Restaurant;
+import mk.ukim.finki.easyfood.model.Menu;
+import mk.ukim.finki.easyfood.model.Item;
+import mk.ukim.finki.easyfood.service.AdminService;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Optional;
+
+@Controller
+@RequestMapping("/admin")
+public class AdminHomeController {
+
+    private final AdminService adminService;
+
+    public AdminHomeController(AdminService adminService) {
+        this.adminService = adminService;
+    }
+
+    @GetMapping
+    public String adminHome(Model model) {
+        // Get counts for dashboard overview
+        model.addAttribute("totalUsers", adminService.getTotalUsersCount());
+        model.addAttribute("totalRestaurants", adminService.getTotalRestaurantsCount());
+        model.addAttribute("totalMenus", adminService.getTotalMenusCount());
+        model.addAttribute("totalItems", adminService.getTotalItemsCount());
+
+        return "admin_home";
+    }
+
+    // Users Management
+    @GetMapping("/users")
+    public String getAllUsers(Model model) {
+        List<AppUser> users = adminService.getAllUsers();
+        model.addAttribute("users", users);
+        return "admin_users";
+    }
+
+    @GetMapping("/users/edit/{id}")
+    public String editUser(@PathVariable Long id, Model model) {
+        AppUser user = adminService.getUserById(id);
+        if (user != null) {
+            model.addAttribute("user", user);
+            return "admin_edit_user";
+        } else {
+            return "redirect:/admin/users?error=User not found";
+        }
+    }
+
+    @PostMapping("/users/update")
+    public String updateUser(@RequestParam Long id,
+                             @RequestParam String firstName,
+                             @RequestParam String lastName,
+                             @RequestParam String email,
+                             @RequestParam String phone,
+                             Model model) {
+        try {
+            adminService.updateUser(id, firstName, lastName, email, phone);
+            return "redirect:/admin/users?success=User updated successfully";
+        } catch (Exception e) {
+            model.addAttribute("error", e.getMessage());
+            return "redirect:/admin/users?error=" + e.getMessage();
+        }
+    }
+
+    @PostMapping("/users/delete/{id}")
+    public String deleteUser(@PathVariable Long id) {
+        adminService.deleteUser(id);
+        return "redirect:/admin/users?success=User deleted successfully";
+    }
+
+    // Restaurants Management
+    @GetMapping("/restaurants")
+    public String getAllRestaurants(Model model) {
+        List<Restaurant> restaurants = adminService.getAllRestaurants();
+        model.addAttribute("restaurants", restaurants);
+        return "admin_restaurants";
+    }
+
+    @GetMapping("/restaurants/edit/{id}")
+    public String editRestaurant(@PathVariable Long id, Model model) {
+        Restaurant restaurant = adminService.getRestaurantById(id);
+        model.addAttribute("restaurant", restaurant);
+        return "admin_edit_restaurant";
+    }
+
+    @PostMapping("/restaurants/update")
+    public String updateRestaurant(@RequestParam Long id,
+                                   @RequestParam String name,
+                                   @RequestParam String webiste,
+                                   @RequestParam String phoneNumber,
+                                   Model model) {
+        try {
+            adminService.updateRestaurant(id, name, webiste, phoneNumber);
+            return "redirect:/admin/restaurants?success=Restaurant updated successfully";
+        } catch (Exception e) {
+            return "redirect:/admin/restaurants?error=" + e.getMessage();
+        }
+    }
+
+    @PostMapping("/restaurants/delete/{id}")
+    public String deleteRestaurant(@PathVariable Long id) {
+        adminService.deleteRestaurant(id);
+        return "redirect:/admin/restaurants?success=Restaurant deleted successfully";
+    }
+
+    // Menus Management
+    @GetMapping("/menus")
+    public String getAllMenus(Model model) {
+        List<Menu> menus = adminService.getAllMenus();
+        model.addAttribute("menus", menus);
+        return "admin_menus";
+    }
+
+    @GetMapping("/menus/edit/{id}")
+    public String editMenu(@PathVariable Long id, Model model) {
+        Menu menu = adminService.getMenuById(id);
+        List<Restaurant> restaurants = adminService.getAllRestaurants();
+        model.addAttribute("menu", menu);
+        model.addAttribute("restaurants", restaurants);
+        return "admin_edit_menu";
+    }
+
+    @PostMapping("/menus/update")
+    public String updateMenu(@RequestParam Long id,
+                             @RequestParam String name,
+                             @RequestParam Long restaurantId,
+                             Model model) {
+        try {
+            adminService.updateMenu(id, name, restaurantId);
+            return "redirect:/admin/menus?success=Menu updated successfully";
+        } catch (Exception e) {
+            return "redirect:/admin/menus?error=" + e.getMessage();
+        }
+    }
+
+    @PostMapping("/menus/delete/{id}")
+    public String deleteMenu(@PathVariable Long id) {
+        adminService.deleteMenu(id);
+        return "redirect:/admin/menus?success=Menu deleted successfully";
+    }
+
+    // Items Management
+    @GetMapping("/items")
+    public String getAllItems(Model model) {
+        List<Item> items = adminService.getAllItems();
+        model.addAttribute("items", items);
+        return "admin_items";
+    }
+
+    @GetMapping("/items/edit/{id}")
+    public String editItem(@PathVariable Long id, Model model) {
+        Item item = adminService.getItemById(id);
+        model.addAttribute("item", item);
+        return "admin_edit_item";
+    }
+
+    @PostMapping("/items/update")
+    public String updateItem(@RequestParam Long id,
+                             @RequestParam String name,
+                             @RequestParam String description,
+                             @RequestParam String price,
+                             @RequestParam String imageUrl,
+                             Model model) {
+        try {
+            adminService.updateItem(id, name, description, price, imageUrl);
+            return "redirect:/admin/items?success=Item updated successfully";
+        } catch (Exception e) {
+            return "redirect:/admin/items?error=" + e.getMessage();
+        }
+    }
+
+    @PostMapping("/items/delete/{id}")
+    public String deleteItem(@PathVariable Long id) {
+        adminService.deleteItem(id);
+        return "redirect:/admin/items?success=Item deleted successfully";
+    }
+}
Index: src/main/java/mk/ukim/finki/easyfood/web/controller/HomeController.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/web/controller/HomeController.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/web/controller/HomeController.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -34,21 +34,25 @@
     public String getHomePage(Model model,
                               Authentication authentication,
-                              @RequestParam(required = false) String searchTerm) {
+                              @RequestParam(required = false) String searchTerm,
+                              @RequestParam(required = false) Long categoryId) {
         List<Category> categories = categoryService.listCategories();
         List<Item> items;
 
-        // If a search term is present, show search results; otherwise, show all items
+        if (authentication != null && authentication.isAuthenticated()) {
+            String username = authentication.getName();
+            if (username.equals("admin@easyfood.com") || username.contains("admin")) {
+                return "redirect:/admin";
+            }
+        }
+
         if (searchTerm != null && !searchTerm.trim().isEmpty()) {
             items = itemService.searchItems(searchTerm);
             model.addAttribute("searchTerm", searchTerm);
+        } else if (categoryId != null) {
+            items = itemService.findItemsByCategoryId(categoryId);
         } else {
             items = itemService.findAll();
         }
 
-        List<Item> recommendedItems = itemService.findRecommendedItems();
-
-        model.addAttribute("categories", categories);
-        model.addAttribute("items", items);
-        model.addAttribute("recommendedItems", recommendedItems);
 
         Long userId = null;
@@ -64,4 +68,9 @@
 
         model.addAttribute("numberOfItems", numberOfItems);
+        List<Item> recommendedItems = itemService.findRecommendedItems(userId);
+
+        model.addAttribute("categories", categories);
+        model.addAttribute("items", items);
+        model.addAttribute("recommendedItems", recommendedItems);
 
         return "main_pg";
Index: src/main/java/mk/ukim/finki/easyfood/web/controller/LoginController.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/web/controller/LoginController.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/web/controller/LoginController.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -26,3 +26,5 @@
         return "login";
     }
+
+
 }
Index: src/main/java/mk/ukim/finki/easyfood/web/controller/OrderController.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/web/controller/OrderController.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/web/controller/OrderController.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -173,6 +173,4 @@
 
                     if (paymentSuccessful) {
-                        cartService.clearCart(customer.getId());
-
                         redirectAttributes.addFlashAttribute("successMessage",
                                 "Order placed successfully! Order ID: " + savedOrder.getId());
Index: src/main/java/mk/ukim/finki/easyfood/web/controller/ProfileController.java
===================================================================
--- src/main/java/mk/ukim/finki/easyfood/web/controller/ProfileController.java	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/java/mk/ukim/finki/easyfood/web/controller/ProfileController.java	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -4,7 +4,9 @@
 import mk.ukim.finki.easyfood.model.Address;
 import mk.ukim.finki.easyfood.model.Order;
+import mk.ukim.finki.easyfood.model.OrderItems;
 import mk.ukim.finki.easyfood.service.UserService;
 import mk.ukim.finki.easyfood.service.AddressService;
 import mk.ukim.finki.easyfood.service.OrderService;
+import mk.ukim.finki.easyfood.repository.OrderItemsRepository;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContextHolder;
@@ -16,5 +18,4 @@
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
-
 
 import java.util.List;
@@ -28,9 +29,12 @@
     private final AddressService addressService;
     private final OrderService orderService;
+    private final OrderItemsRepository orderItemsRepository;
 
-    public ProfileController(UserService userService, AddressService addressService, OrderService orderService) {
+    public ProfileController(UserService userService, AddressService addressService,
+                             OrderService orderService, OrderItemsRepository orderItemsRepository) {
         this.userService = userService;
         this.addressService = addressService;
         this.orderService = orderService;
+        this.orderItemsRepository = orderItemsRepository;
     }
 
@@ -49,5 +53,13 @@
                 Customer customer = customerOptional.get();
 
+                // Get orders for the user
                 List<Order> orders = orderService.findAllByUserId(customer.getId());
+
+                // Load order items for each order (including deleted items)
+                for (Order order : orders) {
+                    List<OrderItems> orderItems = orderItemsRepository.findByOrderId(order.getId());
+                    order.setOrderItems(orderItems);
+                }
+
                 List<Address> addresses = customer.getAddresses();
                 model.addAttribute("user", customer);
Index: src/main/resources/templates/admin_edit_item.html
===================================================================
--- src/main/resources/templates/admin_edit_item.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/resources/templates/admin_edit_item.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Items Management - Admin</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
+    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
+</head>
+<body class="bg-light">
+<!-- Navigation -->
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+    <div class="container">
+        <a class="navbar-brand" href="/admin">
+            <i class="fas fa-utensils me-2"></i>EasyFood Admin
+        </a>
+        <div class="navbar-nav ms-auto">
+            <a class="nav-link" href="/admin">
+                <i class="fas fa-home me-1"></i>Dashboard
+            </a>
+        </div>
+    </div>
+</nav>
+
+<div class="container mt-4">
+    <div class="row">
+        <div class="col-12">
+            <!-- Header -->
+            <div class="d-flex justify-content-between align-items-center mb-4">
+                <h2><i class="fas fa-hamburger me-2"></i>Items Management</h2>
+            </div>
+
+            <!-- Success/Error Messages -->
+            <div th:if="${param.success}" class="alert alert-success alert-dismissible fade show" role="alert">
+                <span th:text="${param.success[0]}"></span>
+                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+            </div>
+            <div th:if="${param.error}" class="alert alert-danger alert-dismissible fade show" role="alert">
+                <span th:text="${param.error[0]}"></span>
+                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+            </div>
+
+            <!-- Items Table -->
+            <div class="card">
+                <div class="card-header">
+                    <h5 class="card-title mb-0">All Menu Items</h5>
+                </div>
+                <div class="card-body">
+                    <div class="table-responsive">
+                        <table class="table table-striped table-hover">
+                            <thead class="table-dark">
+                            <tr>
+                                <th>ID</th>
+                                <th>Image</th>
+                                <th>Name</th>
+                                <th>Price</th>
+                                <th>Description</th>
+                                <th>Actions</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr th:if="${#lists.isEmpty(items)}">
+                                <td colspan="6" class="text-center text-muted py-4">
+                                    No items found
+                                </td>
+                            </tr>
+                            <tr th:each="item : ${items}">
+                                <td th:text="${item.id}"></td>
+                                <td>
+                                    <img th:if="${item.imageUrl != null and !#strings.isEmpty(item.imageUrl)}"
+                                         th:src="${item.imageUrl}"
+                                         alt="Item Image"
+                                         class="img-thumbnail"
+                                         style="width: 60px; height: 60px; object-fit: cover;">
+                                    <div th:if="${item.imageUrl == null or #strings.isEmpty(item.imageUrl)}"
+                                         class="d-flex align-items-center justify-content-center bg-light border rounded"
+                                         style="width: 60px; height: 60px;">
+                                        <i class="fas fa-image text-muted"></i>
+                                    </div>
+                                </td>
+                                <td>
+                                    <strong th:text="${item.name}"></strong>
+                                </td>
+                                <td>
+                                    <span class="badge bg-success fs-6" th:text="'$' + ${item.price}"></span>
+                                </td>
+                                <td>
+                                            <span th:text="${#strings.abbreviate(item.description, 50)}"
+                                                  class="text-muted"></span>
+                                </td>
+                                <td>
+                                    <div class="btn-group" role="group">
+                                        <a th:href="@{/admin/items/edit/{id}(id=${item.id})}"
+                                           class="btn btn-sm btn-outline-primary">
+                                            <i class="fas fa-edit"></i> Edit
+                                        </a>
+                                        <button type="button" class="btn btn-sm btn-outline-danger"
+                                                data-bs-toggle="modal"
+                                                th:data-bs-target="'#deleteModal' + ${item.id}">
+                                            <i class="fas fa-trash"></i> Delete
+                                        </button>
+                                    </div>
+
+                                    <!-- Delete Confirmation Modal -->
+                                    <div class="modal fade" th:id="'deleteModal' + ${item.id}" tabindex="-1">
+                                        <div class="modal-dialog">
+                                            <div class="modal-content">
+                                                <div class="modal-header">
+                                                    <h5 class="modal-title">Confirm Deletion</h5>
+                                                    <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
+                                                </div>
+                                                <div class="modal-body">
+                                                    Are you sure you want to delete item <strong th:text="${item.name}"></strong>?
+                                                </div>
+                                                <div class="modal-footer">
+                                                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
+                                                    <form th:action="@{/admin/items/delete/{id}(id=${item.id})}" method="post" style="display: inline;">
+                                                        <button type="submit" class="btn btn-danger">Delete</button>
+                                                    </form>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
+</body>
+</html>
Index: src/main/resources/templates/admin_edit_menu.html
===================================================================
--- src/main/resources/templates/admin_edit_menu.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/resources/templates/admin_edit_menu.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Edit Menu - Admin</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
+    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
+</head>
+<body class="bg-light">
+<!-- Navigation -->
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+    <div class="container">
+        <a class="navbar-brand" href="/admin">
+            <i class="fas fa-utensils me-2"></i>EasyFood Admin
+        </a>
+        <div class="navbar-nav ms-auto">
+            <a class="nav-link" href="/admin/menus">
+                <i class="fas fa-arrow-left me-1"></i>Back to Menus
+            </a>
+        </div>
+    </div>
+</nav>
+
+<div class="container mt-4">
+    <div class="row justify-content-center">
+        <div class="col-md-8">
+            <div class="card">
+                <div class="card-header">
+                    <h4 class="card-title mb-0">
+                        <i class="fas fa-book-open me-2"></i>Edit Menu
+                    </h4>
+                </div>
+                <div class="card-body">
+                    <form th:action="@{/admin/menus/update}" method="post">
+                        <input type="hidden" name="id" th:value="${menu.id}">
+
+                        <div class="mb-3">
+                            <label for="name" class="form-label">Menu Name <span class="text-danger">*</span></label>
+                            <input type="text" class="form-control" id="name" name="name"
+                                   th:value="${menu.name}" required
+                                   placeholder="Enter menu name">
+                        </div>
+
+                        <div class="mb-3">
+                            <label for="restaurantId" class="form-label">Restaurant <span
+                                    class="text-danger">*</span></label>
+                            <select class="form-select" id="restaurantId" name="restaurantId" required>
+                                <option value="">Select Restaurant</option>
+                                <option th:each="restaurant : ${restaurants}"
+                                        th:value="${restaurant.id}"
+                                        th:text="${restaurant.name}"
+                                        th:selected="${menu.restaurant != null && menu.restaurant.id == restaurant.id}">
+                                </option>
+                            </select>
+                        </div>
+
+                        <div class="row">
+                            <div class="col-md-6">
+                                <div class="mb-3">
+                                    <label class="form-label">Created At</label>
+                                    <input type="text" class="form-control" readonly
+                                           th:value="${menu.createdAt != null ? #temporals.format(menu.createdAt, 'yyyy-MM-dd HH:mm:ss') : 'N/A'}">
+                                </div>
+                            </div>
+                            <div class="col-md-6">
+                                <div class="mb-3">
+                                    <label class="form-label">Last Updated</label>
+                                    <input type="text" class="form-control" readonly
+                                           th:value="${menu.updatedAt != null ? #temporals.format(menu.updatedAt, 'yyyy-MM-dd HH:mm:ss') : 'N/A'}">
+                                </div>
+                            </div>
+                        </div>
+
+                        <div class="alert alert-info">
+                            <i class="fas fa-info-circle me-2"></i>
+                            <strong>Note:</strong> The "Last Updated" time will be automatically set to the current time
+                            when you save changes.
+                        </div>
+
+                        <div class="d-flex gap-2">
+                            <button type="submit" class="btn btn-primary">
+                                <i class="fas fa-save me-2"></i>Update Menu
+                            </button>
+                            <a href="/admin/menus" class="btn btn-secondary">
+                                <i class="fas fa-times me-2"></i>Cancel
+                            </a>
+                        </div>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
+</body>
+</html>
Index: src/main/resources/templates/admin_edit_restaurant.html
===================================================================
--- src/main/resources/templates/admin_edit_restaurant.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/resources/templates/admin_edit_restaurant.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Edit Restaurant - Admin</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
+    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
+</head>
+<body class="bg-light">
+<!-- Navigation -->
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+    <div class="container">
+        <a class="navbar-brand" href="/admin">
+            <i class="fas fa-utensils me-2"></i>EasyFood Admin
+        </a>
+        <div class="navbar-nav ms-auto">
+            <a class="nav-link" href="/admin/restaurants">
+                <i class="fas fa-arrow-left me-1"></i>Back to Restaurants
+            </a>
+        </div>
+    </div>
+</nav>
+
+<div class="container mt-4">
+    <div class="row justify-content-center">
+        <div class="col-md-8">
+            <div class="card">
+                <div class="card-header">
+                    <h4 class="card-title mb-0">
+                        <i class="fas fa-store me-2"></i>Edit Restaurant
+                    </h4>
+                </div>
+                <div class="card-body">
+                    <form th:action="@{/admin/restaurants/update}" method="post">
+                        <input type="hidden" name="id" th:value="${restaurant.id}">
+
+                        <div class="mb-3">
+                            <label for="name" class="form-label">Restaurant Name <span
+                                    class="text-danger">*</span></label>
+                            <input type="text" class="form-control" id="name" name="name"
+                                   th:value="${restaurant.name}" required
+                                   placeholder="Enter restaurant name">
+                        </div>
+
+                        <div class="mb-3">
+                            <label for="address" class="form-label">Website</label>
+                            <textarea class="form-control" id="address" name="address"
+                                      rows="2" th:text="${restaurant.websiteUrl}"
+                                      placeholder="Enter restaurant website"></textarea>
+                        </div>
+
+                        <div class="mb-3">
+                            <label for="phoneNumber" class="form-label">Phone Number</label>
+                            <input type="tel" class="form-control" id="phoneNumber" name="phoneNumber"
+                                   th:value="${restaurant.phoneNumber}"
+                                   placeholder="Enter phone number">
+                            <div class="form-text">Format: 02-123-456 or 070-123-456</div>
+                        </div>
+
+                        <div class="alert alert-info">
+                            <i class="fas fa-info-circle me-2"></i>
+                            <strong>Note:</strong> Changes to restaurant information will be visible to all customers.
+                            Make sure all details are accurate.
+                        </div>
+
+                        <div class="d-flex gap-2">
+                            <button type="submit" class="btn btn-primary">
+                                <i class="fas fa-save me-2"></i>Update Restaurant
+                            </button>
+                            <a href="/admin/restaurants" class="btn btn-secondary">
+                                <i class="fas fa-times me-2"></i>Cancel
+                            </a>
+                        </div>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js">
Index: src/main/resources/templates/admin_edit_user.html
===================================================================
--- src/main/resources/templates/admin_edit_user.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/resources/templates/admin_edit_user.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Edit User - Admin</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
+    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
+</head>
+<body class="bg-light">
+<!-- Navigation -->
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+    <div class="container">
+        <a class="navbar-brand" href="/admin">
+            <i class="fas fa-utensils me-2"></i>EasyFood Admin
+        </a>
+        <div class="navbar-nav ms-auto">
+            <a class="nav-link" href="/admin/users">
+                <i class="fas fa-arrow-left me-1"></i>Back to Users
+            </a>
+        </div>
+    </div>
+</nav>
+
+<div class="container mt-4">
+    <div class="row justify-content-center">
+        <div class="col-md-8">
+            <div class="card">
+                <div class="card-header">
+                    <h4 class="card-title mb-0">
+                        <i class="fas fa-user-edit me-2"></i>Edit User
+                    </h4>
+                </div>
+                <div class="card-body">
+                    <form th:action="@{/admin/users/update}" method="post">
+                        <input type="hidden" name="id" th:value="${user.id}">
+
+                        <div class="row">
+                            <div class="col-md-6">
+                                <div class="mb-3">
+                                    <label for="firstName" class="form-label">First Name <span class="text-danger">*</span></label>
+                                    <input type="text" class="form-control" id="firstName" name="firstName"
+                                           th:value="${user.firstName}" required>
+                                </div>
+                            </div>
+                            <div class="col-md-6">
+                                <div class="mb-3">
+                                    <label for="lastName" class="form-label">Last Name <span class="text-danger">*</span></label>
+                                    <input type="text" class="form-control" id="lastName" name="lastName"
+                                           th:value="${user.lastName}" required>
+                                </div>
+                            </div>
+                        </div>
+
+                        <div class="mb-3">
+                            <label for="email" class="form-label">Email <span class="text-danger">*</span></label>
+                            <input type="email" class="form-control" id="email" name="email"
+                                   th:value="${user.email}" required>
+                        </div>
+
+                        <div class="mb-3">
+                            <label for="phone" class="form-label">Phone</label>
+                            <input type="tel" class="form-control" id="phone" name="phone"
+                                   th:value="${user.phone}">
+                        </div>
+
+
+                        <div class="d-flex gap-2">
+                            <button type="submit" class="btn btn-primary">
+                                <i class="fas fa-save me-2"></i>Update User
+                            </button>
+                            <a href="/admin/users" class="btn btn-secondary">
+                                <i class="fas fa-times me-2"></i>Cancel
+                            </a>
+                        </div>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
+</body>
+</html>
Index: src/main/resources/templates/admin_home.html
===================================================================
--- src/main/resources/templates/admin_home.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/resources/templates/admin_home.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,175 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Admin Dashboard - EasyFood</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
+    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
+</head>
+<body class="bg-light">
+<!-- Navigation -->
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+    <div class="container">
+        <a class="navbar-brand" href="/admin">
+            <i class="fas fa-utensils me-2"></i>EasyFood Admin
+        </a>
+        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
+            <span class="navbar-toggler-icon"></span>
+        </button>
+        <div class="collapse navbar-collapse" id="navbarNav">
+            <ul class="navbar-nav ms-auto">
+                <li class="nav-item">
+                    <a class="nav-link" href="/admin/register">
+                        <i class="fas fa-user-plus me-1"></i>Register User
+                    </a>
+                </li>
+                <li class="nav-item">
+                    <a class="nav-link" href="/logout">
+                        <i class="fas fa-sign-out-alt me-1"></i>Logout
+                    </a>
+                </li>
+            </ul>
+        </div>
+    </div>
+</nav>
+
+<div class="container mt-4">
+    <!-- Dashboard Header -->
+    <div class="row mb-4">
+        <div class="col-12">
+            <h1 class="mb-0">Admin Dashboard</h1>
+            <p class="text-muted">Manage your EasyFood platform</p>
+        </div>
+    </div>
+
+    <!-- Statistics Cards -->
+    <div class="row mb-5">
+        <div class="col-md-3 mb-3">
+            <div class="card bg-primary text-white h-100">
+                <div class="card-body">
+                    <div class="d-flex justify-content-between">
+                        <div>
+                            <h4 class="card-title" th:text="${totalUsers}">0</h4>
+                            <p class="card-text">Total Users</p>
+                        </div>
+                        <div class="align-self-center">
+                            <i class="fas fa-users fa-2x"></i>
+                        </div>
+                    </div>
+                </div>
+                <div class="card-footer">
+                    <a href="/admin/users" class="text-white text-decoration-none">
+                        View all users <i class="fas fa-arrow-right"></i>
+                    </a>
+                </div>
+            </div>
+        </div>
+
+        <div class="col-md-3 mb-3">
+            <div class="card bg-success text-white h-100">
+                <div class="card-body">
+                    <div class="d-flex justify-content-between">
+                        <div>
+                            <h4 class="card-title" th:text="${totalRestaurants}">0</h4>
+                            <p class="card-text">Restaurants</p>
+                        </div>
+                        <div class="align-self-center">
+                            <i class="fas fa-store fa-2x"></i>
+                        </div>
+                    </div>
+                </div>
+                <div class="card-footer">
+                    <a href="/admin/restaurants" class="text-white text-decoration-none">
+                        View all restaurants <i class="fas fa-arrow-right"></i>
+                    </a>
+                </div>
+            </div>
+        </div>
+
+        <div class="col-md-3 mb-3">
+            <div class="card bg-warning text-white h-100">
+                <div class="card-body">
+                    <div class="d-flex justify-content-between">
+                        <div>
+                            <h4 class="card-title" th:text="${totalMenus}">0</h4>
+                            <p class="card-text">Menus</p>
+                        </div>
+                        <div class="align-self-center">
+                            <i class="fas fa-book fa-2x"></i>
+                        </div>
+                    </div>
+                </div>
+                <div class="card-footer">
+                    <a href="/admin/menus" class="text-white text-decoration-none">
+                        View all menus <i class="fas fa-arrow-right"></i>
+                    </a>
+                </div>
+            </div>
+        </div>
+
+        <div class="col-md-3 mb-3">
+            <div class="card bg-info text-white h-100">
+                <div class="card-body">
+                    <div class="d-flex justify-content-between">
+                        <div>
+                            <h4 class="card-title" th:text="${totalItems}">0</h4>
+                            <p class="card-text">Menu Items</p>
+                        </div>
+                        <div class="align-self-center">
+                            <i class="fas fa-hamburger fa-2x"></i>
+                        </div>
+                    </div>
+                </div>
+                <div class="card-footer">
+                    <a href="/admin/items" class="text-white text-decoration-none">
+                        View all items <i class="fas fa-arrow-right"></i>
+                    </a>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <!-- Quick Actions -->
+    <div class="row">
+        <div class="col-12">
+            <div class="card">
+                <div class="card-header">
+                    <h5 class="card-title mb-0">Quick Actions</h5>
+                </div>
+                <div class="card-body">
+                    <div class="row">
+                        <div class="col-md-6 col-lg-3 mb-3">
+                            <a href="/admin/users" class="btn btn-outline-primary w-100 py-3">
+                                <i class="fas fa-users fa-2x d-block mb-2"></i>
+                                Manage Users
+                            </a>
+                        </div>
+                        <div class="col-md-6 col-lg-3 mb-3">
+                            <a href="/admin/restaurants" class="btn btn-outline-success w-100 py-3">
+                                <i class="fas fa-store fa-2x d-block mb-2"></i>
+                                Manage Restaurants
+                            </a>
+                        </div>
+                        <div class="col-md-6 col-lg-3 mb-3">
+                            <a href="/admin/menus" class="btn btn-outline-warning w-100 py-3">
+                                <i class="fas fa-book fa-2x d-block mb-2"></i>
+                                Manage Menus
+                            </a>
+                        </div>
+                        <div class="col-md-6 col-lg-3 mb-3">
+                            <a href="/admin/items" class="btn btn-outline-info w-100 py-3">
+                                <i class="fas fa-hamburger fa-2x d-block mb-2"></i>
+                                Manage Items
+                            </a>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
+</body>
+</html>
Index: src/main/resources/templates/admin_items.html
===================================================================
--- src/main/resources/templates/admin_items.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/resources/templates/admin_items.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Items Management - Admin</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
+    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
+</head>
+<body class="bg-light">
+<!-- Navigation -->
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+    <div class="container">
+        <a class="navbar-brand" href="/admin">
+            <i class="fas fa-utensils me-2"></i>EasyFood Admin
+        </a>
+        <div class="navbar-nav ms-auto">
+            <a class="nav-link" href="/admin">
+                <i class="fas fa-home me-1"></i>Dashboard
+            </a>
+        </div>
+    </div>
+</nav>
+
+<div class="container mt-4">
+    <div class="row">
+        <div class="col-12">
+            <!-- Header -->
+            <div class="d-flex justify-content-between align-items-center mb-4">
+                <h2><i class="fas fa-hamburger me-2"></i>Items Management</h2>
+            </div>
+
+            <!-- Success/Error Messages -->
+            <div th:if="${param.success}" class="alert alert-success alert-dismissible fade show" role="alert">
+                <span th:text="${param.success[0]}"></span>
+                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+            </div>
+            <div th:if="${param.error}" class="alert alert-danger alert-dismissible fade show" role="alert">
+                <span th:text="${param.error[0]}"></span>
+                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+            </div>
+
+            <!-- Items Table -->
+            <div class="card">
+                <div class="card-header">
+                    <h5 class="card-title mb-0">All Menu Items</h5>
+                </div>
+                <div class="card-body">
+                    <div class="table-responsive">
+                        <table class="table table-striped table-hover">
+                            <thead class="table-dark">
+                            <tr>
+                                <th>ID</th>
+                                <th>Image</th>
+                                <th>Name</th>
+                                <th>Price</th>
+                                <th>Description</th>
+                                <th>Actions</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr th:if="${#lists.isEmpty(items)}">
+                                <td colspan="6" class="text-center text-muted py-4">
+                                    No items found
+                                </td>
+                            </tr>
+                            <tr th:each="item : ${items}">
+                                <td th:text="${item.id}"></td>
+                                <td>
+                                    <img th:if="${item.imageUrl != null and !#strings.isEmpty(item.imageUrl)}"
+                                         th:src="${item.imageUrl}"
+                                         alt="Item Image"
+                                         class="img-thumbnail"
+                                         style="width: 60px; height: 60px; object-fit: cover;">
+                                    <div th:if="${item.imageUrl == null or #strings.isEmpty(item.imageUrl)}"
+                                         class="d-flex align-items-center justify-content-center bg-light border rounded"
+                                         style="width: 60px; height: 60px;">
+                                        <i class="fas fa-image text-muted"></i>
+                                    </div>
+                                </td>
+                                <td>
+                                    <strong th:text="${item.name}"></strong>
+                                </td>
+                                <td>
+                                    <span class="badge bg-success fs-6" th:text="'$' + ${item.price}"></span>
+                                </td>
+                                <td>
+                                            <span th:text="${#strings.abbreviate(item.description, 50)}"
+                                                  class="text-muted"></span>
+                                </td>
+                                <td>
+                                    <div class="btn-group" role="group">
+                                        <a th:href="@{/admin/items/edit/{id}(id=${item.id})}"
+                                           class="btn btn-sm btn-outline-primary">
+                                            <i class="fas fa-edit"></i> Edit
+                                        </a>
+                                        <button type="button" class="btn btn-sm btn-outline-danger"
+                                                data-bs-toggle="modal"
+                                                th:data-bs-target="'#deleteModal' + ${item.id}">
+                                            <i class="fas fa-trash"></i> Delete
+                                        </button>
+                                    </div>
+
+                                    <!-- Delete Confirmation Modal -->
+                                    <div class="modal fade" th:id="'deleteModal' + ${item.id}" tabindex="-1">
+                                        <div class="modal-dialog">
+                                            <div class="modal-content">
+                                                <div class="modal-header">
+                                                    <h5 class="modal-title">Confirm Deletion</h5>
+                                                    <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
+                                                </div>
+                                                <div class="modal-body">
+                                                    Are you sure you want to delete item <strong th:text="${item.name}"></strong>?
+                                                </div>
+                                                <div class="modal-footer">
+                                                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
+                                                    <form th:action="@{/admin/items/delete/{id}(id=${item.id})}" method="post" style="display: inline;">
+                                                        <button type="submit" class="btn btn-danger">Delete</button>
+                                                    </form>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
+</body>
+</html>
Index: src/main/resources/templates/admin_menus.html
===================================================================
--- src/main/resources/templates/admin_menus.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/resources/templates/admin_menus.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Menus Management - Admin</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
+    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
+</head>
+<body class="bg-light">
+<!-- Navigation -->
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+    <div class="container">
+        <a class="navbar-brand" href="/admin">
+            <i class="fas fa-utensils me-2"></i>EasyFood Admin
+        </a>
+        <div class="navbar-nav ms-auto">
+            <a class="nav-link" href="/admin">
+                <i class="fas fa-home me-1"></i>Dashboard
+            </a>
+        </div>
+    </div>
+</nav>
+
+<div class="container mt-4">
+    <div class="row">
+        <div class="col-12">
+            <!-- Header -->
+            <div class="d-flex justify-content-between align-items-center mb-4">
+                <h2><i class="fas fa-book me-2"></i>Menus Management</h2>
+            </div>
+
+            <!-- Success/Error Messages -->
+            <div th:if="${param.success}" class="alert alert-success alert-dismissible fade show" role="alert">
+                <span th:text="${param.success[0]}"></span>
+                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+            </div>
+            <div th:if="${param.error}" class="alert alert-danger alert-dismissible fade show" role="alert">
+                <span th:text="${param.error[0]}"></span>
+                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+            </div>
+
+            <!-- Menus Table -->
+            <div class="card">
+                <div class="card-header">
+                    <h5 class="card-title mb-0">All Menus</h5>
+                </div>
+                <div class="card-body">
+                    <div class="table-responsive">
+                        <table class="table table-striped table-hover">
+                            <thead class="table-dark">
+                            <tr>
+                                <th>ID</th>
+                                <th>Menu Name</th>
+                                <th>Restaurant</th>
+                                <th>Created At</th>
+                                <th>Updated At</th>
+                                <th>Actions</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr th:if="${#lists.isEmpty(menus)}">
+                                <td colspan="6" class="text-center text-muted py-4">
+                                    No menus found
+                                </td>
+                            </tr>
+                            <tr th:each="menu : ${menus}">
+                                <td th:text="${menu.id}"></td>
+                                <td th:text="${menu.name}"></td>
+                                <td>
+                                            <span th:if="${menu.restaurant != null}"
+                                                  th:text="${menu.restaurant.name}"
+                                                  class="badge bg-success">
+                                            </span>
+                                    <span th:if="${menu.restaurant == null}"
+                                          class="badge bg-warning text-dark">
+                                                No Restaurant
+                                            </span>
+                                </td>
+                                <td th:text="${menu.createdAt != null ? #temporals.format(menu.createdAt, 'yyyy-MM-dd HH:mm') : 'N/A'}"></td>
+                                <td th:text="${menu.updatedAt != null ? #temporals.format(menu.updatedAt, 'yyyy-MM-dd HH:mm') : 'N/A'}"></td>
+                                <td>
+                                    <div class="btn-group" role="group">
+                                        <a th:href="@{/admin/menus/edit/{id}(id=${menu.id})}"
+                                           class="btn btn-sm btn-outline-primary">
+                                            <i class="fas fa-edit"></i> Edit
+                                        </a>
+                                        <button type="button" class="btn btn-sm btn-outline-danger"
+                                                data-bs-toggle="modal"
+                                                th:data-bs-target="'#deleteModal' + ${menu.id}">
+                                            <i class="fas fa-trash"></i> Delete
+                                        </button>
+                                    </div>
+
+                                    <!-- Delete Confirmation Modal -->
+                                    <div class="modal fade" th:id="'deleteModal' + ${menu.id}" tabindex="-1">
+                                        <div class="modal-dialog">
+                                            <div class="modal-content">
+                                                <div class="modal-header">
+                                                    <h5 class="modal-title">Confirm Deletion</h5>
+                                                    <button type="button" class="btn-close"
+                                                            data-bs-dismiss="modal"></button>
+                                                </div>
+                                                <div class="modal-body">
+                                                    Are you sure you want to delete menu <strong
+                                                        th:text="${menu.name}"></strong>?
+                                                </div>
+                                                <div class="modal-footer">
+                                                    <button type="button" class="btn btn-secondary"
+                                                            data-bs-dismiss="modal">Cancel
+                                                    </button>
+                                                    <form th:action="@{/admin/menus/delete/{id}(id=${menu.id})}"
+                                                          method="post" style="display: inline;">
+                                                        <button type="submit" class="btn btn-danger">Delete</button>
+                                                    </form>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
+</body>
+</html>
Index: src/main/resources/templates/admin_restaurants.html
===================================================================
--- src/main/resources/templates/admin_restaurants.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/resources/templates/admin_restaurants.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Restaurants Management - Admin</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
+    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
+</head>
+<body class="bg-light">
+<!-- Navigation -->
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+    <div class="container">
+        <a class="navbar-brand" href="/admin">
+            <i class="fas fa-utensils me-2"></i>EasyFood Admin
+        </a>
+        <div class="navbar-nav ms-auto">
+            <a class="nav-link" href="/admin">
+                <i class="fas fa-home me-1"></i>Dashboard
+            </a>
+        </div>
+    </div>
+</nav>
+
+<div class="container mt-4">
+    <div class="row">
+        <div class="col-12">
+            <!-- Header -->
+            <div class="d-flex justify-content-between align-items-center mb-4">
+                <h2><i class="fas fa-store me-2"></i>Restaurants Management</h2>
+            </div>
+
+            <!-- Success/Error Messages -->
+            <div th:if="${param.success}" class="alert alert-success alert-dismissible fade show" role="alert">
+                <span th:text="${param.success[0]}"></span>
+                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+            </div>
+            <div th:if="${param.error}" class="alert alert-danger alert-dismissible fade show" role="alert">
+                <span th:text="${param.error[0]}"></span>
+                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+            </div>
+
+            <!-- Restaurants Table -->
+            <div class="card">
+                <div class="card-header">
+                    <h5 class="card-title mb-0">All Restaurants</h5>
+                </div>
+                <div class="card-body">
+                    <div class="table-responsive">
+                        <table class="table table-striped table-hover">
+                            <thead class="table-dark">
+                            <tr>
+                                <th>ID</th>
+                                <th>Name</th>
+                                <th>Address</th>
+                                <th>Phone</th>
+                                <th>Actions</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr th:if="${#lists.isEmpty(restaurants)}">
+                                <td colspan="5" class="text-center text-muted py-4">
+                                    No restaurants found
+                                </td>
+                            </tr>
+                            <tr th:each="restaurant : ${restaurants}">
+                                <td th:text="${restaurant.id}"></td>
+                                <td th:text="${restaurant.name}"></td>
+                                <td th:text="${restaurant.address}"></td>
+                                <td th:text="${restaurant.phoneNumber}"></td>
+                                <td>
+                                    <div class="btn-group" role="group">
+                                        <a th:href="@{/admin/restaurants/edit/{id}(id=${restaurant.id})}"
+                                           class="btn btn-sm btn-outline-primary">
+                                            <i class="fas fa-edit"></i> Edit
+                                        </a>
+                                        <button type="button" class="btn btn-sm btn-outline-danger"
+                                                data-bs-toggle="modal"
+                                                th:data-bs-target="'#deleteModal' + ${restaurant.id}">
+                                            <i class="fas fa-trash"></i> Delete
+                                        </button>
+                                    </div>
+
+                                    <!-- Delete Confirmation Modal -->
+                                    <div class="modal fade" th:id="'deleteModal' + ${restaurant.id}" tabindex="-1">
+                                        <div class="modal-dialog">
+                                            <div class="modal-content">
+                                                <div class="modal-header">
+                                                    <h5 class="modal-title">Confirm Deletion</h5>
+                                                    <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
+                                                </div>
+                                                <div class="modal-body">
+                                                    Are you sure you want to delete restaurant <strong th:text="${restaurant.name}"></strong>?
+                                                </div>
+                                                <div class="modal-footer">
+                                                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
+                                                    <form th:action="@{/admin/restaurants/delete/{id}(id=${restaurant.id})}" method="post" style="display: inline;">
+                                                        <button type="submit" class="btn btn-danger">Delete</button>
+                                                    </form>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
+</body>
+</html>
Index: src/main/resources/templates/admin_users.html
===================================================================
--- src/main/resources/templates/admin_users.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
+++ src/main/resources/templates/admin_users.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Users Management - Admin</title>
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
+    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
+</head>
+<body class="bg-light">
+<!-- Navigation -->
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+    <div class="container">
+        <a class="navbar-brand" href="/admin">
+            <i class="fas fa-utensils me-2"></i>EasyFood Admin
+        </a>
+        <div class="navbar-nav ms-auto">
+            <a class="nav-link" href="/admin">
+                <i class="fas fa-home me-1"></i>Dashboard
+            </a>
+        </div>
+    </div>
+</nav>
+
+<div class="container mt-4">
+    <div class="row">
+        <div class="col-12">
+            <!-- Header -->
+            <div class="d-flex justify-content-between align-items-center mb-4">
+                <h2>Users Management</h2>
+                <a href="/admin/register" class="btn btn-primary">
+                    <i class="fas fa-plus me-2"></i>Add New User
+                </a>
+            </div>
+
+            <!-- Success/Error Messages -->
+            <div th:if="${param.success}" class="alert alert-success alert-dismissible fade show" role="alert">
+                <span th:text="${param.success[0]}"></span>
+                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+            </div>
+            <div th:if="${param.error}" class="alert alert-danger alert-dismissible fade show" role="alert">
+                <span th:text="${param.error[0]}"></span>
+                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+            </div>
+
+            <!-- Users Table -->
+            <div class="card">
+                <div class="card-header">
+                    <h5 class="card-title mb-0">All Users</h5>
+                </div>
+                <div class="card-body">
+                    <div class="table-responsive">
+                        <table class="table table-striped table-hover">
+                            <thead class="table-dark">
+                            <tr>
+                                <th>ID</th>
+                                <th>Name</th>
+                                <th>Email</th>
+                                <th>Phone</th>
+                                <th>Role</th>
+                                <th>Actions</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr th:if="${#lists.isEmpty(users)}">
+                                <td colspan="6" class="text-center text-muted py-4">
+                                    No users found
+                                </td>
+                            </tr>
+                            <tr th:each="user : ${users}">
+                                <td th:text="${user.id}"></td>
+                                <td th:text="${user.firstName + ' ' + user.lastName}"></td>
+                                <td th:text="${user.email}"></td>
+                                <td th:text="${user.phone}"></td>
+                                <td>
+                                <span class="badge bg-info"
+                                      th:text="${user.role != null ? user.role.name() : 'No Role'}">
+                                </span>
+                                </td>
+                                <td>
+                                    <div class="btn-group" role="group">
+                                        <a th:href="@{/admin/users/edit/{id}(id=${user.id})}"
+                                           class="btn btn-sm btn-outline-primary">
+                                            <i class="fas fa-edit"></i> Edit
+                                        </a>
+
+                                    </div>
+                                </td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
+</body>
+</html>
Index: src/main/resources/templates/main_pg.html
===================================================================
--- src/main/resources/templates/main_pg.html	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/resources/templates/main_pg.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -144,8 +144,14 @@
 </div>
 
-<div id="cuisine" class="container-fluid">
-    <div th:each="category : ${categories}" class="card bg-warning d-flex justify-content-center align-items-center">
+<div id="cuisine" class="container-fluid" th:if="${categories != null}">
+    <a th:each="category : ${categories}"
+       th:href="@{/home(categoryId=${category.id})}"
+       class="card bg-warning d-flex justify-content-center align-items-center text-decoration-none text-dark">
         <h6 class="mb-0" th:text="${category.name}">Category Name</h6>
-    </div>
+    </a>
+</div>
+
+<div th:if="${categories == null}">
+    <p>No categories available.</p>
 </div>
 
Index: src/main/resources/templates/profile.html
===================================================================
--- src/main/resources/templates/profile.html	(revision 01114642c04bc80550f138c9b451c661ebdfdaca)
+++ src/main/resources/templates/profile.html	(revision ec552d70dd27a3465c8420563dbde91ca2fc7579)
@@ -228,18 +228,48 @@
                 <ul class="list-group list-group-flush">
                     <li class="list-group-item" th:each="order : ${orders}">
-                        <p class="mb-1">
-                            <strong>Order ID:</strong> <span th:text="${order.id}"></span>
-                        </p>
-                        <p class="mb-1">
-                            <strong>Order Date:</strong> <span
-                                th:text="${order.orderDate}"></span>
-                        </p>
-                        <p class="mb-1">
-                            <strong>Order Total:</strong> <span
-                                th:text="${order.getTotalAmount()}"></span>
-                        </p>
-                        <p class="mb-0">
-                            <strong>Restaurant:</strong> <span th:text="${order.getRestaurantName()}"></span>
-                        </p>
+                        <div class="row">
+                            <div class="col-md-6">
+                                <p class="mb-1">
+                                    <strong>Order ID:</strong> <span th:text="${order.getId()}"></span>
+                                </p>
+                                <p class="mb-1">
+                                    <strong>Order Date:</strong>
+                                    <span th:text="${order.getOrderDate()}"></span>
+                                </p>
+                                <p class="mb-1">
+                                    <strong>Order Total:</strong>
+                                    <span th:text="${order.getTotalAmount()}"></span>
+                                </p>
+                                <p class="mb-1">
+                                    <strong>Restaurant:</strong>
+                                    <span th:if="${order.getRestaurant() != null}" th:text="${order.getRestaurantName()}"></span>
+                                    <span th:unless="${order.getRestaurant() != null}" class="text-muted fst-italic">[Restaurant no longer available]</span>
+                                </p>
+                                <p class="mb-0">
+                                    <strong>Status:</strong>
+                                    <span class="badge"
+                                          th:classappend="${order.orderStatus == 'completed' ? 'bg-success' : (order.orderStatus == 'pending' ? 'bg-warning text-dark' : 'bg-primary')}"
+                                          th:text="${order.getOrderStatus()}"></span>
+                                </p>
+                            </div>
+                            <div class="col-md-6">
+                                <p class="mb-1"><strong>Items:</strong></p>
+                                <div th:if="${order.orderItems != null and not #lists.isEmpty(order.orderItems)}">
+                                    <ul class="list-unstyled ms-3">
+                                        <li th:each="orderItem : ${order.orderItems}" class="small mb-1">
+                                        <span th:if="${orderItem.item != null}"
+                                              th:text="${orderItem.item.name} + ' x' + ${orderItem.quantity}"></span>
+                                            <span th:unless="${orderItem.item != null}"
+                                                  class="text-muted fst-italic">[Deleted item] x<span th:text="${orderItem.quantity}"></span></span>
+                                            <span class="text-muted ms-2"
+                                                  th:text="'($' + ${#numbers.formatDecimal(orderItem.totalPrice, 0, 'POINT', 2, 'COMMA')} + ')'"></span>
+                                        </li>
+                                    </ul>
+                                </div>
+                                <div th:unless="${order.orderItems != null and not #lists.isEmpty(order.orderItems)}">
+                                    <p class="small text-muted ms-3">No items found</p>
+                                </div>
+                            </div>
+                        </div>
                     </li>
                 </ul>
@@ -250,43 +280,43 @@
         </div>
     </div>
-</div>
-
-<!-- Add Address Modal -->
-<div class="modal fade" id="addAddressModal" tabindex="-1" aria-labelledby="addAddressModalLabel" aria-hidden="true">
-    <div class="modal-dialog">
-        <div class="modal-content">
-            <div class="modal-header">
-                <h5 class="modal-title" id="addAddressModalLabel">Add New Address</h5>
-                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
-            </div>
-            <form th:action="@{/profile/address/add}" method="post">
-                <div class="modal-body">
-                    <div class="mb-3">
-                        <label for="street" class="form-label">Street Address</label>
-                        <input type="text" class="form-control" id="street" name="street" required
-                               placeholder="123 Main Street, Apt 4B">
+
+    <!-- Add Address Modal -->
+    <div class="modal fade" id="addAddressModal" tabindex="-1" aria-labelledby="addAddressModalLabel"
+         aria-hidden="true">
+        <div class="modal-dialog">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <h5 class="modal-title" id="addAddressModalLabel">Add New Address</h5>
+                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
+                </div>
+                <form th:action="@{/profile/address/add}" method="post">
+                    <div class="modal-body">
+                        <div class="mb-3">
+                            <label for="street" class="form-label">Street Address</label>
+                            <input type="text" class="form-control" id="street" name="street" required
+                                   placeholder="123 Main Street, Apt 4B">
+                        </div>
+                        <div class="mb-3">
+                            <label for="city" class="form-label">City</label>
+                            <input type="text" class="form-control" id="city" name="city" required
+                                   placeholder="Skopje">
+                        </div>
+                        <div class="mb-3">
+                            <label for="postalCode" class="form-label">Postal Code</label>
+                            <input type="text" class="form-control" id="postalCode" name="postalCode" required
+                                   placeholder="1000">
+                        </div>
                     </div>
-                    <div class="mb-3">
-                        <label for="city" class="form-label">City</label>
-                        <input type="text" class="form-control" id="city" name="city" required
-                               placeholder="Skopje">
+                    <div class="modal-footer">
+                        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
+                        <button type="submit" class="btn btn-warning">Add Address</button>
                     </div>
-                    <div class="mb-3">
-                        <label for="postalCode" class="form-label">Postal Code</label>
-                        <input type="text" class="form-control" id="postalCode" name="postalCode" required
-                               placeholder="1000">
-                    </div>
-                </div>
-                <div class="modal-footer">
-                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
-                    <button type="submit" class="btn btn-warning">Add Address</button>
-                </div>
-            </form>
-        </div>
-    </div>
-</div>
-
-<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
-        crossorigin="anonymous"></script>
+                </form>
+            </div>
+        </div>
+    </div>
+
+    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
+            crossorigin="anonymous"></script>
 </body>
 </html>
