Index: app/main.py
===================================================================
--- app/main.py	(revision 6d7089148b75092cadc113c92f51cd4c3460b799)
+++ app/main.py	(revision 16e7e837dd7edfe3f101dc873e6c118d5be09536)
@@ -8,4 +8,5 @@
 from fastapi.security import OAuth2PasswordBearer
 from app.auth import create_access_token, decode_access_token, is_admin, hash_password, verify_password
+from sqlalchemy import func, literal_column, select
 
 # Initialize FastAPI app
@@ -499,15 +500,4 @@
     return {"message": "Transaction deleted successfully"}
 
-@app.get("/reports/", response_model=dict)
-def get_reports(
-    db: Session = Depends(get_db)
-):
-    total_spent = (
-        db.query(Transaction)
-        .with_entities(Transaction.amount)
-        .filter(Transaction.amount > 0)
-        .all()
-    )
-    return {"report": "Reports feature placeholder"}
 
 @app.post("/tags/", response_model=TagResponse)
@@ -707,2 +697,145 @@
 
     return tags
+
+@app.get("/reports/total-spending", response_model=dict)
+def get_total_spending(
+    user: User = Depends(get_current_user),
+    db: Session = Depends(get_db)
+):
+    """
+    Calculate and return total spending for the logged-in user.
+    - Admins can view total spending for all users.
+    """
+    try:
+        query = db.query(
+                func
+                .sum(Transaction.amount)
+                .label("total_spent")
+            )
+
+        if is_admin(user.email):
+            # Admin: Total spending for all users
+            total_spent = (
+                query
+                .filter(Transaction.amount > 0)
+                .scalar()
+            )
+        else:
+            # Regular User: Total spending for their accounts
+            total_spent = (
+                query
+                .join(TransactionBreakdown, Transaction.transaction_id == TransactionBreakdown.transaction_id)
+                .join(TransactionAccount, TransactionBreakdown.transaction_account_id == TransactionAccount.transaction_account_id)
+                .filter(TransactionAccount.user_id == user.user_id)
+                .filter(Transaction.amount > 0)
+                .scalar()
+            )
+
+        return {"total_spent": total_spent or 0.0}
+    except Exception as e:
+        print(f"Error calculating total spending: {e}")
+        raise HTTPException(
+            status_code=500, 
+            detail="Failed to calculate total spending."
+        )
+    
+@app.get("/reports/spending-by-category", response_model=dict)
+def get_spending_by_category(
+    user: User = Depends(get_current_user),
+    db: Session = Depends(get_db)
+):
+    """
+    Calculate and return spending grouped by category (tags) for the logged-in user.
+    - Admins can view spending by category for all users.
+    """
+    try:
+        # Base query
+        query = db.query(
+            Tag.tag_name,
+            func.sum(Transaction.amount).label("total_spent")
+        ).join(
+            TagAssignedToTransaction, Tag.tag_id == TagAssignedToTransaction.tag_id
+        ).join(
+            Transaction, TagAssignedToTransaction.transaction_id == Transaction.transaction_id
+        ).filter(
+            Transaction.amount > 0  # Include only positive amounts
+        )
+
+        # Apply filters for regular users
+        if not is_admin(user.email):
+            query = query.join(
+                TransactionBreakdown, Transaction.transaction_id == TransactionBreakdown.transaction_id
+            ).join(
+                TransactionAccount, TransactionBreakdown.transaction_account_id == TransactionAccount.transaction_account_id
+            ).filter(
+                TransactionAccount.user_id == user.user_id
+            )
+
+        # Group by tag and calculate the total spending for each category
+        spending_by_category = query.group_by(Tag.tag_name).all()
+
+        # Prepare the response as a dictionary
+        response = {row.tag_name: float(row.total_spent or 0) for row in spending_by_category}
+        return {"spending_by_category": response}
+
+    except Exception as e:
+        print(f"Error calculating spending by category: {e}")
+        raise HTTPException(
+            status_code=500, 
+            detail="Failed to calculate spending by category."
+        )
+
+@app.get("/reports/spending-by-date-range", response_model=dict)
+def get_spending_by_date_range(
+    start_date: str, # Expecting date in 'YYYY-MM-DD' format
+    end_date: str,
+    user: User = Depends(get_current_user),
+    db: Session = Depends(get_db)
+):
+    """
+    Calculate and return spending within a specified date range for the logged-in user.
+    - Admins can view spending within the date range for all users.
+    """
+    try:
+        # Convert input dates to `datetime`
+        start_date_parsed = datetime.strptime(start_date, "%Y-%m-%d")
+        end_date_parsed = datetime.strptime(end_date, "%Y-%m-%d")
+
+        # Query base
+        query = db.query(func.sum(Transaction.amount).label("total_spent"))
+
+        if is_admin(user.email):
+            # Admin: Total spending for all users within the date range
+            total_spent = (
+                query
+                .filter(
+                    Transaction.date >= start_date_parsed,
+                    Transaction.date <= end_date_parsed,
+                    Transaction.amount > 0
+                )
+                .scalar()
+            )
+        else:
+            # Regular User: Total spending within the date range for their accounts
+            total_spent = (
+                query
+                .join(TransactionBreakdown, Transaction.transaction_id == TransactionBreakdown.transaction_id)
+                .join(TransactionAccount, TransactionBreakdown.transaction_account_id == TransactionAccount.transaction_account_id)
+                .filter(
+                    TransactionAccount.user_id == user.user_id,
+                    Transaction.date >= start_date_parsed,
+                    Transaction.date <= end_date_parsed,
+                    Transaction.amount > 0
+                )
+                .scalar()
+            )
+
+        # Return result
+        return {"total_spent": total_spent or 0.0}
+    except Exception as e:
+        print(f"Error calculating spending by date range: {e}")
+        raise HTTPException(
+            status_code=500,
+            detail="Failed to calculate spending by date range."
+        )
+
Index: cli/cli_app.py
===================================================================
--- cli/cli_app.py	(revision 6d7089148b75092cadc113c92f51cd4c3460b799)
+++ cli/cli_app.py	(revision 16e7e837dd7edfe3f101dc873e6c118d5be09536)
@@ -170,5 +170,5 @@
             view_transaction_tags()
         elif choice == "11":
