Index: backend/subjects/management/README.md
===================================================================
--- backend/subjects/management/README.md	(revision aca8cc10112587e7a40fa29f36d4161848e53eed)
+++ backend/subjects/management/README.md	(revision b9a043ae3cd897c768eb2bbfc70479463ea55ec4)
@@ -13,4 +13,5 @@
 - `prerequisites.json` - array of subject prerequisites (as strings).
 - `professors.json` - array of all subjects with their respective professors and assistants.
+- `reviews.json` - array of existing reviews used to initially fill the db.
 - `subject_details.json` - JSON containing all subjects and relevant information about them, aggregated from the other data files. used for filling the db. If you want to modify some of the data before filling the database it is preferred to do so in the other files and then rerun the respective command for overwriting this file, instead of changing this file directly.
 - `subjects_by_program.json` - JSON listing all subjects and the programs for which they are mandatory.
@@ -34,5 +35,5 @@
 ### Scripts
 
-- `fill_db.py` - reads data from subject details and populates the db. useful for initial set up. for overwriting the existing data in the db run the command with --reset flag.
+- `fill_db.py` - reads data from subject details and reviews, then populates the db. useful for initial set up. for overwriting the existing data in the db run the command with --reset flag.
 - `format_prereqs.py` - reads data from prerequisites.json, and writes the formatted output to `data/formatted_prereqs.json`
 - `subject_details.py` - aggregates data from multiple JSON files, and writes the combined information in `/data/subject_details.json`.
Index: backend/subjects/management/commands/fill_db.py
===================================================================
--- backend/subjects/management/commands/fill_db.py	(revision aca8cc10112587e7a40fa29f36d4161848e53eed)
+++ backend/subjects/management/commands/fill_db.py	(revision b9a043ae3cd897c768eb2bbfc70479463ea55ec4)
@@ -5,40 +5,4 @@
 from pathlib import Path
 from auth_form.models import User, Student
-
-def add_review(review_data, student):
-    review_type = review_data.get('type')
-    subject_name = review_data.get('subject')
-
-    if not review_type or not subject_name:
-        print(f"Skipping review due to missing type or subject: {review_data}")
-        return
-
-    try:
-        subject = Subject.objects.get(name=subject_name)
-    except Subject.DoesNotExist:
-        print(f"Skipping review because subject '{subject_name}' not found.")
-        return
-    review = Review.objects.create(
-        student=student,
-        subject=subject,
-        review_type=review_type,
-    )
-
-    context = {'review': review}
-    if review_type == "evaluation":
-        serializer = EvaluationReviewSerializer(data=review_data, context=context)
-    elif review_type == "other":
-        serializer = OtherReviewSerializer(data=review_data, context=context)
-    else:
-        review.delete()
-        print(f"Unknown review type: {review_type}")
-        return
-
-    if serializer.is_valid():
-        print(f"Successfully added review for {subject_name}")
-        serializer.save()
-    else:
-        print(f"Error saving review for {subject_name}: {serializer.errors}")
-        review.delete()
 
 class Command(BaseCommand):
@@ -51,4 +15,94 @@
             help='Delete existing Subjects and Subject_Info before filling.'
         )
