Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/AdminController.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/AdminController.java	(revision 48f3030e929e5d3717498b6e78a9813429162fde)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/AdminController.java	(revision ffd50db1e5e2b9839ba7546d8ca44b600150bd71)
@@ -23,5 +23,6 @@
             MediaType.APPLICATION_XML_VALUE
     })
-    public ResponseEntity<Object> editOffer(@PathVariable("offerId") Long offerId, @RequestBody PhoneOffer editedOffer){
+    public ResponseEntity<Object> editOffer(@PathVariable("offerId") Long offerId, @RequestBody PhoneOffer editedOffer)
+    {
 
         return phoneOfferService.editOffer(offerId,editedOffer);
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneController.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneController.java	(revision 48f3030e929e5d3717498b6e78a9813429162fde)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneController.java	(revision ffd50db1e5e2b9839ba7546d8ca44b600150bd71)
@@ -6,5 +6,8 @@
 import finki.it.phoneluxbackend.services.PhoneService;
 import lombok.AllArgsConstructor;
+import org.apache.coyote.Response;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
@@ -50,3 +53,33 @@
     }
 
+    @GetMapping(path = "/totaloffers/{phoneModel}")
+    public Long getTotalOffersForPhone(@PathVariable("phoneModel") String phoneModel){
+        return phoneService.getTotalOffersForPhone(phoneModel);
+    }
+
+    @PutMapping(path = "/settotaloffers/{phoneId}/{totaloffers}")
+    public ResponseEntity<Object> setTotalOffersForPhone(@PathVariable("phoneId") Long phoneId,
+                                                         @PathVariable("totaloffers") int totaloffers){
+        return phoneService.setTotalOffersForPhone(phoneId,totaloffers);
+    }
+
+    @PutMapping(path = "/setlowestprice/{phoneId}/{lowestPrice}")
+    public ResponseEntity<Object> setLowestPriceForPhone(@PathVariable("phoneId") Long phoneId,
+                                                         @PathVariable("lowestPrice") int lowestPrice){
+        return phoneService.setLowestPriceForPhone(phoneId,lowestPrice);
+    }
+
+    @PutMapping(path = "/setimageurl/{phoneId}", consumes = {
+            MediaType.APPLICATION_JSON_VALUE,
+            MediaType.APPLICATION_XML_VALUE
+    }, produces = {
+            MediaType.APPLICATION_JSON_VALUE,
+            MediaType.APPLICATION_XML_VALUE
+    })
+    public ResponseEntity<Object> setImageUrlForPhone(@PathVariable("phoneId") Long phoneId,
+                                                         @RequestBody String newImageUrl){
+        return phoneService.setImageUrlForPhone(phoneId,newImageUrl);
+    }
+
+
 }
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneOfferController.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneOfferController.java	(revision 48f3030e929e5d3717498b6e78a9813429162fde)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneOfferController.java	(revision ffd50db1e5e2b9839ba7546d8ca44b600150bd71)
@@ -7,4 +7,5 @@
 import lombok.AllArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
@@ -16,4 +17,9 @@
     private final PhoneOfferService phoneOfferService;
 
+
+    @GetMapping(path = "/alloffers")
+    public List<PhoneOffer> getAllOffers(){
+        return phoneOfferService.getAllOffers();
+    }
     @GetMapping(path = "/phones/offers/{phoneId}")
     public List<PhoneOffer> getOffersForPhone(@PathVariable("phoneId") Long phoneId){
@@ -22,5 +28,5 @@
 
     @GetMapping(path = "/multipleoffers")
-    public List<PhoneOffer> getPhoneOffer(@RequestParam("offerIds") String offerIds){
+    public List<PhoneOffer> getMultiplePhoneOffers(@RequestParam("offerIds") String offerIds){
         return phoneOfferService.getMultiplePhoneOffers(offerIds);
     }
@@ -58,3 +64,28 @@
     }
 
+
+    @PutMapping(path = "/phoneoffer/{offerId}/addphonemodel/{phoneId}")
+    public ResponseEntity<Object> addPhoneModelToOffer(@PathVariable("offerId") Long offerId,
+                                                       @PathVariable("phoneId") Long phoneId)
+    {
+        return phoneOfferService.addPhoneModelToOffer(offerId,phoneId);
+    }
+    @PutMapping(path = "/phoneoffer/{offerId}/changeprice/{price}")
+    public ResponseEntity<Object> changePriceForOffer(@PathVariable("offerId") Long offerId,
+                                                       @PathVariable("price") int price)
+    {
+        return phoneOfferService.changePriceForOffer(offerId,price);
+    }
+
+    @PostMapping(path = "/phoneoffer/addoffer")
+    public ResponseEntity<Object> addOffer(@RequestBody PhoneOffer offer)
+    {
+        return phoneOfferService.addOffer(offer);
+    }
+
+    @DeleteMapping(path = "/phoneoffer/deleteoffer/{offerId}")
+    public ResponseEntity<Object> deleteOffer(@PathVariable("offerId") Long offerId)
+    {
+        return phoneOfferService.deleteOffer(offerId);
+    }
 }
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/Phone.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/Phone.java	(revision 48f3030e929e5d3717498b6e78a9813429162fde)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/Phone.java	(revision ffd50db1e5e2b9839ba7546d8ca44b600150bd71)
@@ -43,4 +43,11 @@
     }
 
