source: docs/P3-UseCaseModel/UseCaseModel.md@ b715712

main
Last change on this file since b715712 was b715712, checked in by Stefan <trsunovstefan@…>, 8 weeks ago

Add the server side and configuration

  • Property mode set to 100644
File size: 2.6 KB
Line 
1# Use-case model
2
3## List of Actors / Roles
4
5- **Visitor** — Anyone browsing the platform without an account. Can only view public market information.
6 - [UC0001](UseCase0001.md) — Register new account
7 - [UC0002](UseCase0002.md) — Log in
8
9- **Trader** — A logged-in user managing their virtual funds and positions.
10 - [UC0003](UseCase0003.md) — Deposit virtual funds
11 - [UC0004](UseCase0004.md) — Place market BUY order
12 - [UC0005](UseCase0005.md) — Place market SELL order
13 - [UC0006](UseCase0006.md) — View portfolio and transaction history
14 - [UC0007](UseCase0007.md) — Manage watchlist
15
16- **Market Simulator** — An external automated system (the bot in `bots/`) that inserts simulated trades and candles into the database so prices move in the simulation.
17
18## Use-case model diagram (optional)
19
20*(Optional per the rubric; include one later if time allows.)*
21
22## Realization details on selection of the most important use cases
23
24Solo project → **at least 3 use cases required** (rubric: "at least 3 per team-member"). **7 use cases documented** for a safety margin. All are implemented in the P4 prototype; see `server/` for the Go source and [PrototypeImplementation](../P4-Prototype/PrototypeImplementation.md) for documented runs.
25
26| Use case | Importance | Why documented |
27|----------------------------------------|------------|-------------------------------------------------------------------------------------------|
28| [UC0001 — Register](UseCase0001.md) | High | Without it nothing else works; demonstrates `INSERT` with uniqueness check. |
29| [UC0002 — Login](UseCase0002.md) | High | Authenticates every `Trader` action; demonstrates `SELECT` with parameter binding. |
30| [UC0003 — Deposit](UseCase0003.md) | High | Shows a multi-row transaction: `UPDATE users` + `INSERT INTO transactions`. |
31| [UC0004 — Buy](UseCase0004.md) | Very high | Core of the exchange: `INSERT orders`, `UPDATE users`, `UPSERT holdings`, ledger, trade. |
32| [UC0005 — Sell](UseCase0005.md) | Very high | Dual of Buy; demonstrates row-level `FOR UPDATE` locking and cost-basis bookkeeping. |
33| [UC0006 — Portfolio](UseCase0006.md) | High | Demonstrates joins over `holdings`, `markets`, `crypto`, and a view (`v_portfolio`). |
34| [UC0007 — Watchlist](UseCase0007.md) | Medium | Demonstrates N-M relation handling and `ON CONFLICT` upsert semantics. |
Note: See TracBrowser for help on using the repository browser.