This day, I focused on the language switcher and added persistence to it. Now the chosen language (for now only programmable) can be persisted between app restarts. I've used the @react-native-async-storage/async-storage for it.
There is now a nice, simple, and minimal settings screen for the app. I will extend the capabilities here later. For now it is good to have it here and be able to sign out so I can test the auth better.
Now that I have the UI for simple CRUD operations, I can clean up the code a bit.
Add shared stylings.
Unify the code between screens.
Add a dark mode (too much for now, but I know I will need it later).
Proper spacing and typography
This lays a good foundation I can build upon.
It makes me happy, this feeling of having a base on which I can iterate. Make small changes and directly see improvements. I hope I can keep this feeling up while improving the app. Small changes, small
Features. 🤷
Another nice thing is when the UI goes from basic to polished basic. It is not much but improves the view noticeably.
The focus today was to add UI for adding, editing, and deleting entries. Which is now working but looks awful, but for an MVP it is enough. :D
While working on it, I discovered some flaws in how I handle entries. When I had this app in mind, I always thought that this should be possible from one form input. But while thinking longer on it, this would be possible but with a lot of effort. So this could be a feature for later. For now I want to focus on the basics. Still, I don't want the user to fill out a lot of form inputs.
With this day, I have some input fields that are simple but are doing the job. It is now possible to make simple CRUD operations within the app.
I noticed that I forgot to add ESLint, Prettier, and proper typechecking on project init.
So I've added it and also run into an issue in my Neovim config. Where I was unable to use some LSP methods. The solution was that I tried to use a tool that was not installed, and after the typescript-tools migration for Neovim v0.11, this tool initialization was failing silently and causing some problems. Strange that this is only recently an issue. But ok, I found a fix, and now my Neovim is back working again with TypeScript. :)
After adding ESLint, Prettier, and proper typechecking with my now working Neovim, I resolved some issues, and the project is now “clean.”
Creating Database and Tables! This one is a bit “harder” because I have to plan the data model correctly. For the auth, I can reuse the Supabase auth tables, so the focus will be on the tables.
For the application I need 3 tables and a many-to-many table. For now this is enough to get the app going.
After creating the tables in the Supabase UI, I used the Supabase CLI to generate the types and applied them. Additionally, I added some API functions to be more prepared for the next day.
Day 2 of #AdventOfProgress has translations as the main topic. I want the app to support at least German and English.
Because I'm already quite familiar with next-intl, I've chosen react-i18next as the internationalization tool for this app. Which worked quite nicely. And the API looks quite similar to next-intl.
Not much to say here. I've spent around 1 hr implementing this. A big chunk of the time was wasted on a dynamic import, where I tried, out of muscle memory, to dynamically load the JSON files with the translations. Implementing dynamic loading of languages has, at this state of the app, no real impact. So I ditched dynamic loading in favor of statically loading the 2 languages.
Today I have planned out the frame of the application. The tech stack will be Expo.dev (React Native) and Supabase. This stack is what I had in mind for most of the time. First, I also wanted to add NativeWind for styling, but for now I want to start as clean as possible and focus on what is really needed to get out an MVP.