Connections
Requests, accepts, lists, and removal.
One row per pair, unique on the ordered pair, with a pending, accepted, or rejected state. Sending notifies the recipient; accepting notifies the requester; rejecting only flips the state. Lists return the other user, populated for display. Accepted connections are the main gate for chat.
What it owns
- Sending requests with self and duplicate guards
- Accepting and rejecting incoming requests
- Incoming, sent, and accepted lists
- Removing connections
Files
File list and purposes from the folder README.
| File | Purpose |
|---|---|
frontend/src/pages/RequestsPage.jsx | Incoming and sent request screens. |
frontend/src/pages/ConnectionsPage.jsx | Accepted connections screen. |
frontend/src/services/connectionService.js | Request lifecycle calls. |
backend/routes/connectionRoutes.js | Request, accept, reject, list, remove routes. |
backend/controllers/connectionController.js | Pair guards and list shaping. |
backend/models/Connection.js | Pair rows with a unique index. |
Laying out Connections slice…
BrowserAPIRealtimeCacheDatabaseShareddurableephemeral
Talks to
Sources: frontend/src/services/connectionService.js, backend/routes/connectionRoutes.js, backend/controllers/connectionController.js, backend/models/Connection.js (documented at commit cdef8af)