This repository demonstrates a minimal reactive programming system using Skip and TypeScript to simulate a basic social network use case. The goal is to keep things simple, inspectable, and educational.
“The simpler, the merrier.”
We build a tiny reactive service to track "active friends" in social groups. It:
- Defines users and groups as reactive data.
- Tracks active users and friend connections.
- Uses Skip to auto-update data dependencies.
- Exposes a small REST API using Express.
We show how Alice’s list of active friends updates live as data changes, no manual refresh needed.
src/
├── activefriends.mts # Mappers & resources to track active friends
├── data.mts # Initial user and group data
├── index.ts # Express server exposing API
├── skipservice.mts # Skip service and reactive graph
└── types.mts # Type definitions and Skip interfacesgit clone https://github.com/SkipLabs/reactive_social_network_service_poc
cd reactive_social_network_servicenpm installnpm run buildnpm run startYou should see:
Skip control service listening on port 8081
Skip streaming service listening on port 8080
Groups REST wrapper listening at port 8082In a new terminal:
curl -LN http://localhost:8082/active_friends/1In a third terminal:
curl http://localhost:8081/v1/inputs/users \
-X PATCH \
--json '[[1, [
{
"name": "Alice",
"active": true,
"friends": [0, 2, 3]
}
]]]'You’ll see reactive updates in the second terminal!
⚙️ NPM Scripts
npm run build: Compile TypeScript files into dist/
npm run start: Launch the Express and Skip services
npm run clean: Remove dist/ and node_modules
🧩 Tech Stack
- TypeScript
- Node.js
- Skip – for reactive data flows
- Express – lightweight REST API server