Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneController.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneController.java	(revision 520169098d7257d32291e4ee85b94e1e499ede09)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneController.java	(revision 436e0da3dac6a9709c3a2f2049ad88f43f78f9db)
@@ -24,7 +24,17 @@
                                  @RequestParam(name = "sortBy", required = false) String sortBy,
                                  @RequestParam(name = "priceRange", required = false) String priceRange,
-                                 @RequestParam(name = "searchValue", required = false) String searchValue){
+                                 @RequestParam(name = "searchValue", required = false) String searchValue,
+                                 @RequestParam(name = "ram", required = false) String ram,
+                                 @RequestParam(name = "rom", required = false) String rom,
+                                 @RequestParam(name = "frontcamera", required = false) String frontcamera,
+                                 @RequestParam(name = "backcamera", required = false) String backcamera,
+                                 @RequestParam(name = "chipset", required = false) String chipset,
+                                 @RequestParam(name = "cpu", required = false) String cpu,
+                                 @RequestParam(name = "operatingsystem", required = false) String operatingsystem,
+                                 @RequestParam(name = "color", required = false) String color,
+                                 @RequestParam(name = "battery", required = false) String battery){
 
-        return phoneService.getPhones(shops,brands,sortBy,priceRange,searchValue);
+        return phoneService.getPhones(shops,brands,sortBy,priceRange,searchValue,
+                ram, rom, frontcamera, backcamera, chipset, cpu, operatingsystem, color, battery);
     }
 
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java	(revision 520169098d7257d32291e4ee85b94e1e499ede09)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java	(revision 436e0da3dac6a9709c3a2f2049ad88f43f78f9db)
@@ -231,4 +231,5 @@
                 .map(cpu -> cpu.split("\n")[0].stripIndent().replaceAll("\n",""))
                 .filter(cpu -> !cpu.contains("Snapdragon") && !cpu.contains("Exynos"))
+                .filter(cpu -> Character.isAlphabetic(cpu.charAt(0)))
                 .distinct()
                 .sorted()
@@ -252,11 +253,22 @@
         List<PhoneOffer> offers = phoneOfferRepository.findAll();
 
-        return offers.stream()
+        List<String> cameras = offers.stream()
                 .map(PhoneOffer::getBack_camera)
                 .filter(camera -> camera != null && !camera.equals("") && !camera.equals("/"))
                 .map(camera -> camera.split("[\n,]")[0].replaceAll("\t",""))
-                .distinct()
-                .sorted()
-                .collect(Collectors.toList());
+                .flatMap(camera -> Arrays.stream(camera.split("[+/]")))
+                .map(camera -> camera.replaceAll("MP","").stripIndent())
+                .distinct()
+                .sorted()
+                .collect(Collectors.toList());
+
+        cameras.stream()
+                .forEach(camera -> {
+                    if(Character.isDigit(camera.charAt(0)))
+                    cameras.set(cameras.indexOf(camera), camera+"MP");
+
+                });
+
+        return cameras;
     }
 
@@ -267,5 +279,10 @@
                 .map(PhoneOffer::getBattery)
                 .filter(battery -> battery != null && !battery.equals("") && !battery.equals("/"))
-                .map(battery -> battery.split(",")[0].stripIndent())
+                .map(battery -> battery.split(",")[0]
+                        .split("\n")[0]
+                        .replaceAll("'","")
+                        .replaceAll("\t"," ")
+                        .stripIndent())
+                .map(battery -> battery.replaceAll("battery", "").stripIndent())
                 .distinct()
                 .sorted(Comparator.reverseOrder())
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneService.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneService.java	(revision 520169098d7257d32291e4ee85b94e1e499ede09)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneService.java	(revision 436e0da3dac6a9709c3a2f2049ad88f43f78f9db)
@@ -8,4 +8,5 @@
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
 import java.util.Comparator;
 import java.util.List;
@@ -23,5 +24,7 @@
 
     // TODO: insert logic to filter
