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:
@@ -0,0 +1,36 @@
|
||||
# KeepItTalking frontend (Phase 1)
|
||||
|
||||
React + Vite PWA. Login, room list, and chat views wired to the backend's
|
||||
REST API and `/ws/chat` WebSocket endpoint. See [`../README.md`](../README.md)
|
||||
and [`../backend/README.md`](../backend/README.md) for full local setup.
|
||||
|
||||
## Dev
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
The dev server proxies `/api` and `/ws` to `http://localhost:8000` (see
|
||||
`vite.config.ts`), so the backend must be running for anything beyond the
|
||||
login page to work.
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
Generates the PWA manifest and service worker via `vite-plugin-pwa` into `dist/`.
|
||||
|
||||
## Layout
|
||||
|
||||
```
|
||||
src/
|
||||
main.tsx, App.tsx routes: /login, /rooms, /rooms/:roomId
|
||||
api/ fetch wrappers (client, auth, rooms)
|
||||
ws/useChatSocket.ts WebSocket hook (join/send/receive)
|
||||
context/AuthContext.tsx current-user state, hydrated via GET /api/auth/me
|
||||
components/ ProtectedRoute, RoomListItem, MessageList, MessageInput
|
||||
pages/ LoginPage, RoomListPage, ChatRoomPage
|
||||
```
|
||||
Reference in New Issue
Block a user