https://github.com/ozgurg/vergihesaplayici.com
vergihesaplayici.com, calculates taxes.
https://github.com/ozgurg/vergihesaplayici.com
acikkaynak astrojs built-in-public firebase tax-calculator vue website
Last synced: 5 months ago
JSON representation
vergihesaplayici.com, calculates taxes.
- Host: GitHub
- URL: https://github.com/ozgurg/vergihesaplayici.com
- Owner: ozgurg
- License: agpl-3.0
- Created: 2020-05-17T19:20:22.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2026-01-14T03:52:24.000Z (5 months ago)
- Last Synced: 2026-01-14T07:29:33.979Z (5 months ago)
- Topics: acikkaynak, astrojs, built-in-public, firebase, tax-calculator, vue, website
- Language: TypeScript
- Homepage: https://vergihesaplayici.com
- Size: 72.2 MB
- Stars: 67
- Watchers: 2
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: .github/README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
[](https://github.com/ozgurg/vergihesaplayici.com/actions)

[](https://vergihesaplayici.com)
# vergihesaplayici.com
vergihesaplayici.com, calculates taxes.
---
## Overview
### Astro + Vue
* Astro is a static site generator, and a static site is perfect for this "static" site. :)
* Moving from Nuxt 2 to Nuxt 3 was painful.
* I love using Vue, and I picked Vue for most parts of the code unless I needed special Astro features like ``.
### Domain Design
Each page is organized by domain under `src/domains`. All utils, types, and other related files for a page live inside
its own folder. This helps separate pages semantically.
### `PageDef`
Inside `src/domains`, functions that end with `PageDef` define each page. They return a fixed output to avoid broken
links. Yes, it makes the code a little bit verbose, but it's OK.
### Color Extraction for Thumbs
"Telefon Vergisi Hesaplayıcı" and "Konsol Vergisi Hesaplayıcı" have presets with thumbs. Each thumb shows a colored card
with its dominant color. To automate this, I created an Astro integration called `extract-color-from-thumbs`. It loads
the thumbs, extracts the main color using the `fast-average-color-node` library, and saves the result in a `.generated`
folder.
At first, I tried doing this in the browser, and it worked. But since Astro builds run in Node, the color extraction
libraries didn't work properly there. I also found some libraries that worked in Node but not in the browser. So, the
final solution is a bit hacky, but it works for now.
### Presets
"Telefon Vergisi Hesaplayıcı" and "Konsol Vergisi Hesaplayıcı" have presets. Every day, a new phone is announced.
Currently, I'm only adding flagship phones from Apple and Samsung. Apple is the main focus because, according to site
analytics, none of this site's users really care about Samsung. I'll only add Samsung phones if I need to or if they
voluntarily pay me to do it. 💀
Also, the presets include prices that are manually updated. So, don't expect precision. These calculations only provide
information about taxes.
### SVG Cache
I tested a new approach for managing SVGs by grouping them all inside one `` as `` elements and
referencing them with ``. This prevents repeating SVG code and helps reduce the HTML size. (But if an SVG is only
used once, this actually increases the HTML size)
I built a simple Map cache in `svg-cache.ts` to store SVGs, make symbols, and add them to the end of `