schema updates

This commit is contained in:
b 2025-03-19 09:23:37 +00:00
parent fde49f298f
commit 995a7b5169

@ -1,4 +1,7 @@
**Database Schema:** preferably using Cassandra: A distributed NoSQL database
## Database Schema:
preferably using Cassandra: A distributed NoSQL database
1. **Events** (Nostr protocol's core data structure):
* `id` (unique identifier)
* `pubkey` (public key of the event creator)
@ -7,8 +10,8 @@
* `tags` (array of keywords or hashtags)
* `content` (text content of the event)
2. **Wine Reviews**:
* `id` (foreign key referencing the Events table)
* `wine_id` (unique identifier for the wine)
* `event_id` (foreign key referencing the Events table)
* `product_id` (unique identifier for the product, eg `wine_id` or `sake_id`)
* `rating` (numerical rating, e.g., 1-100)
* `review_text` (text content of the review)
* `tasting_notes` (array of tasting notes, e.g., flavors, aromas)
@ -83,7 +86,10 @@
* `id` (foreign key referencing the Events table)
* `parent_event_id` (foreign key referencing the Events table)
* `content` (text content of the comment)
**Frontend Schema:**
## Frontend Schema:
1. **Review Page**:
* Display details (name, producer, region, varietal, vintage)
* Display review text and rating
@ -100,7 +106,9 @@
4. **Tag Page**:
* Display a list of events (reviews, articles, comments) associated with a particular tag
* Allow users to create new events with the same tag
**Nostr Protocol Integration:**
## Nostr Protocol Integration:
1. Use a Nostr client library to connect to the Nostr network and retrieve events.
2. Use the `pubkey` field to authenticate users and authorize actions (e.g., creating new reviews
or comments).