OpenShare is a platform that rewards open‑source contributors. It provides point issuance, tagging, redemption, user profiles and search, messaging, and optional analytics so communities can compensate contributors transparently.
- Multi‑provider OAuth: GitHub, GitLab, Google, Bitbucket, and more via
social-auth-app-django. - Profiles & search: searchable public pages by username, company, location, and minimum points with caching.
- Points system: tagged point pools (withdrawable/rechargeable), issuance/consumption, expiry, withdrawals, and transaction history (
pointsapp). - Shop & redemption: items can restrict allowed tags, support stock, shipping addresses, and status tracking (
shopapp). - Messaging & feedback: site messages/flash notices to guide users.
- Optional infrastructure: Redis caching and ClickHouse analytics; Whitenoise serves static files.
Requirements: Python 3.12+, uv, just; optional Redis and ClickHouse. SQLite is the default DB; PostgreSQL recommended for production.
# 1) Tooling
pip install uv
brew install just # or install via your distro
# 2) Install deps
uv sync
# 3) Environment variables
cp .env.example .env
# fill SECRET_KEY, social auth keys, Mailgun, S3/Redis/ClickHouse, etc.
# 4) Migrate DB & create admin
uv run manage.py migrate
uv run manage.py createsuperuser
# 5) Run (dev)
just run # runserver_plus at http://127.0.0.1:8000/
just worker # run background DB worker in another terminalHandy commands:
just fmt: Ruff lint + format + djlint (run before committing).just test: parallel Django tests with coverage.uv run manage.py grant_points <username> <amount> --tags=tag1,tag2: issue points.uv run manage.py shell_plusorjust sh: interactive shell.
- Copy
.env.example→.env; in production setDEBUG=False,ALLOWED_HOSTS,CSRF_TRUSTED_ORIGINS. - Email: set
MAILGUN_API_KEYandMAILGUN_SENDER_DOMAIN; when empty, emails print to console for local dev. - Object storage: configure all
AWS_*values for S3/compatible storage; otherwise local filesystem is used. - Social auth: create provider apps and supply key/secret; scopes are comma-separated.
- Caching/analytics:
REDIS_URLenables cache middleware; ClickHouse settings enablechdbanalytics features.
config/: Django settings, URLs, ASGI/WSGI entrypoints.accounts/: custom user, profiles, shipping addresses, social connections.homepage/: landing page and user search.points/: point pools, transactions, services, and management commands.shop/: shop items, redemptions, shipping flow.messages/: site messages/notifications.chdb/: ClickHouse integrations (optional).templates/,static/: frontend templates and static assets.justfile: common dev/CI commands.
- Ensure
just fmtandjust testpass before deploying; container flows usejust docker-build/just docker-testwith.env.example. - Production requires a persistent DB and object storage; run
collectstaticand serve via Whitenoise or a CDN. - Behind proxies/load balancers, keep forwarded headers (
USE_X_FORWARDED_HOST/PORT) — already enabled in settings.
Issues and PRs are welcome. See contribute.md for contribution flow and development.md for local environment details.