Using the Starter Template
rex-starter is a minimal REX extension pre-configured with the four modules most studies need: rex-core, rex-history, rex-lists, and rex-local-download. It is the right starting point for building your own study extension.
Do not clone rex-demo as a starting point. rex-demo is meant for exploration: it includes extra modules and configuration that would require cleanup before a real study. rex-starter is already stripped down and ready to customize.
Step 1: Fork rex-starter on GitHub
Section titled “Step 1: Fork rex-starter on GitHub”Forking creates your own copy of the repository under your GitHub account or organization. This is how you will track your changes and eventually distribute the extension.
- Go to https://github.com/bric-digital/rex-starter.
- Click the Fork button in the top-right corner.
- Choose the GitHub account or organization you want to fork into.
- Give the repository a name that reflects your study: for example,
my-study-extensionornews-study-2025. - Click Create fork.
Step 2: Clone your fork locally
Section titled “Step 2: Clone your fork locally”In your terminal, replace YOUR_ORG and my-study-extension with your actual GitHub account/organization and repo name:
git clone https://github.com/YOUR_ORG/my-study-extension.gitcd my-study-extensionStep 3: Build the extension
Section titled “Step 3: Build the extension”npm installnpm run buildnpm install downloads all dependencies, including the REX modules listed in package.json. npm run build compiles the TypeScript source into a Chrome-loadable extension in dist/extension/.
Step 4: Load it in Chrome
Section titled “Step 4: Load it in Chrome”- Open Chrome and go to
chrome://extensions. - Turn on Developer mode in the top-right corner.
- Click Load unpacked.
- Navigate to your cloned folder and select the
dist/extension/subfolder.
The extension will appear in your list with a green toggle indicating it is active. If you are using Edge, follow the same steps at edge://extensions.
Step 5: Verify it works
Section titled “Step 5: Verify it works”Pin the extension to your toolbar (click the puzzle piece icon, then the pin next to your extension name). Click the icon, enter a test ID when prompted, and browse for a minute. Then open the extension popup and confirm the download button appears and produces a JSON file. If it does, the build is working correctly.
Optional: Rename the GitHub repo
Section titled “Optional: Rename the GitHub repo”If you want to change the name after creating the fork, go to your repo on GitHub, click Settings, scroll to the Repository name field, enter a new name, and click Rename. Update your local remote to match:
git remote set-url origin https://github.com/YOUR_ORG/new-name.gitNext steps
Section titled “Next steps”- Branding Your Extension: update the extension name, description, and icons
- Choosing Modules: add or remove modules to match your study’s data collection needs
- Participant Configuration: customize list configuration and server settings