-    public List<Phone> getPhones(String shops, String brands, String sortBy, String priceRange, String searchValue){
+    public List<Phone> getPhones(String shops, String brands, String sortBy, String priceRange, String searchValue,
+                                 String ram, String rom, String frontcamera, String backcamera, String chipset,
+                                 String cpu, String operatingsystem, String color, String battery){
         List<Phone> phones = phoneRepository.findAll();
 
@@ -55,4 +58,99 @@
                     .collect(Collectors.toList());
         }
+
+
+        // specifications filters
+
+        if(ram != null){
+            String [] memories = ram.split(",");
+            phones = phones.stream()
+                    .filter(phone -> Arrays.stream(memories).anyMatch(memory -> phone.getPhoneOffers().stream()
+                                    .filter(offer -> offer.getRam_memory() != null)
+                                    .anyMatch(offer -> hasSpecification(offer.getRam_memory(),memory))
+                            )
+                    )
+                    .collect(Collectors.toList());
+        }
+
+        if(rom != null){
+            String [] memories = rom.split(",");
+            phones = phones.stream()
+                    .filter(phone -> Arrays.stream(memories).anyMatch(memory -> phone.getPhoneOffers().stream()
+                            .filter(offer -> offer.getRom_memory() != null)
+                            .anyMatch(offer ->  hasSpecification(offer.getRom_memory(),memory))))
+                    .collect(Collectors.toList());
+        }
+
+        if(frontcamera != null){
+            String [] cameras = frontcamera.split(",");
+            phones = phones.stream()
+                    .filter(phone -> Arrays.stream(cameras).anyMatch(camera -> phone.getPhoneOffers().stream()
+                            .filter(offer -> offer.getFront_camera() != null)
+                            .anyMatch(offer -> hasSpecification(offer.getFront_camera(),camera)
+                            )
+                    )
+                    )
+                    .collect(Collectors.toList());
+        }
+
+        if(backcamera != null){
+            String [] cameras = backcamera.split(",");
+            phones = phones.stream()
+                    .filter(phone -> Arrays.stream(cameras).anyMatch(camera -> phone.getPhoneOffers().stream()
+                            .filter(offer -> offer.getBack_camera() != null)
+                            .anyMatch(offer -> hasSpecification(offer.getBack_camera(),camera))))
+                    .collect(Collectors.toList());
+        }
+
+        if(chipset != null)
+        {
+            String [] chipsets = chipset.split(",");
+            phones = phones.stream()
+                    .filter(phone -> Arrays.stream(chipsets).anyMatch(chip -> phone.getPhoneOffers().stream()
+                            .filter(offer -> offer.getChipset() != null)
+                            .anyMatch(offer -> offer.getChipset().contains(chip))))
+                    .collect(Collectors.toList());
+        }
+
+        if(cpu != null)
+        {
+            String [] cpus = cpu.split(",");
+            phones = phones.stream()
+                    .filter(phone -> Arrays.stream(cpus).anyMatch(processor -> phone.getPhoneOffers().stream()
+                            .filter(offer -> offer.getCpu() != null)
+                            .anyMatch(offer -> offer.getCpu().contains(processor))))
+                    .collect(Collectors.toList());
+        }
+
+        if(operatingsystem != null)
+        {
+            String [] operatingSystems = operatingsystem.split(",");
+            phones = phones.stream()
+                    .filter(phone -> Arrays.stream(operatingSystems).anyMatch(os -> phone.getPhoneOffers().stream()
+                            .filter(offer -> offer.getOperating_system() != null)
+                            .anyMatch(offer -> offer.getOperating_system().contains(os))))
+                    .collect(Collectors.toList());
+        }
+
+        if(color != null)
+        {
+            String [] colors = color.split(",");
+            phones = phones.stream()
+                    .filter(phone -> Arrays.stream(colors).anyMatch(c -> phone.getPhoneOffers().stream()
+                            .filter(offer -> offer.getColor() != null)
+                            .anyMatch(offer -> offer.getColor().contains(c))))
+                    .collect(Collectors.toList());
+        }
+
+        if(battery != null)
+        {
+            String [] batteries = battery.split(",");
+            phones = phones.stream()
+                    .filter(phone -> Arrays.stream(batteries).anyMatch(b -> phone.getPhoneOffers().stream()
+                            .filter(offer -> offer.getBattery() != null)
+                            .anyMatch(offer -> offer.getBattery().contains(b))))
+                    .collect(Collectors.toList());
+        }
+
 
         phones = phones.stream().sorted(Comparator.comparing(Phone::getTotal_offers).reversed())
@@ -74,4 +172,56 @@
 
         return phones;
+    }
+
+    public boolean hasSpecification(String specification, String filter){
+        if(specification.contains(filter))
+        {
+            if(specification.indexOf(filter)-1 < 0) {
+                return true;
+            }
+
+            if(!Character.isDigit(specification
+                    .charAt(specification.indexOf(filter)-1))) {
+                return true;
+            }
+        }
+
+        if(specification.contains(filter.split("GB")[0]+" GB"))
+        {
+            if(specification.indexOf(filter.split("GB")[0]+" GB")-1 < 0) {
+                return true;
+            }
+
+            if(!Character.isDigit(specification
+                    .charAt(specification.indexOf(filter.split("GB")[0]+" GB")-1))) {
+                return true;
+            }
+        }
+
+        if(specification.contains(filter.split("MP")[0]+" MP"))
+        {
+            if(specification.indexOf(filter.split("MP")[0]+" MP")-1 < 0) {
+                return true;
+            }
+
+            if(!Character.isDigit(specification
+                    .charAt(specification.indexOf(filter.split("MP")[0]+" MP")-1))) {
+                return true;
+            }
+        }
+
+        if(specification.contains(filter.split("MB")[0]+" MB"))
+        {
+            if(specification.indexOf(filter.split("MB")[0]+" MB")-1 < 0) {
+                return true;
+            }
+
+            if(!Character.isDigit(specification
+                    .charAt(specification.indexOf(filter.split("MB")[0]+" MB")-1))) {
+                return true;
+            }
+        }
+
+        return false;
     }
 
