Skip to content

Commit c4df8bc

Browse files
authored
doc: Documentation fixes and improvements (#290)
* doc: Added brokers logos to the documentation Added a script to help generating the broker logos with the proper sizes to be embedded in the documentation. * doc: Improved broker login and settings documentation Add screenshots and provide a more user oriented documentation * doc: Fixed documentation broken links Some of the documentation links were broken. This PR fixes those broken links, and adds tooling to validate the links are always correct
1 parent 17ae46e commit c4df8bc

39 files changed

+785
-454
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,17 @@ ENV/
5858
.idea/
5959
*.iml
6060
.claude/
61+
.vscode/
6162

6263
# Project-specific
6364
config/*
6465
!config/config.json.template
65-
/import/
66-
portfolio-performance/*.csv
67-
portfolio-performance/*.pdf
6866

6967
# IBKR certificates
7068
*.pem
7169

7270
# nektos/act
7371
.actrc
72+
73+
# lycheecache (Markdown Link Checker)
74+
.lycheecache

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ repos:
3636
language: system
3737
stages: [pre-commit]
3838

39+
- repo: https://github.com/lycheeverse/lychee
40+
rev: lychee-v0.22.0
41+
hooks:
42+
- id: lychee
43+
name: Check Markdown Links
44+
types: [markdown]
45+
args:
46+
- --config=lychee.toml
47+
- --no-progress
48+
stages: [pre-commit]
49+
3950
# Optional: Check Django migrations
4051
- repo: local
4152
hooks:

AGENTS.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,13 +644,19 @@ class PortfolioEntry:
644644
- `make lint-fix` — Automatically fix Python code style issues and format code.
645645
- **Check Markdown files:**
646646
- `make markdown-check` — Check Markdown files for style issues.
647+
- `make markdown-links-check` — Check links and images in Markdown files (validates URLs and local file references).
647648
- **Auto-fix Markdown files:**
648649
- `make markdown-fix` — Automatically fix Markdown style issues.
649650

650651
### Markdown Standards
651652

652653
- **HTML is NOT allowed** - Use pure Markdown syntax only
653654
- Markdown files are linted using `pymarkdown` (run `make markdown-check` to verify)
655+
- **Links and images are validated** - All links and images are checked using `lychee` (run `make markdown-links-check` to verify)
656+
- Broken links will fail pre-commit hooks
657+
- Both local and remote links are validated
658+
- Image file references are verified
659+
- **Installation required**: `brew install lychee` (macOS) or see [Lychee Installation](https://github.com/lycheeverse/lychee?tab=readme-ov-file#installation) for other platforms
654660
- **Image sizing:** Standard Markdown does not support image sizing. To resize images:
655661
- Resize the actual image file itself using image editing tools
656662
- Use a smaller version of the image file if available
@@ -693,13 +699,19 @@ class PortfolioEntry:
693699
```
694700
Ensures all tests pass. Fix broken tests or add new tests for new functionality.
695701

696-
4. **Check Dependencies (RECOMMENDED)**
702+
4. **Check Markdown Links (REQUIRED if markdown changed)**
703+
```bash
704+
make markdown-links-check
705+
```
706+
Only if you modified or added markdown files. Validates all links and image references.
707+
708+
5. **Check Dependencies (RECOMMENDED)**
697709
```bash
698710
make check-dependencies
699711
```
700712
Only if you added or removed dependencies.
701713

702-
5. **Run Pre-commit Hooks (REQUIRED)**
714+
6. **Run Pre-commit Hooks (REQUIRED)**
703715
```bash
704716
make pre-commit-run
705717
```

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Want to add support for a new broker? See our:
9393
2. **Clone your fork:**
9494

9595
```bash
96-
git clone https://github.com/YOUR-USERNAME/stonks-overwatch.git
96+
git clone https://github.com/YOUR_USERNAME/stonks-overwatch.git
9797
cd stonks-overwatch
9898
```
9999

@@ -268,7 +268,7 @@ class PortfolioService:
268268
- **Error handling**: Use custom exceptions with proper error messages
269269
- **Logging**: Use structured logging with appropriate log levels
270270

271-
> **Note for AI Agents:** See [`AGENTS.md`](../AGENTS.md) for detailed architecture patterns, code examples, and AI-specific guidance.
271+
> **Note for AI Agents:** See [`AGENTS.md`](./AGENTS.md) for detailed architecture patterns, code examples, and AI-specific guidance.
272272
273273
## Testing
274274

Makefile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ RESET := \033[0m
6060
#==============================================================================
6161

6262
.PHONY: help install update clean
63-
.PHONY: lint lint-check lint-fix markdown-check markdown-fix license-check generate-third-party check-dependencies scan
63+
.PHONY: lint lint-check lint-fix markdown-check markdown-fix markdown-links-check license-check generate-third-party check-dependencies scan
6464
.PHONY: migrate collectstatic runserver start run test coverage
6565
.PHONY: docker-build docker-run docker-shell docker-clean
6666
.PHONY: briefcase-create briefcase-update briefcase-run briefcase-package briefcase-clean
@@ -135,6 +135,17 @@ markdown-fix: ## Fix Markdown files automatically
135135
@echo -e "$(BOLD)$(GREEN)Fixing Markdown files...$(RESET)"
136136
poetry run pymarkdown --config=pyproject.toml fix -r README.md CHANGELOG.md ./docs
137137

138+
markdown-links-check: ## Check links and images in Markdown files
139+
@echo -e "$(BOLD)$(BLUE)Checking Markdown links and images...$(RESET)"
140+
@if command -v lychee >/dev/null 2>&1; then \
141+
lychee --config lychee.toml README.md CHANGELOG.md docs/; \
142+
else \
143+
echo -e "$(BOLD)$(RED)Error: lychee is not installed$(RESET)"; \
144+
echo -e "$(YELLOW)Install it with: brew install lychee (macOS) or cargo install lychee (cross-platform)$(RESET)"; \
145+
echo -e "$(YELLOW)Or download from: https://github.com/lycheeverse/lychee/releases$(RESET)"; \
146+
exit 1; \
147+
fi
148+
138149
license-check: ## Check license compatibility
139150
@echo -e "$(BOLD)$(BLUE)Checking license compatibility...$(RESET)"
140151
poetry run licensecheck
@@ -339,6 +350,16 @@ generate-images: ## Generate images for browsers and Briefcase
339350
exit 1; \
340351
fi
341352

353+
generate-docs-broker-icons: ## Generate broker icons for documentation (sidebar and docs pages)
354+
@echo -e "$(BOLD)$(BLUE)Generating broker icons for documentation...$(RESET)"
355+
@if [ -f "scripts/generate_docs_broker_icons.sh" ]; then \
356+
chmod +x scripts/generate_docs_broker_icons.sh; \
357+
./scripts/generate_docs_broker_icons.sh; \
358+
else \
359+
echo -e "$(RED)Error: scripts/generate_docs_broker_icons.sh not found$(RESET)"; \
360+
exit 1; \
361+
fi
362+
342363
#==============================================================================
343364
##@ Git Hooks
344365
#==============================================================================

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,19 @@
5454

5555
## Screenshots
5656

57-
![Dashboard Screenshot](docs/images/dashboard.png)
57+
![Broker Selector Screenshot](docs/images/screenshots/broker-selector.png)
58+
*Broker Selector and login dialog.*
59+
![Dashboard Screenshot](docs/images/screenshots/dashboard.png)
5860
*Dashboard view showing portfolio overview and performance metrics.*
59-
![Portfolio Screenshot](docs/images/portfolio.png)
61+
![Portfolio Screenshot](docs/images/screenshots/portfolio.png)
6062
*Detailed portfolio breakdown with asset allocation and recent transactions.*
61-
![Diversification Screenshot](docs/images/diversification.png)
63+
![Diversification Screenshot](docs/images/screenshots/diversification.png)
6264
*Visual representation of asset diversification across different classes.*
63-
![Dividends Screenshot](docs/images/dividends.png)
65+
![Dividends Screenshot](docs/images/screenshots/dividends.png)
6466
*Dividend tracking and upcoming payments overview.*
65-
![Dividends Calendar Screenshot](docs/images/dividends-2.png)
67+
![Dividends Calendar Screenshot](docs/images/screenshots/dividends-2.png)
6668
*Calendar view of upcoming dividend payments.*
67-
![Fees Screenshot](docs/images/fees.png)
69+
![Fees Screenshot](docs/images/screenshots/fees.png)
6870
*Analysis of fees incurred across different brokers.*
6971

7072
## Quick Start

docs/ARCHITECTURE_AUTHENTICATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The authentication system consists of three main service layers:
8181
2. **Interface Layer**: Type-safe contracts for all services
8282
3. **Implementation Layer**: Concrete service implementations
8383

84-
> **📖 Pattern Details:** See [Architecture Overview](ARCHITECTURE.md#factory-pattern) for more on the factory pattern implementation.
84+
> **📖 Pattern Details:** See [Architecture Overview](ARCHITECTURE.md#3-factory-pattern) for more on the factory pattern implementation.
8585
8686
#### Service Interfaces
8787

0 commit comments

Comments
 (0)