RaceCoordinator 2.0 built with google antigravity
The run_server_headless.sh script handles dependency downloading (including protoc) automatically.
The run_client.sh script handles npm install automatically if node_modules is missing.
- Check permissions:
chmod +x run_server_headless.sh run_client.sh - Run Server:
./run_server_headless.sh - Run Client:
./run_client.sh(will take a moment to install dependencies first time)
Note: The script incrementally compiles. If you need a clean build (e.g., weird compilation errors), run cd server && mvn clean manually, then run ./run_server_headless.sh again.
If the server fails to start with "Address already in use", you likely have a zombie MongoDB process. Run the provided script to fix it (updated to handle permissions better):
./kill_zombie_mongo.shOr use the Antigravity command:
/kill_zombie_mongo
If the client or server faile to starup, ensure a previous run is not still running. Simply kill the client and server and try again.
./kill_client_server.shOr use the Antigravity command:
/kill_client_server
The server runs on port 7070 and handles API requests.
cd server
mvn compile exec:java -Dexec.mainClass="com.antigravity.App"The client runs on port 4200.
cd client
npm startOnce both are running, open your browser to: http://localhost:4200
To stop the running client or server, you can use one of the following methods:
If you started the processes in a terminal window, simply press Ctrl+C in that window to terminate the process.
If you are using the Antigravity extension, you can stop the processes by terminating the terminal tasks where they are running.
If the processes are running in the background, you can stop them by finding their PIDs and killing them:
-
Server (Port 7070):
lsof -ti :7070 | xargs kill
-
Client (Port 4200):
lsof -ti :4200 | xargs kill
-
Client and Server:
./kill_client_server.sh
Or use the Antigravity command:
/kill_client_server
This project includes unit tests for the backend and frontend, as well as visual regression tests for the client.
You can run all tests across the entire project using the master script:
./run_all_tests.shRun the standard Jasmine/Karma unit tests:
./run_client_unit_tests.shNote: This script automatically installs and uses a local Playwright text-to-speech compatible Chromium instance, ensuring tests run consistently regardless of your installed system browser.
Run Playwright-based visual tests to detect UI regressions:
./run_client_screendiff_tests.shIf you have intentionally modified the UI and need to update the expected screenshots, run:
./run_client_screendiff_tests.sh --update-snapshotsRun the JUnit tests for the backend:
./run_server_tests.shTo debug the server, you need to enable the Java Debug Wire Protocol (JDWP) when starting the application.
-
Start the server in debug mode:
MAVEN_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" ./run_server_headless.shNote:
suspend=nmeans the server will start immediately. Change tosuspend=yif you want it to wait for a debugger to attach before starting. -
Set Breakpoints: In VS Code, open your Java files (e.g.,
App.java) and click in the gutter to the left of the line numbers to set breakpoints. -
Attach Debugger:
- Install the Debugger for Java extension in VS Code.
- Go to the Run and Debug view (
Cmd+Shift+D). - Create a
launch.jsonor use an existing one to "Attach" to port5005.
The Angular client is configured to generate source maps in development mode, allowing you to debug the original TypeScript code instead of the compiled/obfuscated JavaScript.
-
Using Browser DevTools (Chrome/Edge):
- Open the application in your browser.
- Press
F12orCmd+Option+Ito open DevTools. - Go to the Sources tab.
- Press
Cmd+P(Mac) orCtrl+P(Windows) and type the name of the component file you want to debug (e.g.,home.component.ts). - Click on line numbers to set breakpoints.
-
Using VS Code:
- Install the Debugger for Chrome (or Edge) extension.
- You can launch or attach to the browser directly from VS Code for an integrated debugging experience.
You can create installable packages for macOS and Windows using the provided script.
Run the build script from the root directory:
./create_installers.shThis script will:
- Build the production Angular client.
- Package the Java server into a fat JAR.
- Download necessary JREs for offline Windows installers.
- Generate platform-specific launch scripts.
- Create compressed distribution packages in the
release/directory.
After running the script, check the release/ folder for:
RaceCoordinator_Universal.zip: A standard distribution for Mac, Linux, and Windows. Requires Java to be already installed on the system.RaceCoordinator_Windows_Offline.zip: A Windows-specific distribution that includes bundled JREs (Java 8 for XP/7/8, Java 17 for 10/11). Works without an internet connection.RaceCoordinator_Mac.dmg: (macOS only) A Disk Image for easy installation on Mac. Only generated if the script is run on a Mac.
- macOS: 10.15 (Catalina) or newer recommended.
- Windows: Windows XP SP3 or newer. 32-bit and 64-bit supported.
- Linux / Raspberry Pi: Any modern distribution with Java 8 or newer.