Skip to content

iceking-1912/status_socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Socket.IO + Vite demo

This repository contains two small apps (server + client) that demonstrate a realtime appointment-status flow using Socket.IO. It is intentionally minimal so you can drop the same patterns into larger frontend and backend projects.

Quick start (from workspace root):

  1. Install server deps

cd server npm install

  1. Install client deps

cd ../client npm install

  1. Start server

cd ../server npm start

  1. Start client

cd ../client npm run dev

Open http://localhost:5173 in your browser to view the demo.

What this example demonstrates

  • A canonical Socket.IO server that validates and persists appointment status changes.
  • A Vite + React client that connects, joins rooms (clinic/appointment/role) and receives authoritative updates.
  • An event contract (small, stable API) that makes it simple to integrate into larger apps.

Integration guidance (quick)

  • Backend: implement appointment:updateStatus server handler that validates, persists, and broadcasts appointment:status to rooms like clinic:<id> and appointment:<id>.
  • Frontend: add a small socket wrapper + React Context, join relevant rooms, and update UI from appointment:status events. Use socket acks for write confirmations.

For full integration details, event contracts, code snippets and scaling/security notes see docs/EXPLAIN.md or the online copy: WEBSOCKET docs on Notion

If you want, I can add the concrete client/src/lib/socket.js and client/src/contexts/SocketContext.jsx files to this repo next.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors