https://github.com/attomos/hdoc-tracker
My personal #100DaysOfCode tracker
https://github.com/attomos/hdoc-tracker
100daysofcode
Last synced: 3 months ago
JSON representation
My personal #100DaysOfCode tracker
- Host: GitHub
- URL: https://github.com/attomos/hdoc-tracker
- Owner: attomos
- Archived: true
- Created: 2022-02-06T15:08:56.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T16:22:41.000Z (over 2 years ago)
- Last Synced: 2025-01-28T17:39:32.301Z (11 months ago)
- Topics: 100daysofcode
- Language: Python
- Homepage: https://hdoc-tracker.vercel.app
- Size: 1.3 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hdoc-tracker [28/62]
## TODO
- [x] GitHub actions
- [x] Streak count (longest and current)
- [x] extract more entities (link to src, demo, etc.)
- [x] list view
- [x] timestamp
- [x] extra entities (demo, src, etc.)
- [x] Link to original tweet
- [x] thread view
- [x] YouTube reply clone
- [x] Keyboard shortcuts dialog + ? binding to display it
- [x] improve color contrast (thanks to VisBug)
- [ ] pytest
- [x] at least have some tests
- [ ] 80% coverage
- [x] coverage
- [ ] GitHub Actions
- [ ] jest unit tests
- [x] at least have some tests
- [ ] 80% coverage
- [ ] GitHub Actions
- [ ] cypress
- [x] routing
- [ ] refactor UI code
- [ ] refactor backend code
- [x] responsive
- [x] mobile friendly
- [x] Search functionality
- [x] dark mode
- [-] adaptive SVG favicon
- [x] SVG className instead of other state prop
- [ ] performance measurement
- [ ] get_tweets time taken (incremental fetch already?)
- [ ] Lighthouse Mobile score
- [ ] Lighthouse Desktop score
- [ ] performance improvements
- [ ] about page with Mermaid https://www.youtube.com/watch?v=6TiIrJf63Xs
- [ ] support for new rounds (backend)
- [x] folder-based? nope
- [x] Filter by round
- [x] need an API for new rounds (or for the sake of learning 😏)
- [ ] support for new rounds (UI)
- [ ] round selector (that ListBox)
- [ ] ListBox could use some CSS and custom div
- [ ] routing
- [ ] data fetching
- [x] merge tweets
- [x] merge tweets unit test
- [ ] create a single commit for multiple JSON files update
- [ ] put more context in automatic commits
- [ ] time taken
- [ ] pretty stats table (probably better add a comment in each automatic tweet)
- [ ] new data storage design
- [ ] where to keep the backend state (everything in upstash?)
- [ ] data backup (S3 or some storage service)
- [ ] more entity support
- [ ] npm
- [ ] pypi
- [ ] rust package
- [ ] go package
- [ ] round 2 (migrated to Mastodon)
- [x] Make sure content are always in HTML?? https://docs.joinmastodon.org/entities/Status/#content
- [ ] prepare new component for round 2 content
## bugs
- [x] time zone bug in `formatTwitterDate` function
- [x] no streaks, but display the most recent streak instead
- [x] compare_tweets bug (counting number of tweets has some issues, e.g., what about replies tweets)
- [ ] plus4months bug, activity graph should continue as long as it has new data or reach day 100
## useful resources
- mocking Date in jest
- https://github.com/facebook/jest/issues/2234#issuecomment-731451275
- crop PNG
- https://www.iloveimg.com/crop-image/crop-png
- PyGithub update multiple files
- https://github.com/PyGithub/PyGithub/issues/1628#issuecomment-671173979
## layout resource, inspirations
- grid layout with side navigation rails
- https://developer.chrome.com/
## design
### data to keep in stats file (sample)
| field | data |
| ---------------------- | ----------------------------------- |
| since_id | 1234567 (loaded from metadata file) |
| total tweets count | 300 |
| tweets count (round 1) | 120 |
| tweets count (round 2) | 180 |
| elapsed time (seconds) | 3.33 |
### flowchart for data fetching/processing pipeline
```mermaid
graph TD
S0[Daily run] --> A1
S1[manual or weekly run] -->|pass start_time parameter| A
A1(Determine where should the script start fetching tweets) --> D1{stats file exists}
D1 -->|does not exist| F1(run script without since_id)
D1 -->|exists| F2(run script with since_id)
F1 --> A
F2 --> A
subgraph get_tweets.py
A(Fetch tweets from Twitter API) --> B(Extract metadata)
B --> B2(group tweets by conversation_id)
B2 --> B3(group tweets by round)
B3 --> B4(write the results to files)
end
B4 --> U1(push changes to GitHub)
U1 --> U2(upload data to Upstash)
```