Private
Public Access
Phase 1: auth, room CRUD, WebSocket chat, PWA frontend
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>
This commit is contained in:
1 parent
8ac35062dc
commit
99aa029c0d
77 files changed
+9042
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { apiFetch } from './client'
|
||||
import type { Message, Room, RoomListItem } from '../types'
|
||||
|
||||
export function listRooms(): Promise<RoomListItem[]> {
|
||||
return apiFetch<RoomListItem[]>('/api/rooms')
|
||||
}
|
||||
|
||||
export function createRoom(name: string, description?: string): Promise<Room> {
|
||||
return apiFetch<Room>('/api/rooms', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ name, description: description || null }),
|
||||
})
|
||||
}
|
||||
|
||||
export function joinRoom(roomId: string): Promise<Room> {
|
||||
return apiFetch<Room>(`/api/rooms/${roomId}/join`, { method: 'POST' })
|
||||
}
|
||||
|
||||
export function getRoomMessages(roomId: string): Promise<Message[]> {
|
||||
return apiFetch<Message[]>(`/api/rooms/${roomId}/messages`)
|
||||
}
|
||||
Reference in new issue
Block a user