docs: addressed comments

This commit is contained in:
nostrdev-com 2025-03-24 10:31:13 +03:00
parent f7be4c1c57
commit 0fd3d75bac
3 changed files with 26 additions and 22 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Before

(image error) Size: 3.5 MiB

After

(image error) Size: 3.5 MiB

@ -1,4 +1,4 @@
# rCellar Social Technical Design
# Cellar Social Technical Design
## Description
@ -29,15 +29,15 @@ Cellar Social will provide the following capabilities:
Cellar Social consists of the backend and frontend apps supported by the database and the relay.
All hosted services will be containerised and deployed to the linux ([Ubuntu](https://ubuntu.com/)) server and traffic routing will be manged by [Nginx](https://nginx.org/). The entire server should be backed up (at the host level) daily.
All hosted services will be containerised and deployed to the linux ([Ubuntu](https://ubuntu.com/)) server and traffic routing will be managed by [Nginx](https://nginx.org/). The entire server should be backed up (at the host level) daily.
Cellar Social will also use an external service ([nostr.build](http://nostr.build/)) for media hosting to avoid inappropriate data.
![Alt text](./technical-design-assets/technical-design.svg)
`Client` - [frontend app](#frontend)
Website - [frontend app](#frontend)
`API` - [backend app](#backend)
`API` - [API app](#api-app)
`DB` - [database](#database)
@ -49,19 +49,19 @@ Cellar Social will also use an external service ([nostr.build](http://nostr.buil
`Npub Whitelist` - collection of whitelisted Npubs
`Nostr Communication Platform` - flotilla.social is planned to be usedas a communication platform over Nostr
`Nostr Communication Platform` - flotilla.social is planned to be used as a communication platform over Nostr
`Shopstr Marketplace` - shopstr.store is planned to be used as a Nostr marketplace
### Frontend
The frontend app (`Client`) is a web application that users will be able to use by visiting a URL via browser (browsers list is not defined at the moment). The app will be built using the following technologies:
The frontend app (`Website`) is a web application that users will be able to use by visiting a URL via browser (browsers list is not defined at the moment). The app will be built using the following technologies:
- [TypeScript](https://www.typescriptlang.org/)
- [React](https://react.dev/)
- [Nostr Login](https://github.com/nostrband/nostr-login) (authentication)
HTTP requests to Cellar Social API should include Nostr signatures, so the backend app will be able validate it and provide the response.
HTTP requests to Cellar Social API should include Nostr signatures to conform to [NIP-98](https://github.com/nostr-protocol/nips/blob/master/98.md). The `API` app will be able to validate and authorize requests based on `Authorization` header.
Frontend app will use websocket connections to the `APP Relay` to read/write appropriate data.
@ -69,6 +69,10 @@ Frontend app should let users register [NIP-05](https://github.com/nostr-protoco
### Backend
The backend includes API app and Database.
#### API App
The backend app (`API`) is a RESTful API that can be used via HTTP requests. It will be built using the following technologies:
- [TypeScript](https://www.typescriptlang.org/)
@ -81,7 +85,7 @@ The backend app will have access to the database and will perform CRUD (create/r
The backend app will also manage Npub whitelisting that `APP Relay` will use.
### Database
#### Database
[Cassandra](https://cassandra.apache.org/_/index.html) will be used as a NoSQL database (`DB`) to persist business data. Only the backend app will have access to the database.
@ -95,13 +99,13 @@ The following tables are planned in the database:
- Reviews
- NostrEvents
Database has to be backed up (at the host level) daily.
Database will be backed up daily during daily server backup.
### Relay
[strfry](https://github.com/hoytech/strfry) (`APP Relay`) will be used for Nostr events.
Npub whitelisting has to be enabled for strict relay access.
Npub whitelisting has to be enabled for strict relay access. An example of JavaScript function that can be used for whitelisting can be found here.
`APP Relay` will be available for communication at flotilla.social (users' npubs will be taken into account).
@ -109,4 +113,4 @@ Multiple Shopstr instances will use the `APP Relay` to read and write data. Each
### Media Server
[nostr.build](https://nostr.build/) will be used as a media server. It is used to avoid inappropriate data while media uploads.
[nostr.build](https://nostr.build/) will be used as a media server. It is used because of their excellent service and safety protections. Users can make use of their existing nostr.build subscriptions when they upload content. More info can be found [here](https://nostr.build/features/).