Index: jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/impl/ApplicationServiceImpl.java
===================================================================
--- jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/impl/ApplicationServiceImpl.java	(revision 28b3398dcd7f9cfd044c2cb7923434b06037fee2)
+++ jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/impl/ApplicationServiceImpl.java	(revision 28b3398dcd7f9cfd044c2cb7923434b06037fee2)
@@ -0,0 +1,119 @@
+package mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.service.impl;
+
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.applications.DTO.ApplicationDetailsDTO;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.applications.DTO.ApplicationStatusDTO;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.enumerations.ApplicationStatus;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.users.JobSeeker;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.repositories.JobSeekerRepository;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.UrlResource;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.applications.Application;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.applications.DTO.ApplicationDTO;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.job_advertisements.JobAdvertisement;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.users.User;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.repositories.ApplicationRepository;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.repositories.JobAdvertisementRepository;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.repositories.UserRepository;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.service.intef.ApplicationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+//@RequiredArgsConstructor
+public class ApplicationServiceImpl implements ApplicationService {
+    private final Path fileStorageLocation;
+
+    private final UserRepository userRepository;
+    private final ApplicationRepository applicationRepository;
+    private final JobAdvertisementRepository jobAdvertisementRepository;
+    private final JobSeekerRepository jobSeekerRepository;
+
+    @Autowired
+    public ApplicationServiceImpl(@Value("${file.upload-dir}") String uploadDir, UserRepository userRepository, ApplicationRepository applicationRepository, JobAdvertisementRepository jobAdvertisementRepository,
+                                  JobSeekerRepository jobSeekerRepository) {
+        this.fileStorageLocation = Paths.get(uploadDir).toAbsolutePath().normalize();
+
+        try {
+            Files.createDirectories(this.fileStorageLocation);
+        } catch (IOException ex) {
+            throw new RuntimeException("Could not create the directory where the uploaded files will be stored.", ex);
+        }
+
+        this.userRepository = userRepository;
+        this.applicationRepository = applicationRepository;
+        this.jobAdvertisementRepository = jobAdvertisementRepository;
+        this.jobSeekerRepository = jobSeekerRepository;
+    }
+
+    @Override
+    public ApplicationDetailsDTO submitApplication(ApplicationDTO applicationDTO) {
+
+        if (applicationDTO.getResumeFile().isEmpty()) {
+            throw new RuntimeException("Failed to store empty file.");
+        }
+
+        Path targetLocation = this.fileStorageLocation.resolve(applicationDTO.getResumeFile().getOriginalFilename());
+        try {
+            Files.copy(applicationDTO.getResumeFile().getInputStream(), targetLocation, StandardCopyOption.REPLACE_EXISTING);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+
+        JobSeeker jobSeeker = jobSeekerRepository.findById(applicationDTO.getJobSeekerId()).orElseThrow(() -> new IllegalArgumentException("User not found"));
+        JobAdvertisement jobAdvertisement = jobAdvertisementRepository.findById(applicationDTO.getJobAdId()).orElseThrow(() -> new IllegalArgumentException("Job Ad not found"));
+
+        List<String> answers = new ArrayList<>();
+        answers.add(applicationDTO.getAnswerOne());
+        answers.add(applicationDTO.getAnswerTwo());
+        answers.add(applicationDTO.getAnswerThree());
+
+        Application application = new Application(jobSeeker, jobAdvertisement, applicationDTO.getResumeFile().getOriginalFilename(), answers, applicationDTO.getMessageToRecruiter());
+        applicationRepository.save(application);
+        return Application.mapToApplicationDetailsDTO(application);
+    }
+
+    @Override
+    public List<ApplicationDetailsDTO> findAllByJobAdvertisementId(Long jobId) {
+        List<Application> applications =  applicationRepository.findAllByJobAdvertisementId(jobId);
+        return applications.stream().map(Application::mapToApplicationDetailsDTO).toList();
+    }
+
+    @Override
+    public List<ApplicationDetailsDTO> findAllByJobSeekerId(Long jobSeekerId) {
+       List<Application> applications = applicationRepository.findAllByJobSeekerId(jobSeekerId);
+       return applications.stream().map(Application::mapToApplicationDetailsDTO).toList();
+    }
+
+    @Override
+    public Resource loadResumeAsResource(String fileName) {
+        try {
+            Path filePath = fileStorageLocation.resolve(fileName).normalize();
+            Resource resource = new UrlResource(filePath.toUri());
+            if (resource.exists()) {
+                return resource;
+            } else {
+                throw new RuntimeException("File not found " + fileName);
+            }
+        } catch (IOException ex) {
+            throw new RuntimeException("File not found " + fileName, ex);
+        }
+    }
+
+    @Override
+    public ApplicationStatusDTO updateApplicationStatus(Long id, String status) {
+       Application application = applicationRepository.findById(id).orElse(null);
+        System.out.println(status);
+       application.setStatus(ApplicationStatus.valueOf(status));
+       applicationRepository.save(application);
+       return new ApplicationStatusDTO(id, status);
+    }
+}
Index: jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/impl/JobAdvertisementServiceImpl.java
===================================================================
--- jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/impl/JobAdvertisementServiceImpl.java	(revision 19398adb44637736271a04ab58b1f528cc33908f)
+++ jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/impl/JobAdvertisementServiceImpl.java	(revision 28b3398dcd7f9cfd044c2cb7923434b06037fee2)
@@ -5,8 +5,11 @@
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.enumerations.JobType;
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.job_advertisements.DTO.JobAdDetailsDTO;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.job_advertisements.DTO.JobAdFilterDTO;
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.job_advertisements.DTO.JobAdvertisementDTO;
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.job_advertisements.JobAdvertisement;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.users.Recruiter;
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.users.User;
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.repositories.JobAdvertisementRepository;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.repositories.RecruiterRepository;
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.repositories.UserRepository;
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.service.intef.JobAdvertisementService;
@@ -15,4 +18,5 @@
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.util.Comparator;
 import java.util.List;
 
@@ -22,8 +26,9 @@
     private final UserRepository userRepository;
     private final JobAdvertisementRepository jobAdvertisementRepository;
+    private final RecruiterRepository recruiterRepository;
 
     @Override
     public JobAdDetailsDTO addJobAdvertisement(JobAdvertisementDTO jobAdvertisementDTO) {
-        User recruiter = userRepository.findByEmail(jobAdvertisementDTO.getEmail()).orElseThrow(() -> new IllegalArgumentException("User not found"));
+        Recruiter recruiter = recruiterRepository.findRecruiterByEmail(jobAdvertisementDTO.getEmail()).orElseThrow(() -> new IllegalArgumentException("User not found"));
         JobAdvertisement jobAdvertisement = new JobAdvertisement(
                 recruiter,
@@ -35,5 +40,5 @@
                 JobType.valueOf(jobAdvertisementDTO.getJobType()),
                 EmploymentStatus.valueOf(jobAdvertisementDTO.getEmploymentStatus())
-                );
+        );
         jobAdvertisementRepository.save(jobAdvertisement);
         return JobAdvertisement.mapToJobAdDetailsDTO(jobAdvertisement);
@@ -79,15 +84,35 @@
 
     @Override
+    public List<JobAdDetailsDTO> filterJobAdvertisements(JobAdFilterDTO jobAdFilterDTO) {
+        List<JobAdvertisement> filteredJobAds = jobAdvertisementRepository.findAll();
+        filteredJobAds = filter(filteredJobAds, jobAdFilterDTO);
+
+        return filteredJobAds.stream()
+                .map(JobAdvertisement::mapToJobAdDetailsDTO)
+                .toList();
+    }
+
+    private List<JobAdvertisement> filter(List<JobAdvertisement> filteredJobAdvertisements, JobAdFilterDTO jobAdFilterDTO) {
+        return filteredJobAdvertisements.stream()
+                .filter(jobAd -> jobAd.getTitle().toLowerCase().contains(jobAdFilterDTO.getSearchTerm().toLowerCase()))
+                .filter(jobAd -> jobAdFilterDTO.getIndustry().equals("all") || jobAd.getIndustry().equals(jobAdFilterDTO.getIndustry()))
+                .sorted(getComparator(jobAdFilterDTO.getSortOrder()))
+                .toList();
+    }
+
+    private Comparator<JobAdvertisement> getComparator(String sortOrder) {
+        return switch (sortOrder) {
+            case "date_newest" -> Comparator.comparing(JobAdvertisement::getPostedOn).reversed();
+            case "date_oldest" -> Comparator.comparing(JobAdvertisement::getPostedOn);
+            case "salary_highest" -> Comparator.comparing(JobAdvertisement::getStartingSalary).reversed();
+            case "salary_lowest" -> Comparator.comparing(JobAdvertisement::getStartingSalary);
+            default -> Comparator.comparing(JobAdvertisement::getPostedOn); // Default sorting order
+        };
+    }
+
+
+    @Override
     public List<JobAdDetailsDTO> findAllJobAdvertisementsByRecruiterId(Long recruiterId) {
         List<JobAdvertisement> jobAdvertisementList = jobAdvertisementRepository.findAllByRecruiterId(recruiterId);
-//        jobAdvertisementList.forEach(jobAdvertisement -> {
-//            if (!jobAdvertisement.isJobAdActive() && jobAdvertisement.isActive()) {
-//                jobAdvertisement.setActive(false);
-//                jobAdvertisementRepository.save(jobAdvertisement);
-//            } else if (jobAdvertisement.isJobAdActive() && !jobAdvertisement.isActive()) {
-//                jobAdvertisement.setActive(true);
-//                jobAdvertisementRepository.save(jobAdvertisement);
-//            }
-//        });
 
         return jobAdvertisementList.stream()
@@ -95,4 +120,14 @@
                 .toList();
     }
+
+    @Override
+    public List<JobAdDetailsDTO> filterJobAdvertisementsByRecruiterId(Long recruiterId, JobAdFilterDTO jobAdFilterDTO) {
+        List<JobAdvertisement> filteredJobAds = jobAdvertisementRepository.findAllByRecruiterId(recruiterId);
+        filteredJobAds = filter(filteredJobAds, jobAdFilterDTO);
+        return filteredJobAds.stream()
+                .map(JobAdvertisement::mapToJobAdDetailsDTO)
+                .toList();
+    }
+
     @Override
     public JobAdDetailsDTO findJobAdvertisementById(Long id) {
Index: jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/intef/ApplicationService.java
===================================================================
--- jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/intef/ApplicationService.java	(revision 28b3398dcd7f9cfd044c2cb7923434b06037fee2)
+++ jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/intef/ApplicationService.java	(revision 28b3398dcd7f9cfd044c2cb7923434b06037fee2)
@@ -0,0 +1,18 @@
+package mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.service.intef;
+
+
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.applications.Application;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.applications.DTO.ApplicationDTO;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.applications.DTO.ApplicationDetailsDTO;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.applications.DTO.ApplicationStatusDTO;
+import org.springframework.core.io.Resource;
+
+import java.util.List;
+
+public interface ApplicationService {
+    ApplicationDetailsDTO submitApplication(ApplicationDTO applicationDTO);
+    List<ApplicationDetailsDTO> findAllByJobAdvertisementId(Long jobId);
+    List<ApplicationDetailsDTO> findAllByJobSeekerId(Long jobSeekerId);
+    Resource loadResumeAsResource(String fileName);
+    ApplicationStatusDTO updateApplicationStatus(Long id, String status);
+}
Index: jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/intef/JobAdvertisementService.java
===================================================================
--- jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/intef/JobAdvertisementService.java	(revision 19398adb44637736271a04ab58b1f528cc33908f)
+++ jobvista-backend/src/main/java/mk/ukim/finki/predmeti/internettehnologii/jobvistabackend/service/intef/JobAdvertisementService.java	(revision 28b3398dcd7f9cfd044c2cb7923434b06037fee2)
@@ -2,4 +2,5 @@
 
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.job_advertisements.DTO.JobAdDetailsDTO;
+import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.job_advertisements.DTO.JobAdFilterDTO;
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.job_advertisements.DTO.JobAdvertisementDTO;
 import mk.ukim.finki.predmeti.internettehnologii.jobvistabackend.models.job_advertisements.JobAdvertisement;
@@ -14,5 +15,7 @@
 
     List<JobAdDetailsDTO> findAllJobAdvertisements();
+    List<JobAdDetailsDTO> filterJobAdvertisements(JobAdFilterDTO jobAdFilterDTO);
     List<JobAdDetailsDTO> findAllJobAdvertisementsByRecruiterId(Long recruiterId);
+    List<JobAdDetailsDTO> filterJobAdvertisementsByRecruiterId(Long recruiterId, JobAdFilterDTO jobAdFilterDTO);
     JobAdDetailsDTO findJobAdvertisementById(Long id);
 
