How nazmulhassan2024-png/cedarline-brain works
Cedarline Company Brain is a small, access-controlled knowledge assistant. A user asks a question in the browser; the ask endpoint loads fresh group membership, then calls the engine, which filters documents before retrieval and ranks matches by relevance and trust status before returning cited results. Administrators manage memberships through a separate groups endpoint, with changes persisted in Netlify Blobs. The README also describes sign-in and a reviewer view, but the supplied tree and excerpts do not show their runtime implementation, so those are not mapped as separate components.
Main entry points: ask.mjs Ask endpoint · data.mjs Users and document records · index.html Chat and admin UI · groups.mjs Groups endpoint
Components 9
User interaction
- Chat and admin UI
public/index.html - Ask endpoint
netlify/functions/ask.mjs - Groups endpoint
netlify/functions/groups.mjs
Knowledge answering
- Filter and answer engine
netlify/lib/engine.mjs - Users and document records
netlify/lib/data.mjs - Source documents
data/documents
Access management
- Group membership state
netlify/lib/state.mjs - Netlify Blobs
Other components
- Company user
Connections 11
- Company user → Chat and admin UI: asks or manages
README.md - Chat and admin UI → Ask endpoint: sends question
README.md - Ask endpoint → Group membership state: loads fresh groups
netlify/functions/ask.mjs - Ask endpoint → Filter and answer engine: calls answer
netlify/functions/ask.mjs - Ask endpoint → Users and document records: looks up user
netlify/functions/ask.mjs - Filter and answer engine → Users and document records: filters and searches
netlify/lib/engine.mjs - Source documents → Users and document records: represented in records
README.md - Chat and admin UI → Groups endpoint: requests group changes
README.md - Groups endpoint → Users and document records: looks up users
netlify/functions/groups.mjs - Groups endpoint → Group membership state: reads and saves groups
netlify/functions/groups.mjs - Group membership state → Netlify Blobs: reads and writes
netlify/lib/state.mjs