2023-10-23 14:47:11 +00:00
|
|
|
# discoursio-core
|
2021-08-20 23:17:15 +00:00
|
|
|
|
|
|
|
|
2022-11-22 05:18:48 +00:00
|
|
|
- sqlalchemy
|
2021-08-20 23:17:15 +00:00
|
|
|
- redis
|
|
|
|
- ariadne
|
|
|
|
- starlette
|
2022-11-22 05:18:48 +00:00
|
|
|
- uvicorn
|
2021-08-20 23:17:15 +00:00
|
|
|
|
2022-11-22 03:11:26 +00:00
|
|
|
# Local development
|
2021-08-20 23:17:15 +00:00
|
|
|
|
2022-06-14 05:41:40 +00:00
|
|
|
Install deps first
|
2021-08-20 23:17:15 +00:00
|
|
|
|
2022-05-31 07:03:50 +00:00
|
|
|
on osx
|
2021-08-20 23:17:15 +00:00
|
|
|
```
|
2022-12-03 09:50:18 +00:00
|
|
|
brew install redis nginx postgres
|
2021-08-20 23:17:15 +00:00
|
|
|
brew services start redis
|
|
|
|
```
|
|
|
|
|
2022-05-31 07:03:50 +00:00
|
|
|
on debian/ubuntu
|
|
|
|
```
|
2022-08-09 10:17:31 +00:00
|
|
|
apt install redis nginx
|
2021-08-20 23:17:15 +00:00
|
|
|
```
|
|
|
|
|
2022-08-11 10:06:31 +00:00
|
|
|
Then run nginx, redis and API server
|
2021-08-20 23:17:15 +00:00
|
|
|
```
|
2022-06-14 05:41:40 +00:00
|
|
|
redis-server
|
2023-11-22 16:38:39 +00:00
|
|
|
poetry env use 3.12
|
2023-10-23 14:47:11 +00:00
|
|
|
poetry install
|
2023-11-22 16:38:39 +00:00
|
|
|
poetry run python server.py dev
|
2022-06-14 05:41:40 +00:00
|
|
|
```
|
2023-11-22 16:38:39 +00:00
|
|
|
## Services
|
2021-08-20 23:17:15 +00:00
|
|
|
|
2023-11-22 16:38:39 +00:00
|
|
|
### Auth
|
2021-08-20 23:17:15 +00:00
|
|
|
|
2022-11-22 05:18:48 +00:00
|
|
|
Put the header 'Authorization' with token from signIn query or registerUser mutation.
|
2022-05-31 12:19:05 +00:00
|
|
|
|
2023-11-22 16:38:39 +00:00
|
|
|
### Viewed
|
2022-11-27 08:19:38 +00:00
|
|
|
|
2023-11-22 16:38:39 +00:00
|
|
|
Set ACKEE_TOKEN var to collect stats
|
2022-11-27 08:19:38 +00:00
|
|
|
|
2023-11-22 16:38:39 +00:00
|
|
|
### Seacrh
|
2023-10-15 18:27:44 +00:00
|
|
|
|
2023-11-22 16:38:39 +00:00
|
|
|
ElasticSearch
|
|
|
|
|
|
|
|
### Notifications
|
|
|
|
|
|
|
|
Connected using Redis PubSub channels
|
|
|
|
|
|
|
|
### Inbox
|
|
|
|
|
|
|
|
To get unread counter raw redis query to Inbox's data is used
|
|
|
|
|
|
|
|
|
|
|
|
### Following Manager
|
|
|
|
|
|
|
|
Internal service with async access to storage
|