FlavorTUI banner

FlavorTUI

9 devlogs
33h 18m 29s

FlavorTUI is a terminal user interface (TUI) for Flavortown. With FlavorTUI, you can view your stats, browse your projects and devlogs, explore the shop, and discover other users’ projects, all from an interactive terminal interface.

Demo Repository

Loading README...

Simon

Shipped this project!

Hours: 0.69
Cookies: 🍪 14
Multiplier: 17.75 cookies/hr

Reship of flavortui so that I can receive credit for the lock-in sidequest. Too bad I didn’t do this the first time :( Completely useless ship too cause I don’t have over an hour.


The only thing that has really changed since the last ship is that now the image rendering is significantly faster and more performant!

Simon

IMAGE RENDERING PERF IMPROVED!!!


I finally fixed most of the performance issues and not on your first scroll everything is nice and smooth! I also added more photos to the readme and of course releaseda new version.


If you want to pip install flavourtui instead of flavortui, then now you can! A simple shim package was added so you can do that. If you are doing this I also recommend changing the setting for the banner as well.


Commits:

  • chore: release 1.0.2 (a8de09b)
  • feat: add flavourtui shim package (e6ba4e4)
  • chore: more photos! (4bad7a1)
  • fix (ef8f509)
  • chore: release 1.0.2.1 (b362976)
  • perf(image): preload and resize images for performance (MASSIVE IMPROVEMENTS) (9400bdf)
  • chore: release 1.0.3 (de02b03)
Attachment
0
AVD

Tagged your project as well cooked!

🔥 AVD marked your project as well cooked! As a prize for your nicely cooked project, look out for a bonus prize in the mail :)

Simon

Shipped this project!

Hours: 32.62
Cookies: 🍪 971
Multiplier: 29.76 cookies/hr

FlavorTUI

What is it?

FlavorTUI is a terminal UI for Flavortown. It’s a full interface that runs in the terminal and lets you browse projects, devlogs, users, shop items, and settings. It works with a mouse but full keyboard control is also fully supported (a lot of time went into that).

Problems

The main problem was making it not fall apart depending on the terminal. Mostly the problem was images, which most terminal have bad support for that makes the app super laggy, so a lot of work went into making it actually usable. Its still not perfect, but there are settings that can allow it to work better on different terminals. I still suggest using one of the recommended terminals though.

How I built it

It is built using the python textual library, which provides (imo) a great terminal UI experience. The TUI is of course written in Python 🥰. This is my first time creating a TUI so I hope its good :)

Your API key is stored “securely” using the keyring library, so you don’t have to worry about it being exposed in your terminal history or config files.

The app is built around a central API client with caching so it doesn’t spam requests or freeze the UI. I added parallel fetching with thread pools so loading multiple sections doesn’t block everything at once.

It actually works fuly offline if you have already visited the pages before, the caching is very robust. It is also customizable in the settings section. Speaking of settings, you can changes caching, image rendering mode, the banner (Flavortown vs Flavourtown lol), manage your api key, and view the cache/config directories.

Result

It’s a working terminal client for Flavortown that feels responsive, supports offline caching, and doesn’t require a mouse to use. I am very proud of this, especially since its my first time doing anything at all like this!

Simon

LOTS of UI upgrades, performance improvements, and README upgrades


I added support for AI declaration display, link buttons for project URLs, and banner mode selection (yes, you can now set it to say “Flavourtown” lol). I also expanded keyboard navigation a lot, making the app much more usable without a mouse and generally more accessible.


On the performance side, I improved responsiveness by using parallel fetching and thread pools, especially when loading multiple resources. I also fixed issues with offline mode revalidation and image loading order that were causing inconsistent or broken UI states.


The README now supports a demo video, an image grid showing the app, and a table of contents, making it way easier to understand and preview the project at a glance.


Finally, there are multiple bug fixes and refactors across the codebase, including a fix for a settings crash, Python 3.10 time calculation issues.They added more to the api: achievements and a simple endpoint to get a user’s projects. This is SO AMAZING. Thank you so much devs ❤️. So yeah, more features + faster loading.


Commits:

  • Because of the stupid word count limit I couldn’t directly attach the commits. Hopefully I can put them in the comments!
Attachment
Attachment
Attachment
Attachment
1

Comments

Simon
Simon 18 days ago

