Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High level app architecture. #5

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
4. Start website (nginx) on port 80 (HTTP)
1. In `./nginx/nginx.conf` change last line from `include conf.d/prod.conf;` to `include conf.d/test.conf;`
2. `sudo docker compose up --build`
5. Retrieve SSL certificates from let's encrypt using certbot
5. Retrieve SSL certificates from let's encrypt using certbot or update the certificate
1. `sudo docker compose -f docker-compose-certbot.yml run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ -d socialaiprofile.top`
6. Change nginx config to use configuration for port 443 (HTTPS)
1. In `./nginx/nginx.conf` change last line from `include conf.d/test.conf;` to `include conf.d/prod.conf;`
Expand Down
20 changes: 20 additions & 0 deletions architecture/auth.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@startuml
skinparam componentStyle uml2

actor BotUser
component AuthApi
component AuthApp
component BotApp
component GoogleAPI
database Cache



BotUser -right-> BotApp: /auth
BotApp -right-> AuthApp: auth_user
AuthApp -down-> Cache: get_from_cache_by_id(f'creds.{chat_id}')
Cache -left-> BotApp: UserAlreadyLoggedIn
AuthApp -right-> GoogleAPI: Oauth2Manager().authorization_url


@enduml
2 changes: 1 addition & 1 deletion bot_app/src/handlers/auth_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ async def bot_exc_func(exc_level: str, exc_type: str, update: Update,
'valid.')
await generate_youtube_login_message(
context,
update.effective_chat.id,
str(update.effective_chat.id),
await auth_connector.get_authorization_url(chat_id)
)
Loading