freqtable
![Go Report Card](https://goreportcard.com/badge/github.com/eroatta/freqtable)
freqtable is a Frequency Table builder, which handles the extraction and counting of words (dictionary words) from Go source code.
Use Cases
![freqtable use cases diagram](https://github.com/eroatta/freqtable/raw/2805226c2213/doc/freqtable_use_cases_diagram/image.png)
freqtable exposes a REST API to create frequency tables. It receives the name of the repository and extract the word count.
This word count is stored in a database and can then be summarized to create a global frequency table.
The input for the process is a GitHub's public Golang source code repository name.
Since we don't use authentication to communicate to GitHub's API, we only use public available repositories.
The response indicates if it could be processed or not, but it won't return the resulting pairs (key-value).
Class/Package diagram
![freqtable class diagram](https://github.com/eroatta/freqtable/raw/2805226c2213/doc/freqtable_class_diagram/image.png)
WordCounter class diagram
The most complex repository implementation is the WordCounter implementation, so a diagram is included to show structs, interfaces and their relationships.
![wordcount class diagram](https://github.com/eroatta/freqtable/raw/2805226c2213/doc/adapter_wordcount_class_diagram/image.png)
Database schema
![database schema](https://github.com/eroatta/freqtable/raw/2805226c2213/doc/freqtable_database_diagram/image.png)
Technical Debt
- Complete missing use cases.
- Improve logging and error handling through the Clean Architecture rings.
- Improve container initialization, perhaps using factories and allowing select underlying storages at initialization time.
- Capture logs and send them to ElasticSearch (and make them available through Kibana).
- Use metrics collector to check the app status.
License
See the LICENSE file for license rights and limitations (MIT).