-
+    public Phone(Long id, String brand, String model, String image_url, Integer total_offers, Integer lowestPrice) {
+        this.id = id;
+        this.brand = brand;
+        this.model = model;
+        this.image_url = image_url;
+        this.total_offers = total_offers;
+        this.lowestPrice = lowestPrice;
+    }
 }
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/PhoneOffer.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/PhoneOffer.java	(revision 48f3030e929e5d3717498b6e78a9813429162fde)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/PhoneOffer.java	(revision ffd50db1e5e2b9839ba7546d8ca44b600150bd71)
@@ -20,4 +20,5 @@
     @Id
     @Column(name = "offer_id")
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
     private Long id;
 
@@ -115,4 +116,42 @@
     }
 
+    public PhoneOffer(String offer_shop,
+                      String offer_name,
+                      Integer price,
+                      String ram_memory,
+                      String rom_memory,
+                      String color,
+                      String front_camera,
+                      String back_camera,
+                      String chipset,
+                      String battery,
+                      String operating_system,
+                      String cpu,
+                      String image_url,
+                      String offer_url,
+                      Date last_updated,
+                      Boolean is_validated,
+                      String offer_description,
+                      String offer_shop_code) {
+        this.offer_shop = offer_shop;
+        this.offer_name = offer_name;
+        this.price = price;
+        this.ram_memory = ram_memory;
+        this.rom_memory = rom_memory;
+        this.color = color;
+        this.front_camera = front_camera;
+        this.back_camera = back_camera;
+        this.chipset = chipset;
+        this.battery = battery;
+        this.operating_system = operating_system;
+        this.cpu = cpu;
+        this.image_url = image_url;
+        this.offer_url = offer_url;
+        this.last_updated = last_updated;
+        this.is_validated = is_validated;
+        this.offer_description = offer_description;
+        this.offer_shop_code = offer_shop_code;
+    }
+
     public PhoneOffer(Long id,
                       String offer_shop,
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/repositories/PhoneRepository.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/repositories/PhoneRepository.java	(revision 48f3030e929e5d3717498b6e78a9813429162fde)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/repositories/PhoneRepository.java	(revision ffd50db1e5e2b9839ba7546d8ca44b600150bd71)
@@ -5,6 +5,8 @@
 import org.springframework.stereotype.Repository;
 
+import java.util.Optional;
+
 @Repository
 public interface PhoneRepository extends JpaRepository<Phone,Long> {
-
+    Optional<Phone> findPhoneByModel(String model);
 }
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java	(revision 48f3030e929e5d3717498b6e78a9813429162fde)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java	(revision ffd50db1e5e2b9839ba7546d8ca44b600150bd71)
@@ -5,4 +5,5 @@
 import finki.it.phoneluxbackend.repositories.PhoneOfferRepository;
 import finki.it.phoneluxbackend.repositories.PhoneRepository;
+import org.apache.coyote.Response;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
@@ -126,6 +127,13 @@
         List<PhoneOffer> offers = phoneOfferRepository.findAll();
 
-        return offers.stream()
-                .filter(offer -> offer.getOffer_shop().equalsIgnoreCase(shop))
+        if(shop.equalsIgnoreCase("mobigo"))
+            shop = "Mobi Go";
+
+        if(shop.equalsIgnoreCase("mobilezone"))
+            shop = "Mobile Zone";
+        String finalShop = shop;
+
+        return offers.stream()
+                .filter(offer -> offer.getOffer_shop().stripIndent().equalsIgnoreCase(finalShop.stripIndent()))
                 .collect(Collectors.toList());
     }
@@ -301,3 +309,57 @@
                 .collect(Collectors.toList());
     }
