You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# NCMBatteryWebsite
A React admin UI for building NCMBattery study "batteries" � pick task types, attach a
parameter set to each one, and save the result to the `ncmbattery_config` MySQL database used by
the NCMBattery JATOS study repo. See that repo's
`MySQL/ConfigurationDatabase/DiscussionLog.md` for the full design history of the database and
this integration.
## Setup
```bash
cd user-website
npm install
```
Create `user-website/.env.local` (gitignored, one per developer/deployment):
```
REACT_APP_API_BASE=https://your-server/api
REACT_APP_ADMIN_API_BASE=https://your-server/api/admin
```
These must point at a deployed copy of NCMBattery's `MySQL/ConfigurationDatabase/*.php` files �
see that repo's `SetupInstructions.md` (public read API) and
`MySQL/ConfigurationDatabase/admin/AdminSetupInstructions.md` (this app's login + write API).
Without a backend running at those URLs, the app will load but every screen that lists or saves
data will show a fetch error.
```bash
npm start
```
## Logging in
There is no self-registration � accounts are created directly on the database server via
`admin/create_admin_user.php` in the NCMBattery repo (privileged lab-staff accounts only, not
public sign-up).
## What this app does (and doesn't) do yet
- Builds a battery by picking existing task types, then either reusing an existing parameter set
or creating a new one, and saves the whole battery to the database.
- Does **not** yet have an instructions-set picker � batteries are saved with `instruction_id`
left blank. Does **not** yet support editing or deleting an existing parameter set, task type,
or battery � only creating new ones.