Private
Public Access
Invite-only FastAPI + SQLAlchemy(async) + Postgres backend (session-cookie auth via CLI-provisioned accounts, open-room CRUD, single-instance /ws/chat) and a React + Vite PWA frontend (login, room list, chat view). Backend tests pass against a local Postgres DB. See README.md and backend/README.md for setup, and ARCHITECTURE.md for the full phased design. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
25 lines
507 B
Python
25 lines
507 B
Python
import uuid
|
|
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class RoomCreate(BaseModel):
|
|
name: str = Field(min_length=1, max_length=100)
|
|
description: str | None = Field(default=None, max_length=2000)
|
|
|
|
|
|
class RoomRead(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
id: uuid.UUID
|
|
name: str
|
|
description: str | None
|
|
is_private: bool
|
|
owner_id: uuid.UUID
|
|
created_at: datetime
|
|
|
|
|
|
class RoomListItem(RoomRead):
|
|
is_member: bool
|