- Replace “Adherence Pack Study” with “Extended-Dose Pack Study” wherever applicable across the platform and related documents. - barriers: Need a separate column at backend for each option - added seperate columns for each option in Survey Export in Adminpanel. - benefit: Need a separate column at backend for each option - added seperate columns for each option in Survey Export in Adminpanel. - Also added one more report in adminapel for exporting applications with consent data. -- Survey questions: - practice_setting: change type to multiple choice - state: create a drop down list for state - Added more validation for following fields : as user can not enter negative and more than 100 values in the field. - asthma_formoterol_pct: Could you please restrict the percentage field to a valid range of 0–100? Becasue although a validation check appears to be applied, the field currently accepts negative values and values greater than 100. - copd_formoterol_pct: same as above - pack_split: Please add an appropriate range check (0-100) to prevent entry of values outside this range. - adherence_estimate: Please add an appropriate range check (0-100) to prevent entry of values outside this range. |
||
|---|---|---|
| backend | ||
| docs | ||
| e2e | ||
| files | ||
| frontend | ||
| help | ||
| scripts | ||
| README.md | ||
| ecosystem.config.cjs | ||
| eslint.config.js | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.js | ||
README.md
Adherence Pack Study
Web app for CREST Private Limited. Physicians sign a consultation agreement, admins review it, and approved physicians receive a survey link.
This repository is an npm workspaces monorepo:
backend— Hapi APIfrontend— React app (Vite)docs— deployment notes
Requirements
- Node.js 20 or newer
- npm 10 or newer
MySQL 8 is required for migrations, admin login, and the test suite. The health check itself does not query the database. Tests use a separate database named ppaimt_crest_test on the same host, port, and user as backend/.env.
Setup
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env
npm install
Run
npm run dev
- API: http://localhost:4000/api/health
- Frontend: http://localhost:5173
The Vite dev server proxies /api to port 4000.
Frontend only
If you are not running the local API, proxy /api to the hosted backend:
npm install
npm run dev:frontend
Then open http://localhost:5173. Requests to /api go to https://pppaimt-crest.xltr.in. Do not submit live agreements unless you intend to change production data.
Database
Create the application database, then:
npm run migrate
ADMIN_EMAIL=admin@example.com ADMIN_PASSWORD='a-long-password' npm run seed:admin
JWT_SECRET must be at least 32 characters. The admin cookie is httpOnly.
Checks
npm test
npm run lint
npm run build
npm run build writes the frontend to frontend/dist.
Deploy
See docs/DEPLOY.md for Ubuntu on EC2, Nginx, PM2, RDS, and S3.