### Use Case Low Detail Overview: 
```plantuml
@startuml

left to right direction
skinparam packageStyle rectangle
skinparam usecase {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
  FontSize 16
  RoundCorner 20
}
title Use Case Low Detail Overview

actor "User Interface" as User
rectangle "Flask App" as App {
  usecase "View Homepage" as ViewHomepage
  usecase "Change Settings" as ChangeSettings
  usecase "Fetch Candle History" as FetchCandleHistory
  usecase "Initialize Indicators" as InitializeIndicators
  usecase "Sign Up" as SignUp
  usecase "Sign In" as SignIn
  usecase "Sign Out" as SignOut

  User --> ViewHomepage
  User --> ChangeSettings
  User --> FetchCandleHistory
  User --> InitializeIndicators
  User --> SignUp
  User --> SignIn
  User --> SignOut
}

@enduml

```
### Use Case Medium Detail Overview: 
```plantuml
@startuml

left to right direction
skinparam packageStyle rectangle
skinparam usecase {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
  FontSize 16
  RoundCorner 20
}
title Use Case Medium Detail Overview

actor "User Interface" as User
rectangle "Flask App" as App {
  usecase "View Homepage" as ViewHomepage
  usecase "Change Settings" as ChangeSettings
  usecase "Fetch Candle History" as FetchCandleHistory
  usecase "Initialize Indicators" as InitializeIndicators
  usecase "Sign Up" as SignUp
  usecase "Sign In" as SignIn
  usecase "Sign Out" as SignOut

  User --> ViewHomepage
  User --> ChangeSettings
  User --> FetchCandleHistory
  User --> InitializeIndicators
  User --> SignUp
  User --> SignIn
  User --> SignOut

  ViewHomepage --> (Log In)
  ViewHomepage --> (Connect to Alpaca Exchange)
  ViewHomepage --> (Retrieve Rendered Data)
  ChangeSettings --> (Adjust Setting)
  FetchCandleHistory --> (Retrieve Candle History)
  InitializeIndicators --> (Retrieve Indicator Data)
  SignUp --> (Create New User)
  SignUp --> (Log In)
  SignIn --> (Log In)
  SignOut --> (Log Out)
}

@enduml

```
### Use Case View Homepage:
```plantuml
@startuml

left to right direction
skinparam packageStyle rectangle
skinparam usecase {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
  FontSize 16
  RoundCorner 20
}
title Use Case View Homepage

actor "User Interface" as User
rectangle "Flask App" as App {
  usecase "View Homepage" as ViewHomepage
  usecase "Log In" as LogIn
  usecase "Connect to Alpaca Exchange" as ConnectToAlpaca
  usecase "Retrieve Rendered Data" as RetrieveRenderedData
  usecase "Retrieve Candle History" as RetrieveCandleHistory
  usecase "Retrieve Indicator Data" as RetrieveIndicatorData
  usecase "Log Out" as LogOut

  User --> ViewHomepage
  ViewHomepage --> LogIn
  ViewHomepage --> ConnectToAlpaca
  ViewHomepage --> RetrieveRenderedData
  ViewHomepage --> RetrieveCandleHistory
  ViewHomepage --> RetrieveIndicatorData
  ViewHomepage --> LogOut

  LogIn --> (Authenticate User)
  LogIn --> (Set User Session)
  ConnectToAlpaca --> (Set Alpaca API Keys)
  ConnectToAlpaca --> (Connect to Alpaca Exchange)
  RetrieveRenderedData --> (Load or Create User)
  RetrieveRenderedData --> (Connect User to Exchange)
  RetrieveRenderedData --> (Get Rendered Data)
  RetrieveCandleHistory --> (Get Candle History)
  RetrieveIndicatorData --> (Get Indicator Data)
  LogOut --> (Log Out User)
}

@enduml


```
### Sequence Request Homepage
```plantuml
@startuml
skinparam participant {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
}
title Sequence Request Homepage

actor "User Interface" as User
participant "Flask App" as App
participant "BrighterTrades" as BrighterTrades
participant "Config" as Config
participant "User Storage" as UserStorage

User -> App: Request Homepage
App -> BrighterTrades: Create BrighterTrades object
App -> Config: Load server configuration
App -> UserStorage: Load or create user
App -> BrighterTrades: Connect user to exchange
BrighterTrades -> Config: Retrieve API keys
App -> BrighterTrades: Get rendered data
App -> BrighterTrades: Get JS initialization data
App --> User: Serve Homepage

@enduml


```
### Use Case Change Settings:
```plantuml
@startuml
title Use Case Change Settings

left to right direction
skinparam packageStyle rectangle
skinparam usecase {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
  FontSize 16
}
skinparam actor {
  BackgroundColor lightgreen
  BorderColor black
  FontColor darkblue
  FontSize 16
}

actor "User Interface" as User
rectangle "Flask App" as App {
  usecase "Change Settings" as ChangeSettings
  usecase "Adjust Setting" as AdjustSetting

  User --> ChangeSettings
  ChangeSettings --> AdjustSetting

  AdjustSetting --> (Retrieve User Session)
  AdjustSetting --> (Check User Login)
  AdjustSetting --> (Get Setting)
  AdjustSetting --> (Update Setting)
}

@enduml


```
### Sequence Change Settings
```plantuml
@startuml
title Sequence Change Settings

skinparam sequence {
  ActorBackgroundColor lightgreen
  ParticipantBackgroundColor lightblue
  ActorBorderColor black
  ParticipantBorderColor black
  ActorFontColor darkblue
  ParticipantFontColor darkblue
  FontSize 14
}

actor "User Interface" as User
participant App as "Flask App"
participant BrighterTrades as "BrighterTrades"
participant Config as "Config"
participant UserStorage as "User Storage"

User -> App: Submit Settings Change
App -> BrighterTrades: Adjust Setting
BrighterTrades -> UserStorage: Get User Data
App --> User: Redirect to Homepage

@enduml


```
### Use Case Fetch Candle History:
```plantuml
@startuml
left to right direction
skinparam packageStyle rectangle
skinparam usecase {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
}

actor "User Interface" as User
rectangle "Flask App" as App {
  usecase "Fetch Candle History" as FetchCandleHistory
  usecase "Retrieve Candle History" as RetrieveCandleHistory

  User --> FetchCandleHistory
  FetchCandleHistory --> RetrieveCandleHistory

  RetrieveCandleHistory --> (Get User Session)
  RetrieveCandleHistory --> (Check User Login)
  RetrieveCandleHistory --> (Retrieve Chart View)
  RetrieveCandleHistory --> (Fetch Candle Data)
}

@enduml


```
### Sequence Request candle history
```plantuml
@startuml
skinparam participant {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
}

actor "User Interface" as User
participant App as "Flask App"
participant BrighterTrades as "BrighterTrades"
participant Candles as "Candles"
participant UserStorage as "User Storage"

User -> App: Request Candle History
App -> BrighterTrades: Process Incoming Message
BrighterTrades -> UserStorage: Get User Data
App -> Candles: Get Candle History
Candles --> App: Return Candle History
App --> User: Serve Candle History

@enduml


```
### Sequence Initialize Indicators:
```plantuml
@startuml
skinparam participant {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
}

actor "User Interface" as User

User -> app: Requests initialized indicators
activate app #005500
app -> Indicators: initialize indicators
activate Indicators #005500
Indicators -> app: return initialized indicators
deactivate Indicators

app -> User: Returns initialized indicators
deactivate app

@enduml


```
### Sequence Sign in:
```plantuml
@startuml
skinparam participant {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
}
actor "User Interface"

"User Interface" -> app: requests "Sign In"
activate app #005500
app -> "Sign In": enter email and password
activate "Sign In" #005500

"Sign In" -> app: authenticate user
deactivate "Sign In"

app -> "User Interface": Return "Signed In" result
deactivate app

@enduml

```
### Sequence Sign up:
```plantuml
@startuml
skinparam participant {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
}
actor "User Interface" as User

User -> app: send "Sign Up" request
activate app #005500
app -> "Sign Up": email, password, and confirm password
activate "Sign Up" #005500

"Sign Up" -> app: create new user
deactivate "Sign Up"

app -> User: Return "Signed Up" result
deactivate app

@enduml

```
### Sequence Sign out:
```plantuml
@startuml
skinparam participant {
  BackgroundColor lightblue
  BorderColor black
  FontColor darkblue
}
actor "User Interface" as User

User -> app: send "Sign Out" request 
activate app #005500
app -> "Sign Out": sign out user
activate "Sign Out" #005500

"Sign Out" -> app: clear user data
deactivate "Sign Out"

app -> User: return "Signed Out" result
deactivate app

@enduml


```