Project Structure
A Rook application has several moving components. We'll start with an overview of the code structure and then go in-depth.
API server (/src/api/)
routes/: The "main" directory. Each file that lives in this directory will be loaded by Rook into Hapiextensions/: These files provide a callback to allow full customization of Hapi
Redux reducers (/src/redux/)
modules/index.js: This file aggregates your other reducers and provides a hook point for setting initial statemodules/: The other files inside of this directory hold your Redux reducers
React views (/src/views/)
_app/App.js: Your application and meta-information shell_app/Head.js: Customizations to the<head>sectionroutes.js: Your react-router route definition**/*: Other files you need to render your views
Configuration (/config/)
server/: Server-only configuration loaded by config.server/local.json5: Added to .gitignore, holds machine-specific configurationclient.js: Used to render the React application. These values are used both server and client-side for app rendering. Do not store credentials in this file.rook.js: Controls certain Rook behavior.
Next Steps
Let's dive into each of these sections for a better understanding, starting with the API server.