MobileID is a monorepo for a Django API and a Vue/Vite single-page app used for mobile identification, PDF417 barcode generation, profile management, and device-aware authentication flows.
src/: Django backend, settings, REST endpoints, DynamoDB helpers, and backend tests.pages/: Vue 3 SPA, feature-organized frontend code, colocated unit tests, Playwright e2e tests, andvercel.jsonSPA rewrites.docker-compose.yml: local backend stack with Django, Postgres, and DynamoDB Local..github/workflows/ci.yml: primary CI workflow for lint, tests, builds, and security checks.
- Python 3.12+
- Node.js 20+
- Yarn 1.x
- Docker Desktop, if you want the full local backend stack
cd src
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
cp .env.example .env
python manage.py migrateIf you are running against DynamoDB Local outside Docker, set DYNAMODB_ENDPOINT_URL in src/.env and run:
python manage.py create_dynamodb_tablesTo start the backend directly:
python manage.py runserverThe API is served at http://localhost:8000.
cd pages
yarn install
yarn devThe SPA runs at http://localhost:5173.
For production builds, VITE_API_BASE_URL must be set. The frontend intentionally throws if a production build is missing that value.
The included Compose stack starts Django, Postgres, and DynamoDB Local:
docker compose up --buildUseful follow-up commands:
docker compose logs -f backend
docker compose exec backend python manage.py createsuperuser
docker compose downBackend:
cd src
python manage.py makemigrations --check --dry-run
python manage.py test -v 2
black --check .
flake8 .
ruff check .
bandit -r authn core index -x '*/tests/*,*/migrations/*' -llFrontend:
cd pages
yarn lint
yarn test:unit
yarn test:e2e:cici.yml appears in GitHub Actions as CI. It runs:
- backend lint (Black, Flake8, Ruff) and frontend lint (Prettier, ESLint) in parallel
- migration file guard on pushes and pull requests
- Django migration checks and Django tests with coverage (
--fail-under=70) - frontend unit tests and Playwright E2E tests
- backend Docker build and frontend Vite build
- dependency, static-analysis, and image security scans: Safety, Bandit, Yarn audit, Trivy
- a
Required Checkssummary gate that fails if any required job — build, test, or security — does not succeed
- Backend environment examples live in
src/.env.example. - The frontend base URL logic lives in
pages/src/app/config/config.js. - SPA rewrites for Vercel are defined in
pages/vercel.json. - Backend health endpoints are
GET /health/, readinessGET /readyz/, and livenessGET /livez/. - The backend OpenAPI document is exposed at
GET /openapi.json. - Production deployment and rollback notes live in
docs/RUNBOOK.md.
This project is proprietary software. All rights reserved.