Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Django web application to store and manage vouchers, coupons, loyalty and gift cards digitally. Supports expiry notifications, transaction histories, file uploads and OIDC SSO.

License

NotificationsYou must be signed in to change notification settings

l4rm4nd/VoucherVault

Repository files navigation

Django web application to store and manage vouchers, coupons, loyalty and gift cards digitally





Buy Me A Coffee

⭐ Features

  • User-friendly, mobile-optimized web portal
  • Light and dark theme support
  • Integration of vouchers, coupons, gift cards and loyalty cards
  • Transaction history tracking (gift cards only)
  • Item-specific file uploads (images and PDFs)
  • Item sharing between users
  • Display of redeem codes as QR codes or barcodes (many types supported)
  • Client-side redeem code scanning (1D/2D) during item creation with automatic type detection
  • Expiry notifications via Apprise
  • Multi-user support
  • Multi-language support (English, German, French, Italian)
  • Single Sign-On (SSO) via OIDC
  • Database compatibility with SQLite3 and PostgreSQL
  • REST API endpoint with stats for Home Assisstant (HA) and other dashboards

📷 Screenshots

🐳 Usage

READ THE WIKI -UNRAID SUPPORTED

# create volume dir for persistencemkdir -p ./volume-data/database# adjust volume ownership to www-datasudo chown -R 33:33 volume-data/*# spawn the container stackdocker compose -f docker/docker-compose-sqlite.yml up -d

Once the container is up and running, you can access the web portal athttp://127.0.0.1:8000.

The default username isadmin. The default password is auto-generated. You can obtain the auto-generated password via the Docker container logs:

docker compose -f docker/docker-compose-sqlite.yml logs -f

Warning

The container runs as low-privilegedwww-data user with UID/GID33. So you have to adjust the permissions for the persistent database bind mount volume. A command likesudo chown -R 33:33 <path-to-volume-data-dir> should work. Afterwards, please restart the container.

Tip

This repository follows the Conventional Commits standard. Therefore, you will findpatch,minor andmajor release version tags on DockerHub.No one stops you from using thelatest image tag but I recommend pinning a minor version series tag such as1.12.x.

This is safer for automatic upgrades and you still get recent patches as well as bug fixes.

🌍 Environment Variables

The docker container takes various environment variables:

VariableDescriptionDefaultOptional/Mandatory
DOMAINYour Fully Qualified Domain Name (FQDN) or IP address. Used to defineALLOWED_HOSTS andCSRF_TRUSTED_ORIGINS for the Django framework. May define multiple ones by using a comma as delimiter.localhostMandatory
SECURE_COOKIESSet toTrue if you use a reverse proxy with TLS. Enables thesecure cookie flag andHSTS HTTP response header.FalseOptional
SESSION_EXPIRE_AT_BROWSER_CLOSESet toFalse if you want to keep sessions valid after browser close.TrueOptional
SESSION_COOKIE_AGEDefine the maximum cookie age in minutes.30Optional
EXPIRY_THRESHOLD_DAYSDefines the days prior item expiry when an Apprise expiry notification should be sent out.30Optional
EXPIRY_LAST_NOTIFICATION_DAYSDefines the days prior item expiry when another final Apprise expiry notification should be sent out.7Optional
TZDefines theTIME_ZONE variable in Django's settings.py.Europe/BerlinOptional
SECRET_KEYDefines a fixed secret key for the Django framework. If missing, a secure secret is auto-generated on the server-side each time the container starts.<auto-generated>Optional
PORTDefines a custom port. Used to setCSRF_TRUSTED_ORIGINS in conjunction with theDOMAIN environment variable for the Django framework. Only necessary, if VoucherVault is operated on a different port than8000,80 or443.8000Optional
REDIS_URLDefines the Redis URL to use for Django-Celery-Beat task processing.redis://redis:6379/0Optional
OIDC_ENABLEDSet toTrue to enable OIDC authentication.FalseOptional
OIDC_AUTOLOGINSet toTrue if you want to automatically trigger OIDC flow on login pageFalseOptional
OIDC_CREATE_USERSet toTrue to allow the creation of new users through OIDC.TrueOptional
OIDC_RP_SIGN_ALGOThe signing algorithm used by the OIDC provider (e.g., RS256, HS256).HS256Optional
OIDC_OP_JWKS_ENDPOINTURL of the JWKS endpoint for the OIDC provider. Mandatory ifRS256 signing algo is used.NoneOptional
OIDC_RP_CLIENT_IDClient ID for your OIDC RP.NoneOptional
OIDC_RP_CLIENT_SECRETClient secret for your OIDC RP.NoneOptional
OIDC_OP_AUTHORIZATION_ENDPOINTAuthorization endpoint URL of the OIDC provider.NoneOptional
OIDC_OP_TOKEN_ENDPOINTToken endpoint URL of the OIDC provider.NoneOptional
OIDC_OP_USER_ENDPOINTUser info endpoint URL of the OIDC provider.NoneOptional
DB_ENGINEDatabase engine to use (e.g.,postgres for PostgreSQL orsqlite3 for SQLite3).sqlite3Optional
POSTGRES_HOSTHostname for the PostgreSQL database.dbOptional
POSTGRES_PORTPort number for the PostgreSQL database.5432Optional
POSTGRES_USERPostgreSQL database user.vouchervaultOptional
POSTGRES_PASSWORDPostgreSQL database password.vouchervaultOptional
POSTGRES_DBPostgreSQL database name.vouchervaultOptional

You can find detailed instructions on how to setup OIDC SSO in thewiki.

🔔 Notifications

Notifications are handled byApprise. May read thewiki.

You can define custom Apprise URLs in the user profile settings. The input form takes a single or a comma-separated list of multiple Apprise URLs.

The interval, how often items are checked against a potential expiry, is pre-defined (daily at 9AM) in the Django admin area. Here, we are utilizing Django-Celery-Beat + a Redis instance for periodic task execution.

An item will trigger an expiry notification if the expiry date is within the number of days defined by the environment variableEXPIRY_THRESHOLD_DAYS. By default, this threshold is set to 30 days. Additionally, a final reminder is sent out another time if the item expires within the next 7 days.

🔐 Multi-User Setup

VoucherVault is initialized with a default superuser account namedadmin and a secure auto-generated password.

This administrative account has full privileges to the Django admin panel, located at/admin.

Therefore, all database model entries can be read and modified by this user. Additionally, new user accounts and groups can be freely created too.

Finally, Single-Sign-On (SSO) via OIDC is supported. Check out the environment variables above as well as thewiki.

💾 Backups

All application data is stored within a Docker bind mount volume.

This volume is defined in the example Docker Compose files given. The default location is defined as./volume-data/database.

Therefore, by backing up this bind mount volume, all your application data is saved.

Warning

Read the officialSQLite3 documentation orPostgreSQL documentation regarding backups.

🤖 Repo Statistics

Alt


[8]ページ先頭

©2009-2025 Movatter.jp