How harrypotter112122/campus-connect works
CampusConnect is a campus messaging SPA backed by authenticated REST endpoints, Socket.IO, and SQLite. A user restores or creates an account, enters chat, discovers people or manages conversations, and exchanges persistent messages and attachments; optional summaries call an AI provider. The graph preserves the documented chat capabilities, but some frontend pages and backend routes were not excerpted, so their internal calls are not inferred. Dashed links mark documented client-server or external-service relationships whose transport wiring is not shown in the excerpts.
Main entry points: index.js HTTP and socket server · db.js SQLite data store · App.jsx Application routing · conversations.js Conversation management and history
Components 18
Web client
- Application routing
client/src/App.jsx - Sign in and registration
client/src/pages/AuthPage.jsx - Chat workspace
client/src/pages/ChatPage.jsx - Conversation view
client/src/components/ChatWindow.jsx - REST client
client/src/lib/api.js - Socket client
client/src/lib/socket.js
Identity
- Session state
client/src/hooks/useAuth.jsx - HTTP and socket server
server/src/index.js - Authentication routes
server/src/routes/auth.js
Messaging
- Student discovery and profiles
server/src/routes/users.js - Conversation management and history
server/src/routes/conversations.js - Realtime chat and presence
server/src/lib/socket.js - Media and file sharing
server/src/routes/uploads.js
Persistence
- SQLite data store
server/src/lib/db.js - Uploaded files
server/uploads
Integrations
- Conversation action summaries
server/src/routes/summary.js - AI provider
Other components
- Student
Connections 27
- Student → Application routing: uses
README.md - Application routing → Session state: provides session
client/src/App.jsx - Application routing → Sign in and registration: routes unauthenticated
client/src/App.jsx - Application routing → Chat workspace: routes authenticated
client/src/App.jsx - Session state → REST client: restores and updates
client/src/hooks/useAuth.jsx - Session state → Socket client: connects after login
client/src/hooks/useAuth.jsx - Conversation view → REST client: requests data
client/src/components/ChatWindow.jsx - Conversation view → Socket client: uses realtime events
client/src/components/ChatWindow.jsx - REST client → HTTP and socket server: calls REST API
README.md - Socket client → HTTP and socket server: opens socket
README.md - HTTP and socket server → Authentication routes: mounts routes
server/src/index.js - HTTP and socket server → Student discovery and profiles: mounts routes
server/src/index.js - HTTP and socket server → Conversation management and history: mounts routes
server/src/index.js - HTTP and socket server → Conversation action summaries: mounts routes
server/src/index.js - HTTP and socket server → Media and file sharing: mounts routes
server/src/index.js - HTTP and socket server → Realtime chat and presence: initializes handlers
server/src/index.js - HTTP and socket server → SQLite data store: initializes database
server/src/index.js - Authentication routes → SQLite data store: reads and writes
server/src/routes/auth.js - Student discovery and profiles → SQLite data store: queries profiles
server/src/routes/users.js - Conversation management and history → SQLite data store: reads and writes
server/src/routes/conversations.js - Conversation management and history → Realtime chat and presence: checks presence
server/src/routes/conversations.js - Realtime chat and presence → SQLite data store: persists messages
server/src/lib/socket.js - Media and file sharing → SQLite data store: records attachments
server/src/routes/uploads.js - Media and file sharing → Uploaded files: stores and serves files
server/src/routes/uploads.js - Realtime chat and presence → Conversation management and history: broadcasts room messages
README.md - Conversation action summaries → SQLite data store: loads conversation
server/src/routes/summary.js - Conversation action summaries → AI provider: requests analysis
server/src/routes/summary.js