diff --git a/Setup-for-a-MAC.md b/Setup-for-a-MAC.md new file mode 100644 index 0000000..495784e --- /dev/null +++ b/Setup-for-a-MAC.md @@ -0,0 +1,174 @@ + +
+This guide explains how to run the Ballistic Builder Spring backend and the Next.js frontend locally on macOS using zsh.
+macOS
+zsh (default shell on modern macOS)
Internet access to clone repositories
+
++
+Ensure Java 21 is the active JDK.
+Add the following to your ~/.zshrc:
+Apply changes:
+
+Confirm:
++
Create a workspace directory:
+
+Clone the backend and frontend repositories:
+
+Open Terminal Window 1:
+
+Backend will start at:
+
+API endpoints are available under:
++
+
To avoid CORS issues, Next.js should proxy API calls to Spring.
+Edit or create:
+
+
+++⚠️ Important: API version must be lowercase (
+/api/v1)
Open Terminal Window 2:
+
+Frontend will be available at:
+
++
+
(Replace /api/v1 with a real endpoint if necessary.)
+
Stop a process:
+
++
Fix:
+
+Confirm all paths use /api/v1 (lowercase)
Restart Next.js after changing next.config.js
Verify Spring controllers are mapped correctly
+Using two terminals is recommended, but you can also run both with concurrently:
+
+✔ Java 21
+✔ Spring Boot on 8080
+✔ Next.js on 3000
+✔ API via /api/v1
+✔ macOS + zsh compatible