Skip to content

Commit

Permalink
Merge pull request #48 from Arquisoft/26-write-documentation-for-the-…
Browse files Browse the repository at this point in the history
…runtime-view

Wrote documentation for the runtime view part
  • Loading branch information
Rolitoansu authored Feb 23, 2025
2 parents 345de0c + e04402a commit 2244fb3
Showing 1 changed file with 104 additions and 17 deletions.
121 changes: 104 additions & 17 deletions docs/src/06_runtime_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,116 @@ See https://docs.arc42.org/section-6/[Runtime View] in the arc42 documentation.
****
endif::arc42help[]

=== <Runtime Scenario 1>
This section describes how the system components interacts between them. In this early stage, the information in this section cannot be too detailed.


* _<insert runtime diagram or textual description of the scenario>_
* _<insert description of the notable aspects of the interactions between the
building block instances depicted in this diagram.>_

It is possible to use a sequence diagram:
=== User Authentication Flow

[plantuml,"Sequence diagram",png]
==== Sign up Flow

[plantuml,"Authentication Sequence",png]
----
actor User
participant "Web Application" as App
participant "Authentication Service" as Auth
participant "Users database" as Ust
User -> App: Sign up
App -> Auth: Validate credentials
alt credentials are valid
Auth -> Ust: Send the data to create the user
Ust -> Ust: Create the user
alt user is created correctly
Ust --> Auth: Sign up result
Auth --> App: Acess token
App --> User: Acess token
else user is repeated
Ust --> Auth: Error repeated user
Auth --> App: Error repeated user
App --> User: Log in page
else credentials are invalid
Auth --> App: Invalid credentials
App --> User: Error invalid credentials
----

Notable Aspects: Ensures secure authentication via an authentication service. Protects against unauthorized access and ensures session management.

==== Log in Flow

[plantuml,"Authentication Sequence",png]
----
actor Alice
actor Bob
database Pod as "Bob's Pod"
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice --> Pod: Store route
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
actor User
participant "Web Application" as App
participant "Authentication Service" as Auth
participant "Users database" as Ust
User -> App: Login request
App -> Auth: Validate credentials
alt credentials are valid
Auth -> Ust: Search for registered users
alt user is found and pasword is correct
Ust --> Auth: Found user
Auth --> App: Acess token
App --> User: Acess token
else user is not found
Ust --> Auth: Not found user
Auth --> App: Not found user
App --> User: Sign up page
else password is not correct
Ust --> Auth: Error incorrect password
Auth --> App: Error incorrect password
App --> User: Incorrect password
else credentials are invalid
Auth --> App: Error invalid credentials
----

=== <Runtime Scenario 2>
Notable Aspects: Ensures secure authentication via an authentication service. Protects against unauthorized access and ensures session management.


=== Quiz Question Retrieval Flow

=== ...
[plantuml,"Quiz Question Retrieval",png]
----
actor User
participant "Web Application" as App
participant "Wikidata API" as Wiki
User -> App: Request quiz question
App -> Wiki: Fetch relevant question
Wiki --> App: Return question data
App --> User: Display question
----

=== <Runtime Scenario n>
Notable Aspects: Ensures real-time retrieval of quiz questions from Wikidata, requiring efficient API calls and caching strategies.

=== LLM Chat Interaction Flow

[plantuml,"LLM Chat Interaction",png]
----
actor User
participant "Web Application" as App
participant "LLM Service" as LLM
User -> App: Send chat message
App -> LLM: Process user input
LLM --> App: Generate response
App --> User: Display chat reply
----

Notable Aspects: Secure input handling is necessary to prevent prompt injection. Ensuring low-latency responses enhances user experience.

=== Error Handling Scenario

[plantuml,"Error Handling Sequence",png]
----
actor User
participant "Web Application" as App
participant "Logging Service" as Log
User -> App: Perform action
App -> App: Error occurs
App -> Log: Log error details
App --> User: Display error message
----
Notable Aspects: Ensures errors are logged for troubleshooting and users receive meaningful error messages.

0 comments on commit 2244fb3

Please sign in to comment.