diff --git a/backend/src/main/java/com/example/todoapp/controller/StocksController.java b/backend/src/main/java/com/example/todoapp/controller/StocksController.java
new file mode 100644
index 0000000..8bdf482
--- /dev/null
+++ b/backend/src/main/java/com/example/todoapp/controller/StocksController.java
@@ -0,0 +1,106 @@
+package com.example.todoapp.controller;
+
+import com.example.todoapp.dto.StockDTO;
+import com.example.todoapp.model.Stocks;
+import com.example.todoapp.service.StocksService;
+import jakarta.validation.Valid;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.core.Authentication;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 在庫管理のコントローラー
+ *
+ * このコントローラーは在庫の取得、作成、更新、削除などの
+ * エンドポイントを提供します。すべてのエンドポイントは認証が必要です。
+ *
+ */
+@RestController
+@RequestMapping("/stocks")
+public class StocksController {
+
+ @Autowired
+ private StocksService stockService;
+
+ /**
+ * ログインユーザーのすべての在庫を取得する
+ *
+ * @param authentication 認証情報
+ * @return ユーザーの在庫リスト
+ */
+ @GetMapping
+ public ResponseEntity> getAllStocks(Authentication authentication) {
+ List stocks = stockService.getALLStocksByUser(authentication.getName());
+ // エンティティからDTOへの変換
+ List stockDTOs = stocks.stream()
+ .map(StockDTO::fromEntity)
+ .collect(Collectors.toList());
+ return ResponseEntity.ok(stockDTOs);
+ }
+
+ /**
+ * 指定されたIDの在庫を取得する
+ *
+ * @param authentication 認証情報
+ * @param stockId 在庫ID
+ * @return 在庫情報
+ */
+ @GetMapping("/{id}")
+ public ResponseEntity getStockById(
+ Authentication authentication,
+ @PathVariable("id") Long stockId) {
+ Stocks stock = stockService.getStockById(authentication.getName(), stockId);
+ return ResponseEntity.ok(StockDTO.fromEntity(stock));
+ }
+
+ /**
+ * 新しい在庫を作成する
+ *
+ * @param authentication 認証情報
+ * @param stock 作成する在庫の情報
+ * @return 作成された在庫
+ */
+ @PostMapping
+ public ResponseEntity createStock(
+ Authentication authentication,
+ @Valid @RequestBody Stocks stock) {
+ Stocks createdStock = stockService.createStock(authentication.getName(), stock);
+ return ResponseEntity.ok(StockDTO.fromEntity(createdStock));
+ }
+
+ /**
+ * 指定されたIDの在庫を更新する
+ *
+ * @param authentication 認証情報
+ * @param stockId 更新する在庫のID
+ * @param stockDetails 更新内容
+ * @return 更新された在庫
+ */
+ @PutMapping("/{id}")
+ public ResponseEntity updateStock(
+ Authentication authentication,
+ @PathVariable("id") Long stockId,
+ @Valid @RequestBody Stocks stockDetails) {
+ Stocks updatedStock = stockService.updateStocks(authentication.getName(), stockId, stockDetails);
+ return ResponseEntity.ok(StockDTO.fromEntity(updatedStock));
+ }
+
+ /**
+ * 指定されたIDの在庫を削除する
+ *
+ * @param authentication 認証情報
+ * @param taskId 削除する在庫のID
+ * @return 空のレスポンス
+ */
+ @DeleteMapping("/{id}")
+ public ResponseEntity> deleteStock(
+ Authentication authentication,
+ @PathVariable("id") Long stockId) {
+ stockService.deleteStock(authentication.getName(), stockId);
+ return ResponseEntity.ok().build();
+ }
+}
\ No newline at end of file
diff --git a/backend/src/main/java/com/example/todoapp/dto/StockDTO.java b/backend/src/main/java/com/example/todoapp/dto/StockDTO.java
new file mode 100644
index 0000000..8363c3e
--- /dev/null
+++ b/backend/src/main/java/com/example/todoapp/dto/StockDTO.java
@@ -0,0 +1,47 @@
+package com.example.todoapp.dto;
+
+import com.example.todoapp.model.Stocks;
+import com.example.todoapp.model.Stuffs;
+
+import lombok.Data;
+
+import java.time.LocalDate;
+
+/**
+ * 在庫のデータ転送オブジェクト(DTO)
+ *
+ * このクラスはクライアントとサーバー間で在庫情報をやり取りするために使用されます。
+ * エンティティとは異なり、必要な情報のみを含み、関連エンティティへの参照ではなくIDのみを保持します。
+ *
+ */
+
+@Data
+public class StockDTO {
+ private int stock_id;
+ private Stuffs stuffs;
+ private Long user_id;
+ private int amount;
+ private int price;
+ private LocalDate buy_date;
+ private LocalDate last_update;
+ private LocalDate exp_date;
+
+ /**
+ * 在庫エンティティからDTOを作成する
+ *
+ * @param stock 変換元の在庫エンティティ
+ * @return 変換されたStockDTOオブジェクト
+ */
+ public static StockDTO fromEntity(Stocks stock) {
+ StockDTO dto = new StockDTO();
+ dto.setStock_id(stock.getStock_id());
+ dto.setStuffs(stock.getStuffs());
+ dto.setUser_id(stock.getUser_id().getId());
+ dto.setAmount(stock.getAmount());
+ dto.setPrice(stock.getPrice());
+ dto.setBuy_date(stock.getBuy_date());
+ dto.setLast_update(stock.getLast_update());
+ dto.setExp_date(stock.getExp_date());
+ return dto;
+ }
+}
\ No newline at end of file
diff --git a/backend/src/main/java/com/example/todoapp/repository/StocksRepository.java b/backend/src/main/java/com/example/todoapp/repository/StocksRepository.java
new file mode 100644
index 0000000..10334d2
--- /dev/null
+++ b/backend/src/main/java/com/example/todoapp/repository/StocksRepository.java
@@ -0,0 +1,50 @@
+//--------------------------------
+// ToBuysRepository.java
+//
+//
+// 更新履歴:2025/06/05 新規作成
+// Copyright(c) 2025 IVIS All rights reserved.
+//--------------------------------------------
+package com.example.todoapp.repository;
+
+import com.example.todoapp.model.Stocks;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 在庫エンティティのリポジトリインターフェース
+ *
+ * このインターフェースは在庫データへのアクセスと操作を提供します。
+ * Spring Data JPAによって自動的に実装されます。
+ *
+ */
+
+@Repository
+public interface StocksRepository extends JpaRepository {
+ /**
+ * user_idから在庫一覧をstock_id順で取得する
+ *
+ * @param user_id 検索するユーザーID
+ * @return 在庫リスト
+ */
+ List findStocksByUser_id(Long user_id);
+
+ /**
+ * 在庫情報を更新する
+ *
+ * @param stock 編集する新たな情報が入ったstockオブジェクト
+ * @return 編集に成功したらtrue
+ */
+ boolean UpdateStockByStock_id(Stocks stock);
+
+ /**
+ * 在庫リストから指定した食材を削除する
+ *
+ * @param stock_id 削除する在庫
+ * @param user_id 削除するユーザー
+ * @return 削除した場合true
+ */
+ boolean DeleteStockByStock_id(int stock_id, Long user_id);
+}
\ No newline at end of file
diff --git a/backend/src/main/java/com/example/todoapp/service/StocksService.java b/backend/src/main/java/com/example/todoapp/service/StocksService.java
new file mode 100644
index 0000000..85580d2
--- /dev/null
+++ b/backend/src/main/java/com/example/todoapp/service/StocksService.java
@@ -0,0 +1,112 @@
+package com.example.todoapp.service;
+
+import com.example.todoapp.model.Stocks;
+import com.example.todoapp.util.MessageUtils;
+import com.example.todoapp.model.User;
+import com.example.todoapp.repository.StocksRepository;
+import com.example.todoapp.repository.UserRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * Stocksテーブルのサービスクラス
+ *
+ * このクラスは在庫の追加、取得、更新、削除などのビジネスロジックを提供します。
+ *
+ */
+@Service
+public class StocksService {
+ @Autowired
+ private StocksRepository stocksRepository;
+
+ @Autowired
+ private UserRepository userRepository;
+
+ @Autowired
+ private MessageUtils messageUtils;
+
+ /**
+ * 新たな在庫を追加する
+ *
+ * @param username ユーザー名
+ * @param stock 追加する在庫情報
+ * @return 保存された在庫エンティティ
+ */
+ public Stocks createStock(String username, Stocks stock) {
+ User user = getUserByUsername(username);
+ stock.setUser_id(user);
+ return stocksRepository.save(stock);
+
+ }
+
+ /**
+ * 指定されたユーザのすべての在庫を取得する
+ * @param username ユーザー名
+ * @return ユーザーの在庫リスト(stock_id昇順)
+ */
+ public List getALLStocksByUser(String username) {
+ User user = getUserByUsername(username);
+ return stocksRepository.findStocksByUser_id(user.getId());
+ }
+
+ /**
+ * 指定されたユーザーの特定の在庫を取得する
+ *
+ * @param username ユーザー名
+ * @param stockId 在庫ID
+ * @return 在庫エンティティ
+ * @throws RuntimeException 在庫が見つからない場合、または他のユーザーの在庫にアクセスしようとした場合
+ */
+ public Stocks getStockById(String username, Long stockId) {
+ User user = getUserByUsername(username);
+ return stocksRepository.findById(stockId)
+ .filter(stock -> stock.getUser_id().getId().equals(user.getId())) // ユーザーの在庫かどうかを確認
+ .orElseThrow(() -> new RuntimeException(messageUtils.getMessage("error.stock.not.found")));
+ }
+
+ /**
+ * 指定された在庫情報を編集する
+ *
+ * @param username ユーザー名
+ * @param stockId 変数する在庫ID
+ * @param stockDetails 編集内容(新しい情報)
+ * @return 編集された在庫エンティティ
+ */
+ public Stocks updateStocks(String username, Long stockId, Stocks stockDetails) {
+ Stocks stock = getStockById(username, stockId);
+ stock.setAmount(stockDetails.getAmount());
+ stock.setPrice(stockDetails.getPrice());
+ stock.setLast_update(stockDetails.getLast_update());
+ stock.setBuy_date(stockDetails.getBuy_date());
+ stock.setExp_date(stockDetails.getExp_date());
+ return stocksRepository.save(stock);
+ }
+
+ /**
+ * 指定された在庫を削除する
+ *
+ * @param username ユーザー名
+ * @param taskId 削除する在庫のID
+ */
+ public void deleteStock(String username, Long stockId) {
+ Stocks stock = getStockById(username, stockId);
+ stocksRepository.delete(stock);
+ }
+
+
+ /**
+ * ユーザー名からユーザーエンティティを取得する
+ *
+ * @param username ユーザー名
+ * @return ユーザーエンティティ
+ * @throws UsernameNotFoundException ユーザーが見つからない場合
+ */
+ private User getUserByUsername(String username) {
+ return userRepository.findByUsername(username)
+ .orElseThrow(() -> new UsernameNotFoundException(messageUtils.getMessage("error.auth.user.not.found.with.name", new Object[]{username})));
+ }
+
+}