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:
2026-07-16 18:06:17 +09:00
co-authored by Claude Sonnet 5
commit cee589bb3e
80 changed files with 4695 additions and 0 deletions
@@ -0,0 +1,34 @@
"""add user table
Revision ID: 0003_add_user_table
Revises: 0002_add_condition_text
Create Date: 2026-07-15
"""
from typing import Sequence, Union
import sqlalchemy as sa
from alembic import op
revision: str = "0003_add_user_table"
down_revision: Union[str, None] = "0002_add_condition_text"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.create_table(
"user",
sa.Column("id", sa.Integer(), primary_key=True, autoincrement=True),
sa.Column("google_sub", sa.String(length=255), nullable=False, unique=True),
sa.Column("email", sa.String(length=255), nullable=False, unique=True),
sa.Column("name", sa.String(length=255), nullable=True),
sa.Column("picture_url", sa.String(length=512), nullable=True),
sa.Column("created_at", sa.DateTime(), nullable=False, server_default=sa.func.now()),
mysql_engine="InnoDB",
mysql_charset="utf8mb4",
)
def downgrade() -> None:
op.drop_table("user")