OSS Passport is a Django MVP that turns a developer's public GitHub profile into a shareable passport artifact.
config/: Django project settings and root URLs.apps/core/: landing page and static marketing views.apps/github_integration/: GitHub API client and profile aggregation services.apps/passports/: domain models, generation services, forms, public passport pages, and share assets.apps/users/: GitHub-authenticated account flow built on Django'sUsermodel plus a profile extension.
GitHubProfileSource: cached public GitHub identity and raw payload.Passport: generated artifact linked one-to-one with a source profile and optionally owned by a Django user.RepositorySummary: selected repositories shown on a passport.Stamp: inferred contribution badges with transparent evidence.ShareAsset: generated README, embed, and social-preview payloads.UserProfile: GitHub identity fields attached to Django's built-inUser.
GitHubClient: thin HTTP wrapper around the public GitHub REST API.GitHubProfileService: fetches and normalizes profile, repositories, languages, and featured repos.PassportGeneratorService: orchestrates import, persistence, and artifact generation.StampInferenceService: applies explicit inference rules to produce stamps.ShareAssetService: builds README, embed, and social preview outputs.
/: landing page/generate/: username-based generation flow/login/: branded GitHub sign-in handoff/p/<public_slug>/: passport detail page, private by default
- Create a virtual environment.
- Install dependencies with
pip install -r requirements.txt. - Copy
.env.exampleto.envif you want custom settings. - Run
python manage.py migrate. - Run
python manage.py seed_oss_passport_demofor demo data. - Start the server with
python manage.py runserver.
Add these environment variables before using the sign-in flow:
GITHUB_OAUTH_CLIENT_IDGITHUB_OAUTH_SECRET
The GitHub OAuth app should request read:user, user:email, and read:org so authenticated imports can include organization memberships and richer contribution summaries.
- SQLite is the default database for fast local iteration.
- The settings are already structured so PostgreSQL can replace SQLite later with minimal changes.
- Public GitHub import works without OAuth; a
GITHUB_TOKENsimply increases API headroom. - Passports are private by default. Anonymous users can prepare one, then claim and view it by signing in with the matching GitHub account.