src/index.js: The application entry point that sets up the React app and initializes the ServerFunctionProvider.
src/ApplicationRouter.js: The main router component that handles navigation in the app.
src/pages/Public/HelloWorld.js: An example component that demonstrates using server code markers. This file includes:
// @eserver-register-next-line
) to indicate server codesrc/utils/use-server.js: The core library that manages server functions. It:
src/utils/dev-runtime-injector.js: A development-specific utility that:
server/server-function-hub.js: The WebSocket server that:
config-overrides.js: Configuration for React App Rewired that:
server-marker-loader.js: A Webpack loader that:
This architecture creates a seamless system where frontend developers can include server code directly in their React components using simple comment markers. The system handles the complexity of sending the code to the server, executing it, and returning the results to the client.