Skip to content

Commit d42945d

Browse files
authored
Merge pull request #27 from SINTEF/vibe-coding-2
Vibe coding 2
2 parents 9ba8ca8 + 8ef4666 commit d42945d

File tree

35 files changed

+686
-651
lines changed

35 files changed

+686
-651
lines changed

.claude/settings.json

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

CLAUDE.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
2222

2323
## Architecture Overview
2424

25-
SensApp is a **sensor data platform** built with Rust that scales from edge deployments (SQLite) to big data clusters (ClickHouse). It uses an **event-driven architecture** with an internal message bus for component communication.
25+
SensApp is a **sensor data platform** built with Rust that scales from edge deployments (SQLite) to big data clusters (ClickHouse). It uses **direct storage calls** for simplicity and horizontal scalability.
2626

2727
### Core Components
2828

2929
#### Data Ingestion (`src/ingestors/`)
3030

3131
- **HTTP REST API** with Axum web framework
32-
- **MQTT client** for IoT device integration
3332
- **Multi-format support**: JSON, CSV, SenML, InfluxDB line protocol, Prometheus remote write
33+
- For message queue protocols (MQTT, Kafka, etc.), use external tools like Telegraf or Vector to bridge to HTTP
3434

3535
#### Storage Abstraction (`src/storage/`)
3636

@@ -60,13 +60,12 @@ SensApp is a **sensor data platform** built with Rust that scales from edge depl
6060

6161
- Primary config file: `settings.toml`
6262
- Database connections configured via connection strings
63-
- MQTT configurations support multiple endpoints
6463
- Sentry integration for error tracking and monitoring
6564

6665
### Key Design Patterns
6766

6867
- **Async-first** using Tokio runtime throughout
69-
- **Event-driven** architecture with message passing
68+
- **Stateless architecture** with direct storage calls for horizontal scalability
7069
- **Storage-agnostic** design with trait-based abstractions
7170
- **Type safety** for sensor data with compile-time guarantees
7271
- **Scalable deployment** patterns from single-node to distributed clusters, but the complexity is handled by the storage layer (the databases).
@@ -76,7 +75,7 @@ SensApp is a **sensor data platform** built with Rust that scales from edge depl
7675
- postgresql database name is sensapp
7776
- DATABASE_URL="postgres://postgres:postgres@localhost:5432/sensapp" sqlx migrate run --source src/storage/postgresql/migrations
7877
- DATABASE_URL="postgres://postgres:postgres@localhost:5432/sensapp" cargo sqlx prepare
79-
- do focus on postgresql, AND NOT OTHER STORAGE BACKENDS FOR NOW.
78+
- do focus on postgresql, AND NOT OTHER STORAGE BACKENDS FOR NOW. DO NOT TEST WITH SQLITE. THANKS!
8079
- You are an excellent and experienced software engineer.
8180
- When you filter the tests, you may get a success code even when all the tests where filtered out, confusing you as the test you wanted to run passed. But a line such as "test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 78 filtered out; finished in 0.00s" means that you failed your filter, not that the test passed.
8281
- code used for unit tests and integration tests should be marked with #[cfg(any(test, feature = "test-utils"))]

0 commit comments

Comments
 (0)