-            view_reports()
+            reports_menu()
         elif choice == "12":
             print("Logging out...")
@@ -401,13 +401,103 @@
         print(f"Failed to retrieve transaction. Error: {response.json().get('detail', 'Unknown error')}")
 
-def view_reports():
-    print("\nView Reports")
-    response = requests.get(f"{BASE_URL}/reports/")
-
-    if response.status_code == 200:
-        print(response.json())
-    else:
-        print("Error retrieving reports.")
+def reports_menu():
+    """
+    Displays the reports menu.
+    """
+    global access_token
+    
+    while True:
+        print("\nReports Menu")
+        print("0. Go back to User Menu")
+        print("1. View Total Spending")
+        print("2. View Spending by Category")
+        print("3. View Spending by Date Range")
+        choice = input("Choose a report option: ")
+
+        if choice == "1":
+            get_total_spending()
+        elif choice == "2":
+            get_spending_by_category()
+        elif choice == "3":
+            get_spending_by_date_range()
+        elif choice == "0":
+            break
+        else:
+            print("Invalid choice. Please try again.")
+
+def get_total_spending():
+    headers = {"Authorization": f"Bearer {access_token}"}
+
+    print("\nTotal Spending Report")
+    try:
+        response = requests.get(f"{BASE_URL}/reports/total-spending", headers=headers)
+
+        if response.status_code == 200:
+            data = response.json()
+            total_spent = data.get("total_spent", 0.0)
+            print(f"Your total spending is: {float(total_spent):,.2f}")
+        else:
+            print("Failed to fetch the total spending report.")
+            error_message = response.json().get("detail", "Unknown error")
+            print(f"Error: {error_message}")
+    except requests.exceptions.RequestException as e:
+        print(f"Request failed: {e}")
+
+def get_spending_by_category():
+    headers = {"Authorization": f"Bearer {access_token}"}
+
+    print("\nSpending by Category Report")
+    try:
+        response = requests.get(f"{BASE_URL}/reports/spending-by-category", headers=headers)
+
+        if response.status_code == 200:
+            data = response.json()
+            spending_by_category = data.get("spending_by_category", {})
+
+            if not spending_by_category:
+                print("No spending data found by category.")
+            else:
+                print("\nSpending by Category:")
+                print("-" * 50)
+                for category, amount in spending_by_category.items():
+                    print(f"Category: {category}")
+                    print(f"Total Spending: {float(amount):,.2f}")
+                    print("-" * 50)
+        else:
+            print("Failed to fetch the spending by category report.")
+            error_message = response.json().get("detail", "Unknown error")
+            print(f"Error: {error_message}")
+    except requests.exceptions.RequestException as e:
+        print(f"Request failed: {e}")
+
+def get_spending_by_date_range():
+    headers = {"Authorization": f"Bearer {access_token}"}
+
+    print("\nSpending by Date Range Report")
+    start_date = input("Enter start date (YYYY-MM-DD): ")
+    end_date = input("Enter end date (YYYY-MM-DD): ")
+
+    try:
+        response = requests.get(
+            f"{BASE_URL}/reports/spending-by-date-range",
+            params={"start_date": start_date, "end_date": end_date},
+            headers=headers
+        )
+
+        if response.status_code == 200:
+            data = response.json()
+            total_spent = data.get("total_spent", 0.0)
+            print("\nSpending by Date Range:")
+            print(f"From: {start_date} To: {end_date}")
+            print(f"Total Spending: {float(total_spent):,.2f}")
+        else:
+            print("Failed to fetch the spending by date range report.")
+            error_message = response.json().get("detail", "Unknown error")
+            print(f"Error: {error_message}")
+    except requests.exceptions.RequestException as e:
+        print(f"Request failed: {e}")
+
 
 if __name__ == "__main__":
     main_menu()
+