Commits:

  • feat: add AI declaration display and fix settings crash (6eb78a4)
  • feat(ui): add link buttons for project URLs (6238df8)
  • style(ui): update border styles and reorganize TODO (daae479)
  • feat(ui): add comprehensive keyboard navigation support (8018ef2)
  • fix deceptive README (f52be8e)
  • perf: improve performance with parallel fetching and thread pools (e1c656e)
  • fix: offline mode revalidation (527cab6)
  • feat(ui): add banner mode selection (08b3f54)
  • chore: add video and imge tests (incomplete) (adab744)
  • feat: more images! (and video) (452b26d)
  • feat(readme): embed video, images grid, table of contents (caa7667)
  • fix video embed (369f257)
  • fix: time calculation on python 3.10 (a1c8f4f)
  • fix: none image on explore, readme (c7ee534)
  • fix: switch back to tall borders :((((((( (d8baab3)
  • fix: image load order in shop (360e3e2)
  • feat: add performnace section to README (ef8d325)
  • refactor(api): use single endpoint for user’s projects!!! 🎉🎉 (afa1367)
Simon

PyPI packaging + lint cleanup + storage path fixes (v1.0.1)

pypi.org/project/flavortui!!!


This was a big maintenance and release push. I started by cleaning up linting with Ruff + Pylint and fixing a lot of noisy/real issues so the codebase is much more stable to work in. Most of this was completely unecessary, but I guess my pylint score is higher, so me happy :)


The biggest structural change was refactoring the project for proper PyPI distribution with Hatch. All of the code is now inside src/flavortui and I have the pyproject.toml, etc. The PyPi release can be found here: pypi.org/project/flavortui!!!


I also fixed an user experience issue: API/image cache storage is now in platform-appropriate user cache directories via platformdirs instead of relative local paths. That means running the command from different directories no longer creates fragmented .cache folders everywhere. There are also now buttons in settings to open the cache/config dirs for easy locating.


Commits:

  • chore: ruff check (54aeb1c)
  • chore: fix a ton of pylint errors (b33392d)
  • refactor: restructure project for PyPI distribution using hatch (81ebef1)
  • refactor(api): use platformdirs for cache directory (29e336f)
  • feat(ui): add storage directory buttons and update docs (02f9485)
  • chore: release 1.0.1 (a9e7328)
Attachment
Attachment
0
Simon

Explore page + user modal + smarter image loading!

I really need to devlog more often (2nd time bruh)
Pictures are included of everything added/changed for your convenience 👍


I finally implemented the Explore page!!! You can do everything you would like: view projects, devlogs, users, along with search through them and view all of the details you could ever want. As usual everything is very fast which is great, so yay. Instead of displaying every single project/user/devlog (there are 100s or something I think) all at once, there is a lod more button which pretty much instantly loads in the next set so that inital loading is faster.


Thee biggest improvement is that now you don’t need to wait for all images to cache before viewing a page, they now progressively load in. This makes navigating so much faster and better, especially on the projects/users pages which have a lot of images, and frequently new ones.


Commits:

  • feat: add lazy image placeholders and progressive loading (c439fa8)
  • feat(ui): add explore section with projects, devlogs, and users tabs (564a926)
  • feat(explore): add user detail modal with stats and projects (dfeb4d8)
  • refactor: improve parameter handling and list operations (1077774)
Attachment
Attachment
Attachment
Attachment
Attachment
0
Simon

Projects page, Settings (caching, image rendering)!

I really need to devlog more often
Pictures are included of everything added/changed for your convenience 👍


First and foremost, I added the projects page, so now you can see you projects and view devlogs, comments, etc. You cannot edit anything yet (coming soon tm) A lot of internal changes were made here to accomodate all of this. For example, the Api key buttons were added to the api key component to make it more modular.
You can also use the app offline now, it will use the cached data and still work great!


You can now change settings in the app 🎉 🎉 Currently there are three options: API key editing, image rendering modes, and caching modes. A new caching mdoe is also introduced (SWR) which allows quick loading, but also very up to date data on n+1 requests. It is selected as the default option. You can also change how images are rendered, or completely disabled them, which helps a lot with performance on soe terminals. The settings haver clear description on what each option does to clear up confusion.


One of the largest improvements internally is that now I have a custom ModalScreen wrapper that lets me just easily create a PopupModal without the boilerbate!


Commits:
COMMITS HAVE BEEN REMOVED BECAUSE OF THE STUPID WORD COUNT LIMIT. Please see the github for all commits. :)

Attachment
Attachment
Attachment
Attachment
Attachment
0
Simon

Shop and More!


I added the full shop functionality with basically everything on the api! You can see a list of images, sort by region and price (or name), and even reverse sort. You can click on each item to open an “overlay” that contains more extended details about the item. To purchase it you can click the open on web button, the api does not have purchasing capabilities.


I do need to add better beyboard support, and optimize performance, but its look pretty great for now 🎉
I also added a README, and the x-flavortown-ext header. I just remembered that I need to add setting for what kind of image rendering to use, because they can get laggy.


Commits

  • feat: readme, reqs, screenshots (bad) (0eab889)
  • feat(settings): add settings view with sidebar integration (ae57338)
  • fix: images on one line (85b9144)
  • feat: consolidate API functions and homepage -> kitchen (0fa72dd)
  • initial (very) unfinished shop menu (e68cb91)
  • feat: massive shop perf improvements (df856b2)
  • feat: sale support and better ShopCard args (9baf5f7)
  • feat: regional pricing in shop (ac13615)
  • chore: add x-flavortown-ext header (8a0445d)
  • feat(shop): ShopItem mostly finished and other improvements (3cfb1b3)
  • feat: shop long description and reverse sort (3acb7db)
Attachment
Attachment
Attachment
Attachment
0
Simon

Better API Client with rate limits


Refactored the networking code in FlavortownTUI to use a single APIClient class.

  • Rate limits for each endpoint are included (half of the time would be actually)
  • So if we are within a certain time the cached data is used
  • Cached data is stored in .cache folder
  • Doesn’t really have status code or error handling yet, but maybe later
  • Use the same client globally instead of creating many new ones.

Picture shows that it still works 🥰


Commits:

  • refactor(api): refactor API client implementation with new client class (940989b)
Attachment
0
Simon

Working Sidebar


Made the sidebar actually have stuff on it and lead to different pages. (blank pages for now). Also some miscellaneous cleanup I guess


Commits:

  • feat(sidebar): implement navigation buttons and views (b7bc914)
Attachment
Attachment
0
Simon

FlavorTUI Started!


Just started this project and for now all we have is api key input, and a homepage that displays some info about you! Attached a cool video showing off what we have so far :) (ps. I forgot to put the sidebar in it, but yeah that’s there with no functionality)


  • Basic api key saving (thats literally it) (fc54acf)
  • feat: homepage (basic) and api key checking (069ad68)
  • feat: add sidebar (blank/placeholder) (2cada67)
  • feat: better (still kinda bad) homepage (27bf915)
0