+
+    public ResponseEntity<Object> addOffer(PhoneOffer offer) {
+        phoneOfferRepository.save(offer);
+        return ResponseEntity.ok().build();
+    }
+
+    public ResponseEntity<Object> deleteOffer(Long offerId) {
+        boolean exists = phoneOfferRepository.existsById(offerId);
+
+        if(!exists)
+            throw new IllegalStateException("Phone offer with id "+offerId+" does not exist");
+
+        phoneOfferRepository.deleteById(offerId);
+
+        return ResponseEntity.ok().build();
+    }
+
+    public List<PhoneOffer> getAllOffers() {
+        return phoneOfferRepository.findAll();
+    }
+
+    public ResponseEntity<Object> addPhoneModelToOffer(Long offerId, Long phoneId) {
+        boolean exists = phoneOfferRepository.existsById(offerId);
+
+        if(!exists)
+            throw new IllegalStateException("Phone offer with id "+offerId+" does not exist");
+
+        PhoneOffer offer = phoneOfferRepository.findById(offerId).get();
+
+        exists = phoneRepository.existsById(phoneId);
+
+        if(!exists)
+            throw new IllegalStateException("Phone with id "+phoneId+" does not exist");
+
+        Phone phone = phoneRepository.findById(phoneId).get();
+
+        offer.setPhone(phone);
+        phoneOfferRepository.save(offer);
+
+        return ResponseEntity.ok().build();
+    }
+
+    public ResponseEntity<Object> changePriceForOffer(Long offerId, int price) {
+        boolean exists = phoneOfferRepository.existsById(offerId);
+
+        if(!exists)
+            throw new IllegalStateException("Phone offer with id "+offerId+" does not exist");
+
+        PhoneOffer offer = phoneOfferRepository.findById(offerId).get();
+        offer.setPrice(price);
+        phoneOfferRepository.save(offer);
+
+        return ResponseEntity.ok().build();
+    }
 }
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneService.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneService.java	(revision 48f3030e929e5d3717498b6e78a9813429162fde)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneService.java	(revision ffd50db1e5e2b9839ba7546d8ca44b600150bd71)
@@ -2,8 +2,6 @@
 
 import finki.it.phoneluxbackend.entities.Phone;
-import finki.it.phoneluxbackend.entities.PhoneOffer;
 import finki.it.phoneluxbackend.repositories.PhoneRepository;
-import org.springframework.data.domain.PageRequest;
-import org.springframework.data.domain.Sort;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 
@@ -27,5 +25,7 @@
                                  String ram, String rom, String frontcamera, String backcamera, String chipset,
                                  String cpu, String operatingsystem, String color, String battery){
-        List<Phone> phones = phoneRepository.findAll();
+        List<Phone> phones = phoneRepository.findAll().stream()
+                .filter(phone -> phone.getTotal_offers() > 0)
+                .collect(Collectors.toList());
 
 
@@ -153,5 +153,4 @@
         }
 
-
         phones = phones.stream().sorted(Comparator.comparing(Phone::getTotal_offers).reversed())
                 .collect(Collectors.toList());
@@ -228,5 +227,6 @@
     public List<String> getBrands(){
         return phoneRepository.findAll().stream()
-                .map(Phone::getBrand).distinct()
+                .map(phone -> phone.getBrand().stripIndent())
+                .distinct()
                 .collect(Collectors.toList());
     }
@@ -238,3 +238,51 @@
         return phoneRepository.findById(phoneId).get();
     }
+
+    public Long getTotalOffersForPhone(String phoneModel) {
+        String model = String.join(" ", phoneModel.split("\\*"));
+        boolean exists = phoneRepository.findPhoneByModel(model).isPresent();
+
+        if(!exists)
+            throw new IllegalStateException("Phone with model "+model+" does not exist");
+
+        return phoneRepository.findPhoneByModel(model).get().getPhoneOffers().stream().count();
+    }
+
+    public ResponseEntity<Object> setTotalOffersForPhone(Long phoneId, int totaloffers) {
+        boolean exists = phoneRepository.findById(phoneId).isPresent();
+
+        if(!exists)
+            throw new IllegalStateException("Phone with id "+phoneId+" does not exist");
+
+        Phone phone = phoneRepository.findById(phoneId).get();
+        phone.setTotal_offers(totaloffers);
+        phoneRepository.save(phone);
+        return ResponseEntity.ok().build();
+    }
+
+    public ResponseEntity<Object> setLowestPriceForPhone(Long phoneId, int lowestPrice) {
+        boolean exists = phoneRepository.findById(phoneId).isPresent();
+
+        if(!exists)
+            throw new IllegalStateException("Phone with id "+phoneId+" does not exist");
+
+        Phone phone = phoneRepository.findById(phoneId).get();
+        phone.setLowestPrice(lowestPrice);
+        phoneRepository.save(phone);
+        return ResponseEntity.ok().build();
+    }
+
+
+    public ResponseEntity<Object> setImageUrlForPhone(Long phoneId, String newImageUrl) {
+        boolean exists = phoneRepository.findById(phoneId).isPresent();
+
+        if(!exists)
+            throw new IllegalStateException("Phone with id "+phoneId+" does not exist");
+
+        Phone phone = phoneRepository.findById(phoneId).get();
+        phone.setImage_url(newImageUrl);
+        phoneRepository.save(phone);
+
+        return ResponseEntity.ok().build();
+    }
 }