+
+    def create_subject(self, subject_details):
+        subjects = []
+        for item in subject_details.values():
+            # only get the 23 accreditation code
+            code = item["code"] if "," not in item["code"] else item["code"].split(",")[1].strip()
+            subject = Subject(
+                name=item["subject"],
+                code=code,
+                abstract=item.get("abstract")
+            )
+            subjects.append(subject)
+
+        created_subjects = Subject.objects.bulk_create(subjects)
+        return created_subjects
+
+    def create_subject_info(self, created_subjects, subject_details):
+        name_to_id = {subj.name.lower(): subj.id for subj in created_subjects}
+        subject_infos = []
+        for db_subject, item in zip(created_subjects, subject_details.values()):
+            prereq = item.get("prerequisite", {})
+            if "subjects" in prereq:
+                subjects_list = prereq["subjects"]
+                subjects_id_list = []
+                for subject_name in subjects_list:
+                    subject_id = name_to_id.get(subject_name.lower())
+                    if subject_id is not None:
+                        subjects_id_list.append(subject_id)
+                    else:
+                        self.stdout.write(self.style.WARNING(f"Warning: Subject {subject_name} not found in DB"))
+            
+                prereq = {"subjects": subjects_id_list}
+                                        
+            info = Subject_Info(
+                subject=db_subject,
+                level=item["level"],
+                prerequisite=prereq,
+                activated=item["activated"],
+                participants=item.get("participants", [0, 0, 0]),
+                mandatory=item["mandatory"],
+                mandatory_for=item.get("mandatoryFor", []),
+                semester=item["semester"],
+                season=item["season"],
+                elective_for=item.get("electiveFor", []),
+                professors=item.get("professors", []),
+                assistants=item.get("assistants", []),
+                tags=item.get("tags", []),
+                technologies=item.get("technologies", []),
+                evaluation=item.get("evaluation", []),
+                is_easy=item.get("isEasy", False),
+            )
+            subject_infos.append(info)
+    
+        Subject_Info.objects.bulk_create(subject_infos)
+
+    def create_review(self, review_data, student):
+        review_type = review_data.get('type')
+        subject_name = review_data.get('subject')
+
+        if not review_type or not subject_name:
+            print(f"Skipping review due to missing type or subject: {review_data}")
+            return
+
+        try:
+            subject = Subject.objects.get(name=subject_name)
+        except Subject.DoesNotExist:
+            print(f"Skipping review because subject '{subject_name}' not found.")
+            return
+        review = Review.objects.create(
+            student=student,
+            subject=subject,
+            review_type=review_type,
+        )
+
+        context = {'review': review}
+        if review_type == "evaluation":
+            serializer = EvaluationReviewSerializer(data=review_data, context=context)
+        elif review_type == "other":
+            serializer = OtherReviewSerializer(data=review_data, context=context)
+        else:
+            review.delete()
+            self.stdout.write(self.style.WARNING(f"Unknown review type: {review_type}"))
+            return
+
+        if serializer.is_valid():
+            self.stdout.write(self.style.SUCCESS(f"Successfully added review for {subject_name}"))
+            serializer.save()
+        else:
+            self.stdout.write(self.style.WARNING(f"Error saving review for {subject_name}: {serializer.errors}"))
+            review.delete()
 
     def handle(self, *args, **options):
@@ -71,60 +125,7 @@
             all_reviews = json.load(f)
 
-        for item in subject_details.values():
-            name = item["subject"].lower()
-            code = item["code"] if "," not in item["code"] else item["code"].split(",")[1].strip()
+        created_subjects = self.create_subject(subject_details)
 
-        subjects = []
-        for item in subject_details.values():
-            # only get the 23 accreditation code
-            code = item["code"] if "," not in item["code"] else item["code"].split(",")[1].strip()
-            subject = Subject(
-                name=item["subject"],
-                code=code,
-                abstract=item.get("abstract")
-            )
-            subjects.append(subject)
-
-        created_subjects = Subject.objects.bulk_create(subjects)
-
-        name_to_id = {subj.name.lower(): subj.id for subj in created_subjects}
-
-
-        subject_infos = []
-        for db_subject, item in zip(created_subjects, subject_details.values()):
-            prereq = item.get("prerequisite", {})
-            if "subjects" in prereq:
-                subjects_list = prereq["subjects"]
-                subjects_id_list = []
-                for subject_name in subjects_list:
-                    subject_id = name_to_id.get(subject_name.lower())
-                    if subject_id is not None:
-                        subjects_id_list.append(subject_id)
-                    else:
-                        self.stdout.write(self.style.WARNING(f"Warning: Subject {subject_name} not found in DB"))
-            
-                prereq = {"subjects": subjects_id_list}
-                                          
-            info = Subject_Info(
-                subject=db_subject,
-                level=item["level"],
-                prerequisite=prereq,
-                activated=item["activated"],
-                participants=item.get("participants", [0, 0, 0]),
-                mandatory=item["mandatory"],
-                mandatory_for=item.get("mandatoryFor", []),
-                semester=item["semester"],
-                season=item["season"],
-                elective_for=item.get("electiveFor", []),
-                professors=item.get("professors", []),
-                assistants=item.get("assistants", []),
-                tags=item.get("tags", []),
-                technologies=item.get("technologies", []),
-                evaluation=item.get("evaluation", []),
-                is_easy=item.get("isEasy", False),
-            )
-            subject_infos.append(info)
-        
-        Subject_Info.objects.bulk_create(subject_infos)
+        self.create_subject_info(created_subjects, subject_details)
         
         self.stdout.write(self.style.SUCCESS('Subjects and SubjectInfo filled successfully.'))
@@ -148,5 +149,5 @@
 
         for review_data in all_reviews:
-            add_review(review_data, student)
+            self.create_review(review_data, student)
         
         self.stdout.write(self.style.SUCCESS('Reviews filled successfully.'))
