Skip to content

Commit f5cfd66

Browse files
Merge pull request #16 from SolidLabResearch/codex/docs-sync
docs: simplify and realign repository documentation
2 parents 922b7db + 42acfb9 commit f5cfd66

20 files changed

Lines changed: 362 additions & 4589 deletions

GETTING_STARTED.md

Lines changed: 69 additions & 337 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,22 @@ WHERE {
5656
- `LAST`: use the final historical window snapshot as baseline
5757
- `AGGREGATE`: merge the historical window outputs into one compact baseline
5858

59+
## Repository Status
60+
61+
The backend repository is active and locally healthy:
62+
63+
- `cargo test --all-features` passes
64+
- `cargo clippy --all-targets --all-features -- -D warnings` passes
65+
- the HTTP API, Janus API, parser, storage layer, and stream bus all have integration coverage
66+
67+
This repository is the backend and engine implementation.
68+
69+
The maintained dashboard lives in a separate repository:
70+
71+
- `https://github.com/SolidLabResearch/janus-dashboard`
72+
73+
The `janus-dashboard/` folder in this repository is a lightweight local demo client, not the primary frontend.
74+
5975
## Performance
6076

6177
Janus uses dictionary encoding and segmented storage for high-throughput ingestion and historical reads.
@@ -65,14 +81,15 @@ Janus uses dictionary encoding and segmented storage for high-throughput ingesti
6581
- Point query latency: 0.235 ms at 1M quads
6682
- Space efficiency: about 40% smaller encoded events
6783

68-
Detailed benchmark data is in [BENCHMARK_RESULTS.md](./BENCHMARK_RESULTS.md).
84+
Detailed benchmark data is in [docs/BENCHMARK_RESULTS.md](./docs/BENCHMARK_RESULTS.md).
6985

7086
## Quick Start
7187

7288
### Prerequisites
7389

7490
- Rust stable
7591
- Cargo
92+
- Docker, if you want to run the local MQTT broker from `docker-compose.yml`
7693

7794
### Build
7895

@@ -128,23 +145,26 @@ make ci-check # local CI script
128145
The repository includes runnable examples under [`examples/`](./examples), including:
129146

130147
- [`examples/http_client_example.rs`](./examples/http_client_example.rs)
131-
- [`examples/comparator_demo.rs`](./examples/comparator_demo.rs)
132-
- [`examples/demo_dashboard.html`](./examples/demo_dashboard.html)
133148

134-
## Project Layout
149+
## Documentation
150+
151+
Start here:
152+
153+
- [GETTING_STARTED.md](./GETTING_STARTED.md)
154+
- [START_HERE.md](./START_HERE.md)
155+
- [docs/DOCUMENTATION_INDEX.md](./docs/DOCUMENTATION_INDEX.md)
156+
- [docs/README.md](./docs/README.md)
157+
- [docs/HTTP_API_CURRENT.md](./docs/HTTP_API_CURRENT.md)
158+
159+
## Notes
135160

136-
- [`src/api`](./src/api): query lifecycle and orchestration
137-
- [`src/parsing`](./src/parsing): Janus-QL parsing
138-
- [`src/stream`](./src/stream): live stream processing
139-
- [`src/execution`](./src/execution): historical execution
140-
- [`src/storage`](./src/storage): segmented RDF storage
141-
- [`src/http`](./src/http): REST and WebSocket API
142-
- [`tests`](./tests): integration and parser coverage
161+
- `src/main.rs` is currently a benchmark-style executable, not the main user-facing interface.
162+
- The primary user-facing entry point is `http_server`.
143163

144-
## License
164+
## Licence
145165

146-
This project is released under the MIT License.
166+
This code is copyrighted by Ghent University - imec and released under the MIT Licence.
147167

148168
## Contact
149169

150-
For questions, open an issue or contact [Kush](mailto:mailkushbisen@gmail.com).
170+
For questions, contact [Kush](mailto:mailkushbisen@gmail.com) or open an issue in the repository.

START_HERE.md

Lines changed: 32 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,54 @@
1-
# Janus HTTP API - START HERE
1+
# Janus Backend - Start Here
22

3-
## Quick Start (30 seconds)
3+
Use this file if you want the fastest path to a working local backend.
44

5-
```bash
6-
# 1. Setup (one time)
7-
./scripts/test_setup.sh
8-
# 2. Start MQTT
9-
docker-compose up -d mosquitto
5+
## Quick Start
106

11-
# 3. Start Server
12-
cargo run --bin http_server
7+
### 1. Start the MQTT broker
138

14-
# 4. Open Dashboard
15-
open examples/demo_dashboard.html
9+
```bash
10+
docker-compose up -d mosquitto
1611
```
1712

18-
Then click: **Start Replay****Start Query**
19-
20-
## What This Does
13+
### 2. Start the HTTP server
2114

22-
1. **Start Replay**: Loads RDF data from `data/sensors.nq`, publishes to MQTT, stores locally
23-
2. **Start Query**: Executes a JanusQL query, streams results via WebSocket to dashboard
15+
```bash
16+
cargo run --bin http_server
17+
```
2418

25-
## Documentation
19+
### 3. Check health
2620

27-
- **QUICK_REFERENCE.md** - One-page cheat sheet
28-
- **RUNTIME_FIX_SUMMARY.md** - How the runtime issue was fixed
29-
- **COMPLETE_SOLUTION.md** - Full implementation details
30-
- **SETUP_GUIDE.md** - Detailed setup instructions
31-
- **README_HTTP_API.md** - Complete API documentation
32-
- **FINAL_TEST.md** - Verification steps
21+
```bash
22+
curl http://localhost:8080/health
23+
```
3324

34-
## Key Points
25+
Expected response:
3526

36-
**No more runtime panics** - Fixed by spawning StreamBus in separate thread
37-
**Correct JanusQL syntax** - All examples updated to match parser
38-
**MQTT integration** - Full broker setup with Docker Compose
39-
**Two-button demo** - Interactive dashboard for easy testing
40-
**Production-ready** - Stable, tested, documented
27+
```json
28+
{"message":"Janus HTTP API is running"}
29+
```
4130

42-
⚠️ **Known limitation**: Replay metrics show status but not event counts (acceptable trade-off)
31+
## Optional: Open the local demo dashboard
4332

44-
## Troubleshooting
33+
This repository contains a small demo dashboard:
4534

4635
```bash
47-
# Server won't start (port in use)
48-
lsof -ti:8080 | xargs kill -9
49-
50-
# MQTT not running
51-
docker-compose up -d mosquitto
52-
53-
# Check if working
54-
curl http://localhost:8080/health
36+
open examples/demo_dashboard.html
5537
```
5638

57-
## Success Indicators
39+
For the maintained frontend, use the separate repository:
5840

59-
When everything works correctly:
60-
1. Server starts with clean output (no panics)
61-
2. Dashboard shows "Connected to Janus HTTP API server"
62-
3. Replay button → Status changes to "Running"
63-
4. Query button → WebSocket connects, results appear
64-
5. Results tagged as "historical" or "live"
41+
- `https://github.com/SolidLabResearch/janus-dashboard`
6542

66-
## Need Help?
43+
## Most Useful Docs
6744

68-
1. Read **QUICK_REFERENCE.md** for common commands
69-
2. Check **FINAL_TEST.md** for verification steps
70-
3. See **RUNTIME_FIX_SUMMARY.md** if you see panics
71-
4. Review **SETUP_GUIDE.md** for detailed instructions
45+
- [GETTING_STARTED.md](./GETTING_STARTED.md)
46+
- [docs/README_HTTP_API.md](./docs/README_HTTP_API.md)
47+
- [docs/QUICKSTART_HTTP_API.md](./docs/QUICKSTART_HTTP_API.md)
48+
- [docs/README.md](./docs/README.md)
7249

73-
---
50+
## Notes
7451

75-
**Everything is ready. Just run the Quick Start commands above!** 🚀
52+
- The backend is the primary concern of this repository.
53+
- `http_server` is the main user-facing executable.
54+
- `stream_bus_cli` is the replay/ingestion CLI.

docs/COMPLETE_SOLUTION.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/DOCUMENTATION_INDEX.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ This is the shortest path to understanding the current Janus implementation.
55
## Core Reading Order
66

77
1. [../README.md](../README.md)
8-
2. [JANUSQL.md](./JANUSQL.md)
9-
3. [QUERY_EXECUTION.md](./QUERY_EXECUTION.md)
10-
4. [BASELINES.md](./BASELINES.md)
11-
5. [HTTP_API_CURRENT.md](./HTTP_API_CURRENT.md)
12-
6. [ANOMALY_DETECTION.md](./ANOMALY_DETECTION.md)
8+
2. [../GETTING_STARTED.md](../GETTING_STARTED.md)
9+
3. [../START_HERE.md](../START_HERE.md)
10+
4. [JANUSQL.md](./JANUSQL.md)
11+
5. [QUERY_EXECUTION.md](./QUERY_EXECUTION.md)
12+
6. [BASELINES.md](./BASELINES.md)
13+
7. [HTTP_API_CURRENT.md](./HTTP_API_CURRENT.md)
14+
8. [ANOMALY_DETECTION.md](./ANOMALY_DETECTION.md)
1315

1416
## What Each File Covers
1517

@@ -43,15 +45,29 @@ This is the shortest path to understanding the current Janus implementation.
4345
- when baseline state helps
4446
- recommended query patterns
4547

48+
## Additional Current Guides
49+
50+
- [STREAM_BUS_CLI.md](./STREAM_BUS_CLI.md)
51+
- [README_HTTP_API.md](./README_HTTP_API.md)
52+
- [QUICKSTART_HTTP_API.md](./QUICKSTART_HTTP_API.md)
53+
- [QUICK_REFERENCE.md](./QUICK_REFERENCE.md)
54+
4655
## Legacy Material
4756

4857
The following files remain useful as background, but they are not the main entrypoint for the current code:
4958

5059
- [ARCHITECTURE.md](./ARCHITECTURE.md)
5160
- [EXECUTION_ARCHITECTURE.md](./EXECUTION_ARCHITECTURE.md)
5261
- [HTTP_API.md](./HTTP_API.md)
53-
- [README_HTTP_API.md](./README_HTTP_API.md)
54-
- [SETUP_GUIDE.md](./SETUP_GUIDE.md)
62+
- [MVP_TODO.md](./MVP_TODO.md)
63+
- [MVP_ARCHITECTURE.md](./MVP_ARCHITECTURE.md)
64+
- [RSP_INTEGRATION_COMPLETE.md](./RSP_INTEGRATION_COMPLETE.md)
65+
- [SPARQL_BINDINGS_UPGRADE.md](./SPARQL_BINDINGS_UPGRADE.md)
66+
67+
## Dashboard Boundary
68+
69+
- Local demo dashboard in this repository: `examples/demo_dashboard.html`
70+
- Maintained dashboard repository: `https://github.com/SolidLabResearch/janus-dashboard`
5571

5672
## Related Code
5773

docs/FINAL_TEST.md

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)