docs: added technical design
This commit is contained in:
parent
39a43276a7
commit
19d92970be
156
technical-design-assets/technical-design.drawio
Normal file
156
technical-design-assets/technical-design.drawio
Normal file
File diff suppressed because one or more lines are too long
1
technical-design-assets/technical-design.svg
Normal file
1
technical-design-assets/technical-design.svg
Normal file
File diff suppressed because one or more lines are too long
After (image error) Size: 3.4 MiB |
104
technical-design.md
Normal file
104
technical-design.md
Normal file
@ -0,0 +1,104 @@
|
||||
# Cellar Social Technical Design
|
||||
|
||||
## Description
|
||||
|
||||
Sellar Social is a platform where aficionados of international wine, sake, spirits and coffee can review, discuss, and order it.
|
||||
|
||||
## Key Features
|
||||
|
||||
Cellar Social will provide the following capabilities:
|
||||
|
||||
- Login using Nostr identity.
|
||||
- View products.
|
||||
- Leave product review.
|
||||
- Evaluate multiple properties of the product.
|
||||
- Provide a description.
|
||||
- Upload media files.
|
||||
- View product review.
|
||||
- Leave a comment.
|
||||
- Zap a review or a comment.
|
||||
- Visit the product producer page.
|
||||
- Leave a comment.
|
||||
- Zap a producer or a comment.
|
||||
- Order the product.
|
||||
- Engage with product related community.
|
||||
- Provide NIP-05 names.
|
||||
- View and sign on to events.
|
||||
|
||||
## Design
|
||||
|
||||
Cellar Cocial consists of the backend and frontend apps supported by the database and the relay.
|
||||
|
||||
All services will be 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 daily.
|
||||
|
||||
Cellar Social will also use external service for media hosting to avoid inappropriate data.
|
||||
|
||||

|
||||
|
||||
`Client` - [frontend app](#frontend)
|
||||
|
||||
`API` - [backend app](#backend)
|
||||
|
||||
`DB` - [database](#database)
|
||||
|
||||
`APP Relay` - [relay](#relay)
|
||||
|
||||
`Media Server` - [media server](#media-server)
|
||||
|
||||
`NIP-05` - NIP-05 name register
|
||||
|
||||
`Npub Whitelist` - collection of whitelisted Npubs
|
||||
|
||||
### 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:
|
||||
|
||||
- [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.
|
||||
|
||||
Frontend app will use websocket connections to the `APP Relay` to read/write appropriate data.
|
||||
|
||||
Frontend app should let users register [NIP-05](https://github.com/nostr-protocol/nips/blob/master/05.md) names and manage users' metadata.
|
||||
|
||||
### Backend
|
||||
|
||||
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/)
|
||||
- [Node.js](https://nodejs.org/en)
|
||||
- [Express.js](https://expressjs.com/)
|
||||
|
||||
HTTP requests to the backend app should include Nostr signatures, so the app will be able to validate it and provide the response.
|
||||
|
||||
The backend app will have access to the database and will perform CRUD (create/read/update/delete) operations.
|
||||
|
||||
The backend app will also manage Npub whitelisting that `APP Relay` will use.
|
||||
|
||||
### 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.
|
||||
|
||||
The following tables are planned in the database:
|
||||
|
||||
- Users
|
||||
- Coffee
|
||||
- Sake
|
||||
- Spirits
|
||||
- Wine
|
||||
- Reviews
|
||||
- NostrEvents
|
||||
|
||||
Database has to be backed up daily.
|
||||
|
||||
### 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.
|
||||
|
||||
### Media Server
|
||||
|
||||
[nostr.build](https://nostr.build/) will be used as a media server. It is used to avoid inappropriate data while media uploads.
|
Loading…
x
Reference in New Issue
Block a user