Skip to main content

Monicka Booking

An accessible, Persian right-to-left booking app for Django clinic websites. It is a server-rendered Django app distributed as a pip package; it does not expose clinic API keys to the visitor's browser and uses no JavaScript framework or external font service.

Install

pip install monicka-booking

Add the app, set its API key in the website process environment, and mount its URLs:

# settings.py
INSTALLED_APPS += ["monicka_booking"]
MONICKA_API_KEY = "<the clinic API key>"  # Prefer an environment variable/secret manager.
# urls.py
from django.urls import include, path

urlpatterns += [path("booking/", include("monicka_booking.urls"))]

Then run python manage.py migrate. A staff user can configure title, colors, text size, displayed currency label, and optional support phone in Django admin under Booking page settings. Set the API origin and home clinic ID there. The API key is intentionally configured outside admin and is never sent to the browser.

API setup

Issue a clinic API key in Monicka and set the key's home clinic website_url to this site's HTTPS origin (including the same origin used by the plugin payment return URL). Set each clinic's plugin_booking_days in API admin. The default booking window is 20 future days. All clinics with the same owner are offered as branches in one catalog. Therapist profile fields (short bio and specialties) are maintained in API admin.

The package talks to the API over HTTPS using X-Clinic-API-Key. Website hosting must allow outbound HTTPS requests to the configured API. The payment callback returns to the plugin completion page, where the package verifies the confirmation code server-to-server before showing appointment status.

To link directly to one therapist at one branch, use the regular booking URL with both public IDs:

/booking/?therapist=133&clinic=5

The plugin checks that this therapist is actually offered at that clinic before entering the calendar step. The page then contains only that therapist and branch, skips the therapist/branch directory, and continues through the normal availability, booking, and payment checks. Invalid or mismatched IDs show an error instead of opening the full directory. These IDs are selectors, not credentials; do not put a patient's name, phone number, or other personal details in a URL. The API still validates every selected time and booking.

Booking flow and accessibility

The initial therapist catalog is server-rendered. JavaScript progressively loads the Jalali calendar's available days and slots from same-origin Django views; dates and slots are always validated again by the API at booking time. The responsive UI uses semantic form labels, keyboard-operable buttons, visible focus rings, large controls, live status announcements, high-contrast light themes, adjustable type size, and reduced-motion support.

Theme choices are intentionally CSS-variable based so future themes can be added without introducing a UI framework. The calendar uses the browser's built-in Persian calendar formatter.

Development

pip install -e '.[test]'
python -m django test --settings tests.settings

You can also run the source checkout as a standalone local Django site without installing monicka-booking. Use an existing Python environment with Django and Requests available:

export PYTHONPATH="$PWD/src"
DJANGO_PYTHON="/path/to/python-with-django"
"$DJANGO_PYTHON" -m django migrate --settings tests.dev_settings
"$DJANGO_PYTHON" -m django createsuperuser --settings tests.dev_settings
"$DJANGO_PYTHON" -m django runserver 127.0.0.1:8000 --settings tests.dev_settings

Open http://localhost:8000/booking/ for the booking page or /admin/ to configure its title and theme. This local setup uses a persistent SQLite database at dev.sqlite3; the test settings continue to use an in-memory database. Without MONICKA_API_KEY and a reachable API the page shows its friendly unavailable state. To try real slots and payment handoff, point it at a staging API and test gateway. A production project supplies its own Django settings, database, and admin configuration.

Metadata

Release files for monicka-booking 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for monicka-booking 0.1.0
File Interpreter ABI Platform Actions
monicka_booking-0.1.0-py3-none-any.whl Python 3 none any Details for monicka_booking-0.1.0-py3-none-any.whl

Release files / monicka_booking-0.1.0-py3-none-any.whl

Download URL monicka_booking-0.1.0-py3-none-any.whl
Size 89.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1480d0eb68ed3f0210358f8ab94b9696fe9b96a3d06cf5a1625383ab4f10247
BLAKE2b-256 checksum
How to use checksums
be00f5c6093522986262be84982b6f56b56dd5e3fb7d345426bfa710895cc136
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for monicka-booking 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page