Globalदोस्त uses two data stores in the target MVP:
- Markdown knowledge graph: public/static city knowledge stored in Git.
- Neon Postgres: private/dynamic user and product data.
Private user data must never be committed to Markdown.
data/graph/
chicago/
mentors/
universities/
tasks/
places/
events/
groups/
guides/
boston/
new-york/
Each graph node is a Markdown file with YAML frontmatter and optional [[wikilinks]] in the body.
---
id: task_apply_ssn
type: Task
title: Apply for SSN
city: Chicago
category: document
stage: newcomer
needs:
- employment
- documents
depends_on:
- task_retrieve_i94
links_to:
- guide_ssn
- place_social_security_office_chicago
---
# Apply for SSN
Bring your passport, I-20, I-94, and employment eligibility letter.
Related: [[I-94]], [[Social Security Office]], [[Bank Account]]MentorPeerUniversityCountryCityNeedTaskGuideResourceRestaurantEventPlaceOfWorshipGroceryStoreHousingAreaExplorationSpotTransitTipCommunityGroupPreArrivalChecklist— city-agnostic checklist items underdata/graph/common/pre-arrival/; nocityfield required. Served byGET /v1/pre-arrival/checklistand kept out of plan task ordering.
Relationships are generated from:
depends_onfrontmatter for ordered task dependencies.links_tofrontmatter for explicit typed edges.[[wikilinks]]in the Markdown body for Obsidian-style related edges.- Normalized tag overlap for scoring relationships, such as shared
city,country_tags,university_tags,needs,diet_tags, andreligion_tags.
- Mentor ranking: shared country, shared university, need overlap, languages, stage fit, trust/reputation score.
- Local-fit ranking: profile token overlap against place/event/group tags.
- Stage fit:
arrival_datemaps to newcomer under 90 days, settler from 90 to 364 days, and local from 365 days onward; mentor is never automatic. - Task ordering:
depends_onedges are topologically sorted before plan generation. - Aggregated API scores:
support_coverage_scorebelonging_scorecultural_fit_score
user_profiles:id,auth_user_id,full_name,email,country_of_origin,target_university,target_city,stage,arrival_date,created_at,updated_at
auth_user_id references the user identity synced by Neon Auth.
stage is inferred from arrival_date during profile matching and can move forward manually through PATCH /v1/auth/me/stage; automatic updates do not move a user backward.
plan_progress:user_id,task_id,completed,updated_atuser_documents:user_id,doc_type,status,updated_at
app_sessions:session_id,payload,expires_at,created_at,updated_at
Profile match evidence and subgraphs are cached here for 24 hours by default so plan and graph routes can survive API process restarts.
chat_messages:id,user_id,session_id,role,content,created_at
connections:id,requester_id,recipient_id,status,created_at,updated_at— user↔user; reserved for the future real social graph (both ids referenceuser_profiles).social_requests(003):id,requester_id,kind(connection|intro),target_node_id,target_name,target_role,message,status,email_sent,created_at,updated_at— powers M11. Targets a Markdown graph entity (seed mentor/peer) rather than a Neon user, withUNIQUE (requester_id, kind, target_node_id)for idempotent requests. Intro requests email the mentor via Resend server-side; the mentor address is never returned to the client.
content_items:id,type,title,body,city,tags,author_id,published_atsaved_content:user_id,content_id,content_source,created_at
mentor_profiles:user_id,expertise,availability,bio,response_rate,intro_count,rating,opted_in_atmentor_ratings:id,mentor_id,reviewer_id,rating,comment,created_at
notifications:id,user_id,type,title,body,read,created_at
- Every Markdown node must have a globally unique
id. - Every Markdown node must have
type,title, andcitywhen city-specific. depends_onandlinks_totargets must exist.- Task dependency graph must be acyclic.
- Map-bearing nodes should include
address,lat,lng, ormaps_query. - Time-sensitive nodes must include verification/disclaimer copy.
The existing Neo4j/Cypher seed data remains useful as migration source material. It is not the target MVP source of truth after the Markdown graph engine is implemented.