Migrate frontend to TypeScript and extend user profile

Converted frontend codebase from JavaScript to TypeScript, including pages, components, and context. Added new layout and UI kit components. Updated backend user model and schemas to support profile fields (firstname, lastname, age, gender, height, weight, unit_preference) and added endpoints for reading/updating current user. Introduced food log listing endpoint and migration script for user table. Updated dependencies and build configs for TypeScript and Tailwind v4.
This commit is contained in:
Carlos Escalante
2026-01-18 19:01:00 -06:00
parent 184c8330a7
commit bd91eb4171
58 changed files with 4607 additions and 1414 deletions

View File

@@ -14,9 +14,23 @@ class UserCreate(UserBase):
class UserRead(UserBase):
id: int
firstname: Optional[str] = None
lastname: Optional[str] = None
age: Optional[int] = None
gender: Optional[str] = None
height: Optional[float] = None
weight: Optional[float] = None
unit_preference: str = "metric"
class UserUpdate(SQLModel):
email: Optional[str] = None
username: Optional[str] = None
password: Optional[str] = None
firstname: Optional[str] = None
lastname: Optional[str] = None
age: Optional[int] = None
gender: Optional[str] = None
height: Optional[float] = None
weight: Optional[float] = None
unit_preference: Optional[str] = None