Initial commit: habit tracker PWA with Google OAuth, push notifications
FastAPI + SQLAlchemy/Alembic + MariaDB backend with Jinja2/htmx/Alpine server-rendered frontend. Multi-user via Google OAuth, daily habit tracking, monthly/weekly history views, Web Push reminders via APScheduler, and PWA support (manifest, service worker, offline caching). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
"""Web Push용 VAPID 키쌍을 생성합니다. 출력값을 .env의 VAPID_PUBLIC_KEY/VAPID_PRIVATE_KEY에 붙여넣으세요.
|
||||
|
||||
사용법: python scripts/generate_vapid_keys.py
|
||||
"""
|
||||
|
||||
from cryptography.hazmat.primitives import serialization
|
||||
from py_vapid import Vapid02, b64urlencode
|
||||
|
||||
if __name__ == "__main__":
|
||||
vapid = Vapid02()
|
||||
vapid.generate_keys()
|
||||
|
||||
private_raw = vapid.private_key.private_numbers().private_value.to_bytes(32, "big")
|
||||
public_raw = vapid.public_key.public_bytes(
|
||||
serialization.Encoding.X962, serialization.PublicFormat.UncompressedPoint
|
||||
)
|
||||
|
||||
print("VAPID_PUBLIC_KEY=" + b64urlencode(public_raw))
|
||||
print("VAPID_PRIVATE_KEY=" + b64urlencode(private_raw))
|
||||
Reference in New Issue
Block a user