iPRO Community Edition — backend service of the iPRO Patient Reported Outcome Measures (PROM) platform. Built with Express, Sequelize, and PostgreSQL. Works together with the Avicenna client frontend.
iPRO CE is developed by the Institute of Mathematics and Informatics, Bulgarian Academy of Sciences (IMI-BAS), under Bulgarian Recovery and Resilience Plan grant BG-RRP-2.011-0049 (ПВУ).
- Node.js >= 18
- npm >= 9
- PostgreSQL 14 or higher
- Redis 6 or higher (for session storage)
- The
hstoreextension must be installed in the target database before running migrations (required by theconfigurationstable):psql -d ipro_ce -c "CREATE EXTENSION IF NOT EXISTS hstore"
# 1. Clone
git clone https://github.com/imi-bas/ipro-hippocrates-ce.git
cd ipro-hippocrates-ce
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# Edit .env — at minimum set DATABASE_URL and DOCTOR_TOKEN_SECRET:
# DATABASE_URL=postgres://postgres:@localhost:5432/ipro_ce
# DOCTOR_TOKEN_SECRET=$(node -e "console.log(require('crypto').randomBytes(32).toString('hex'))")
# 4. Create the database and enable required extension
createdb ipro_ce
psql ipro_ce -c "CREATE EXTENSION IF NOT EXISTS hstore"
# 5. Run migrations
DATABASE_URL=postgres://postgres:@localhost:5432/ipro_ce npx sequelize-cli db:migrate
# 6. (Optional) Load demo data
DATABASE_URL=postgres://postgres:@localhost:5432/ipro_ce npx sequelize-cli db:seed:all
# 7. Start
npm start
# Server listens on PORT from .env (default 8080)Note:
DATABASE_URLin the shell overrides the value in.envwhen running CLI commands. If you have setDATABASE_URLin.env, you can omit it from the command line once yousource .envor start the server (which loads.envautomatically via dotenv).
iPRO uses a 9-question-type questionnaire engine (single/multi choice, cascading, scale, matrix, autocomplete, etc.)
with type-aware scoring (PROM/PREM). The backend exposes a REST API at /eskis/crud/* consumed by the Avicenna
frontend. See docs/ for architecture deep-dives.
Outbound transactional email is handled via a pluggable EmailProvider interface. iPRO CE ships with a console stub by default (no emails sent). To enable real delivery, implement your own provider (SMTP, AWS SES, Mailgun, etc.) — see docs/email-provider.md for examples.
Unit tests (no DB required):
npm test -- --testPathIgnorePatterns=integrationIntegration tests (require a running PostgreSQL instance):
# Create a dedicated test database
createdb ipro_ce_test
psql ipro_ce_test -c "CREATE EXTENSION IF NOT EXISTS hstore"
# Run integration tests against it
TEST_DATABASE_URL=postgres://postgres@localhost:5432/ipro_ce_test \
npm test -- --testPathPattern=integration
# Or with individual env vars
TEST_DB_USER=myuser TEST_DB_PASS=secret TEST_DB_NAME=ipro_ce_test \
npm test -- --testPathPattern=integrationThe TEST_DATABASE_URL env var takes precedence. If absent, DATABASE_URL is tried next,
then individual TEST_DB_* vars, and finally postgres://postgres@localhost:5432/ipro_ce_test.
All tests (requires DB as above):
TEST_DATABASE_URL=postgres://postgres@localhost:5432/ipro_ce_test npm testSee CONTRIBUTING.md (forthcoming). Pull requests welcome — please open an issue first for major changes.
MIT. See LICENSE.
This work was supported by the Bulgarian Recovery and Resilience Plan (Национален план за възстановяване и устойчивост), grant BG-RRP-2.011-0049.
- Backend (this repo): https://github.com/imi-bas/ipro-hippocrates-ce
- Frontend: https://github.com/imi-bas/ipro-avicenna-ce