Skip to content

Repository files navigation

Маячок · Mayachok

Libre postpartum depression screening. Anonymous by default. Works everywhere.

Mayachok administers the Edinburgh Postnatal Depression Scale (EPDS) — a validated 10-question clinical instrument used worldwide — and returns a structured score with clear guidance.

It is not an AI. It does not generate advice. It runs a questionnaire and returns a number. That number can save lives.

License: AGPL-3.0


Why

Postpartum depression affects roughly 1 in 7 mothers. It often goes undetected because nobody asks the right questions. Mayachok gives mothers a private, low-friction way to screen themselves.

Designed to work anywhere — on any device, in any language, with or without internet.

Pink Sharky


Stack

Clojure · Kit · Integrant · Reitit · HugSQL · SQLite · Selmer · Bulma CSS


Getting Started

Requires Java 11+ and the Clojure CLI.

git clone https://github.com/doctorkotik187/mayachok
cd mayachok
clj -M:dev

Then in the REPL: (go) / (halt) / (reset)


Features

  • Full EPDS with correct scoring (reverse-scored Q1, Q2, Q4)
  • Q10 safety alert — always surfaces for self-harm ideation
  • Anonymous optional survey (age range, time since birth, first child)
  • Optional location input for aggregate regional statistics
  • Aggregate statistics API (/api/stats)
  • Heatmap page showing regional data
  • Crisis resources page (/help)
  • PDF export of results
  • PWA — installable, works offline
  • Dark mode support
  • 4 languages: Russian, English, German, Ukrainian

API

  • POST /api/screenings — submit a screening
  • GET /api/screenings/:id — fetch a screening
  • GET /api/stats — aggregate statistics
  • GET /api/health — health check with version
  • Swagger docs at /api/api-docs/index.html

Self-Hosting

Docker (recommended)

docker-compose up -d

The app will be available at http://localhost:3000. Data is persisted in a Docker volume.

Manual

  1. Build: clojure -T:build uber
  2. Run: java -jar target/mayachok-standalone.jar
  3. SQLite DB is created automatically

Environment Variables

Variable Default Description
PORT 3000 HTTP port
HTTP_HOST 0.0.0.0 Bind address
JDBC_URL (none) Database path, e.g. jdbc:sqlite:/app/data/mayachok.db
COOKIE_SECRET (auto-generated) Session cookie secret — set explicitly to persist sessions across restarts
MAYACHOK_RETENTION_DAYS 365 Auto-delete screenings older than N days (0 to disable)
REPL_PORT 7000 Socket REPL port (optional)

Contributing

Clinical contributions welcome — especially translation review, EPDS validation citation checking, and crisis resource links for your region.

All scoring logic changes require a corresponding test. EPDS question wording changes should cite the published validated translation.

See AGENTS.md for architecture details.


Credits

  • Pink Sharky — mascot and friend
  • Bulma CSS — for making the internet prettier
  • EPDS — Cox, Holden & Sagovsky (1987)

License

AGPL-3.0


"The first thousand days of a child's life begin with a healthy mother."

About

Open source postpartum depression screening tool for clinicians. Administers the validated Edinburgh Postnatal Depression Scale (EPDS) in multiple languages. Works offline. No PII stored. With love for Saint Petersburg.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages