Skip to content

Commit 36489a8

Browse files
authored
docs(protocol): add material status schema and endpoint (#11)
* fix(ci): exclude checker file in grep * docs: update README * docs: add openapi.json * docs(protocol): add material status schema and bump deps
1 parent 46707a8 commit 36489a8

File tree

9 files changed

+462
-144
lines changed

9 files changed

+462
-144
lines changed

README.md

Lines changed: 20 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -5,154 +5,32 @@
55
[![Discussions](https://img.shields.io/github/discussions/local-loop-io/loop-protocol)](https://github.com/local-loop-io/loop-protocol/discussions)
66
[![Specification](https://img.shields.io/badge/spec-v0.1-orange.svg)](SPECIFICATION.md)
77

8-
> Local Optimization with Overflow Protocol - Infrastructure for planetary-scale circular economy
8+
Local Optimization with Overflow Protocol. A federated circular economy concept with shared schemas and interoperability notes.
99

10-
## 🌍 What is LOOP Protocol?
10+
> Early-stage, low-TRL concept. No public pilots or deployments. Lab demo only.
1111
12-
LOOP Protocol proposes a federated circular economy network that preserves local sovereignty. Think of it as "email for materials" — a conceptual framework where cities could run interoperable nodes and exchange materials via shared standards.
13-
14-
### Core Components
15-
16-
- **🧬 MaterialDNA (proposed)**: Universal identification for any material or batch
17-
- **💰 LoopCoin (proposed)**: Expiring local currency that incentivizes circulation
18-
- **📡 LoopSignal (proposed)**: Democratic preferences that shape material flows
19-
- **💸 LoopCost (proposed)**: Transparent calculation including all penalties
20-
21-
## 🚀 Quick Start
22-
23-
### For Cities
24-
```bash
25-
# Prototype-only example (no official images yet)
26-
# docker run -p 8080:8080 localloop/node:latest
27-
```
28-
29-
### For Developers
30-
31-
```javascript
32-
// Proposed SDK interface (no public SDK published yet)
33-
// npm install @local-loop/sdk
34-
35-
// Example client usage (illustrative only)
36-
const loop = new LoopClient('https://example.loop');
37-
38-
// Register material
39-
const material = await loop.registerMaterial({
40-
category: 'plastic-pet',
41-
quantity: { value: 1000, unit: 'kg' },
42-
quality: 0.95
43-
});
44-
```
45-
46-
#### Schema Validation
12+
## What is here
13+
- `SPECIFICATION.md`: core protocol spec.
14+
- `schemas/`: JSON Schema definitions.
15+
- `examples/`: sample payloads for interop.
16+
- `contexts/`: JSON-LD contexts.
17+
- `rfcs/`: RFCs and design notes.
4718

19+
## Quickstart
4820
```bash
49-
npm install
21+
npm ci
5022
npm test
5123
```
5224

53-
## 📋 Specification
54-
55-
Read the full LOOP Protocol Specification v0.1.1 (lab demo baseline)
56-
57-
### Design Goals
58-
59-
- **Federated Architecture**: No central authority required
60-
- **Economic Incentives**: Communities keep value from circular behaviors
61-
- **Democratic Control**: Citizens vote on trade preferences
62-
- **Transparent Routing**: Materials find optimal destinations
63-
- **Open Standards**: JSON-LD based, REST APIs
64-
65-
## 🏗️ Implementations
66-
67-
Implementations are exploratory and may not be publicly available yet. If you
68-
are building one, open an issue or RFC so we can link it here.
69-
70-
## 🧪 Test Network
71-
72-
No public test network is available yet. This is an early, low-TRL concept and the
73-
reference materials here are for specification and lab-only research demonstrations.
74-
75-
## 🤝 Contributing
76-
77-
We welcome contributions! See CONTRIBUTING.md for guidelines.
78-
79-
### How to Contribute
80-
81-
1. Read the specification
82-
2. Check [open issues](https://github.com/local-loop-io/loop-protocol/issues)
83-
3. Start a discussion in GitHub Discussions
84-
4. Submit RFCs for protocol changes
25+
## Usage notes
26+
- Specs and schemas are draft and subject to change.
27+
- No certified implementations exist at this time.
28+
- Use `examples/` to validate tooling and docs.
8529

86-
## 🧭 Governance (Lab Stage)
30+
## Links
31+
- Docs hub: https://local-loop-io.github.io
32+
- Backend API: https://loop-api.urbnia.com
8733

88-
- RFC workflow: `docs/governance/rfc-process.md`
89-
- RFC index: `rfcs/README.md`
90-
91-
## 📚 Resources
92-
93-
Public resources are still being assembled. For now, use GitHub Discussions and
94-
the repository documentation.
95-
96-
- Specification: `SPECIFICATION.md`
97-
- API reference: `openapi.json`
98-
- Security guide: `docs/security-guide.md`
99-
- Federation handshake: `docs/federation-handshake.md`
100-
- Threat model: `docs/compliance/threat-model.md`
101-
- DPIA lite: `docs/compliance/dpia-lite.md`
102-
103-
## 🎯 Roadmap
104-
105-
### v0.1.1 (Current)
106-
107-
- ✅ Minimal interop flow (MaterialDNA → Offer → Match → Transfer)
108-
- ✅ Reference documentation and schemas
109-
- ⏳ Prototype implementations (lab demo in progress)
110-
111-
### v0.2 (Planned)
112-
113-
- Smart contract integration
114-
- Advanced routing algorithms
115-
- Mobile SDKs
116-
- Pilot deployments with research partners (if/when available)
117-
118-
### v1.0 (Planned)
119-
120-
- Stable protocol
121-
- Aspirational multi-city adoption
122-
- Ecosystem marketplace
123-
- Carbon credit integration
124-
125-
## 📊 Adoption
126-
127-
There are no public pilots or deployments at this time. We are actively seeking
128-
collaboration partners and research contributors.
129-
130-
## ⚖️ License
131-
132-
MIT License - see LICENSE for details
133-
134-
## 🙏 Acknowledgments
135-
136-
- Inspired by [ActivityPub](https://www.w3.org/TR/activitypub/) for federation
137-
- [Carlsson & Nevzorova](https://doi.org/10.1016/j.clet.2025.100911) for MaterialDNA concept
138-
- The circular economy community worldwide
139-
140-
---
141-
142-
_Building the material internet, one city at a time_ 🏙️
143-
144-
## How to Cite
145-
146-
If you reference this repository, please cite:
147-
Alphin Tom. "LOOP Protocol Specification and Schemas." LocalLoop, GitHub repository, 2025-2026. https://github.com/local-loop-io/loop-protocol
148-
149-
```bibtex
150-
@misc{localloop_protocol_2025,
151-
author = {Alphin Tom},
152-
title = {LOOP Protocol Specification and Schemas},
153-
year = {2025},
154-
howpublished = {GitHub repository},
155-
url = {https://github.com/local-loop-io/loop-protocol},
156-
note = {Accessed 2025-12-19}
157-
}
158-
```
34+
## Contributing
35+
- Use `rfcs/` for feedback and proposals.
36+
- See `../AGENTS.md` for org context and domain policy.

SPECIFICATION.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,38 @@ Response: 200 OK
595595
}
596596
```
597597

598+
#### Material Management (Lab Demo Extensions)
599+
600+
The following endpoint is optional and used by the LocalLoop lab demo only. It is not required for protocol compliance.
601+
602+
**POST /api/loop/material-status**
603+
604+
```http
605+
POST /api/loop/material-status
606+
Content-Type: application/ld+json
607+
X-API-Key: {api-key}
608+
609+
{
610+
"@context": "https://local-loop-io.github.io/projects/loop-protocol/contexts/loop-v0.1.1.jsonld",
611+
"@type": "MaterialStatusUpdate",
612+
"schema_version": "0.1.1",
613+
"id": "3c9a6a0b-8c1a-4d3f-9c2c-3c1c2f9d5c2a",
614+
"material_id": "DE-MUC-2025-PLASTIC-B847F3",
615+
"status": "reserved",
616+
"updated_at": "2025-06-03T09:15:00Z",
617+
"reason": "Reserved by city exchange",
618+
"notes": "Holding until pickup is confirmed",
619+
"source_node": "lab-hub.loop",
620+
"metadata": { "ticket": "LAB-42" }
621+
}
622+
623+
Response: 201 Created
624+
{
625+
"id": "3c9a6a0b-8c1a-4d3f-9c2c-3c1c2f9d5c2a",
626+
"created_at": "2025-06-03T09:15:05Z"
627+
}
628+
```
629+
598630
#### Node Information
599631

600632
**GET /api/v1/node/info**

examples/09-material-status.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"@context": "https://local-loop-io.github.io/projects/loop-protocol/contexts/loop-v0.1.1.jsonld",
3+
"@type": "MaterialStatusUpdate",
4+
"schema_version": "0.1.1",
5+
"id": "3c9a6a0b-8c1a-4d3f-9c2c-3c1c2f9d5c2a",
6+
"material_id": "DE-MUC-2025-PLASTIC-B847F3",
7+
"status": "reserved",
8+
"updated_at": "2025-06-03T09:15:00Z",
9+
"reason": "Reserved by city exchange",
10+
"notes": "Holding until pickup is confirmed",
11+
"source_node": "lab-hub.loop",
12+
"metadata": {
13+
"ticket": "LAB-42"
14+
}
15+
}

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This directory contains JSON examples that validate against the schemas in `sche
1111
- `06-offer.json`: Minimal interop offer payload (v0.1.1).
1212
- `07-match.json`: Minimal interop match payload (v0.1.1).
1313
- `08-transfer.json`: Minimal interop transfer payload (v0.1.1).
14+
- `09-material-status.json`: Material status update payload (v0.1.1 lab demo).
1415

1516
## Validation
1617
Run `npm test` from the repository root to validate all examples.

0 commit comments

Comments
 (0)