How whitlocktech/serverlinkr works
ServerLinkr is an unfinished self-hosted-links dashboard. Users browse and search saved links, while the dashboard’s add-link form submits link details through shared client API state to the versioned server API and Mongo-backed models. The server also exposes registration, login, and logout endpoints, with session and JWT authentication used to protect link mutations. The graph preserves the documented dashboard and the sampled API, auth, and persistence layers; unsampled implementation details are omitted.
Main entry points: api.context.js API state · App.js Client app · links.routes.js Link routes · linksContainer.component.jsx Links view
Components 23
Dashboard client
- Client app
client/src/App.js - Home view
client/src/routes/home/home.component.jsx - Navigation
client/src/components/navigation/navigation.component.jsx - Add-link form
client/src/components/addLinkForm/addLinkForm.component.jsx - Edit-link form
client/src/components/editLinkForm/editLinkForm.component.jsx - API state
client/src/contexts/api.context.js - Links view
client/src/routes/linksContainer/linksContainer.component.jsx - Link card
client/src/components/links/linksCard.component.jsx
Link API
- API application
server/src/app.js - API router
server/src/router/api.router.js - Version router
server/src/router/v1/v1.router.js - Link routes
server/src/router/v1/links/links.routes.js - Link controller
server/src/router/v1/links/links.controller.js - Server startup
server/src/server.js
Authentication
- Auth routes
server/src/router/v1/auth/auth.routes.js - Auth controller
server/src/router/v1/auth/auth.controller.js - Auth utilities
server/src/utils/auth.js
Persistence
- Link model
server/src/model/links/links.model.js - Link persistence
server/src/model/links/links.mongo.js - User model
server/src/model/users/users.model.js - User persistence
server/src/model/users/users.mongo.js - MongoDB
Other components
- Dashboard user
Connections 28
- Dashboard user → Client app: uses
README.md - Client app → Home view: renders
client/src/App.js - Home view → Navigation: renders
client/src/routes/home/home.component.jsx - Navigation → Add-link form: opens
client/src/components/navigation/navigation.component.jsx - Add-link form → API state: submits
client/src/components/addLinkForm/addLinkForm.component.jsx - Client app → API state: provides
client/src/App.js - Client app → Links view: routes to
client/src/App.js - Links view → API state: reads
client/src/routes/linksContainer/linksContainer.component.jsx - Links view → Link card: renders
client/src/routes/linksContainer/linksContainer.component.jsx - Edit-link form → API state: updates via
client/src/components/editLinkForm/editLinkForm.component.jsx - API state → Link routes: requests links
client/src/contexts/api.context.js - Server startup → API application: starts
server/src/server.js - API application → API router: mounts
server/src/app.js - API router → Version router: dispatches
server/src/router/api.router.js - Version router → Link routes: mounts
server/src/router/v1/v1.router.js - Version router → Auth routes: mounts
server/src/router/v1/v1.router.js - Link routes → Link controller: routes to
server/src/router/v1/links/links.routes.js - Link controller → Link model: calls
server/src/router/v1/links/links.controller.js - Link routes → Auth utilities: checks access
server/src/router/v1/links/links.routes.js - Auth routes → Auth controller: routes to
server/src/router/v1/auth/auth.routes.js - Auth controller → Auth utilities: authenticates
server/src/router/v1/auth/auth.controller.js - Auth controller → User model: creates users
server/src/router/v1/auth/auth.controller.js - Auth utilities → User model: looks up users
server/src/utils/auth.js - Link model → Link persistence: delegates
server/src/model/links/links.model.js - User model → User persistence: delegates
server/src/model/users/users.model.js - Link persistence → MongoDB: persists links
- User persistence → MongoDB: persists users
- Server startup → MongoDB: connects
server/src/server.js