Clientwarden banner

Clientwarden

13 devlogs
80h 45m 30s

A nice, aestheticly appealing UI intended to replace the desktop Bitwarden Client which uses electron making it very inefficient. Clientwarden is created natively for each platform to be resource-efficient without using electron.

This project uses AI

Used claude to help translate funcs from Ruby to C++ and to help me to add funcs for b64 encoding and decoding.

Demo Repository

Loading README...

CT5

I was able to parse the Login Items and display them in the UI, as well as displaying the item name, item type, username, password and websites in the sidepane. It also has support for icons which are stored in appdata and are cached so that it won’t need to get the icons each time. It also has default icons, if the website fails to get the icon or if the website doesnt exist.

0
CT5

I got the UI and stuff working in WinUI 3, and cleaned up the code, but the hardest part is getting it to work on cmake. Currently Im getting this Cannot Include File Error in XamlMetaDataProvider.h, which is really hard to fix. For the UI, I was able to separate each input into its own UserControl. Using multiple UserControl’s takes up more memory, but it uses significantly less battery and is soo much easier to work with.

Attachment
0
CT5

Since ImGui and WinUI use roughly the same amount of ram, but ImGui takes up more power because of the custom acrylic controller, I decided to use WinUI. It took me some work to get it working, but the login and Unlock pages are the hardest parts to design because of the empty space. I used icons from fluenticons which are much better designed that the windows ones. Also Im using Acrylic since Im on Win10, but once I finish it, ill add support for Windows 11. I still need to refine the UI a bit more and tidy the code and add handlers.

Attachment
Attachment
0
CT5

Creating a color palette for a transparant UI is pretty hard, so I removed the transparant UI temporarily and I used catpuccin which worked pretty well. I tried using figma to plan out the UI, but that was too frustrating, and the colors were soo wrong. I wanted to switch to Ultralight, but that requires an sdk and is too hard, so Im just going to use imgui. I was also able to make the UI for the vault items display page. Once I get everything working, ill fix the UI. It would be nice if someone from hc slack could make me a nice looking UI, bc Im very very bad at making UI’s. If you want to help me, just dm me at @CT5 on slack.

Attachment
0
CT5

I finally finished with the login and unlock UI which took some time, because it was difficult to choose colors for the buttons and stuff. The next thing I need to do is, add the lock func into the vault and implement the vault item viewer and stuff which is going to be very hard. Im considering switching to ultralight which is like electron, except it is far more resource efficient and is dependant on the GPU. It is mainly designed for games, but it should work fine with UI’s.

Attachment
Attachment
0
CT5

I tried to get Botan (cryptography library) to work with vcpkg but it didn’t work even after a long time debugging, so I just used conan as the package manager to install botan, which worked after some debugging. Then I was able to get totp codes. I was also able to get the UI part working with imgui

Attachment
Attachment
0
CT5

I had some extra free time today, so I decided to make the search class for filtering ciphers. Its called CipherQuery, and it allows you to filter by type, creationDate, revisionDate, deletionDate, binned, unbinned, favorites, folder and by regex. Then you can call Get, which will pass you the id’s of ciphers or GetCiphers, which will pass you the id’s and the Type of the cipher.

Attachment
0
CT5

I finally was able to finish making the builder classes for Folder, CardItem, IdentityItem and NoteItem. For some reason, there was a Folder class already which caused a redefinition error, so I had to put everything into a namespace. I also added functions for getting ciphers ids via folder, name, favorites and type. I still need to add more, and also implement it but thats for tomorrow. After that, I can implement a password generator and a copy to clipboard functions and then I can get to the ui. Ill also need to implement the SSH Key cipher soon.

Attachment
0
CT5

I wanted the vault to be implemented in a good way so that I wouldn’t have to re implement it later so that it would be more secure or smth. So I decided to use a builder type of implementation, where you can just create a class with the vault, and then pass it stuff like builder(vault).addthis().addthat().commit(). I also had an issue where the uri part wasn’t working, so I realised that it was bc I didnt b64 encode it, and also the decrypt func was wrong, so I had to fix that too. Also I forgot to change the username to TesterUsername so for now its just password.

Attachment
0
CT5

It took me a while but I was able to re-add everything and fix the underlying architexture. So before the code was made to only be unlocked once and logged in once, but now it works better. I still need to do log out and lock, but thats after I finish implementing the modifyLogin and all the item management functions. I didn’t think it would take me this long, but thats fine.

Attachment
0
CT5

So I first I moved all the crypto stuff into a new file called VaultCrypto.cpp to organise the code further. I also added a VaultOnline.cpp for accessing and managing the online vault. I also added a VaultManagement.cpp for managing both the local and online vaults. The only issue is that Im now getting this error. Ill probably fix that tmrw.

Attachment
0
CT5

So I looked at the code and it was a bit messy, so I split it up into different files. I also added stub functions for adding new Items and stuff which need to be made public. Since I implemented most of the stuff, I needed to get macKey and encKey, which are the 2 keys you need to decrypt something. Then I got an error where bitwarden send me a code via email to login, which caused the app to crash, so I added that as well. rn, I’m failing to get the macKey and encKey.

Attachment
0
CT5

So the first thing I needed for my bitwarden client, was a custom vault engine, that I can separate from the ui for it be cross-platform which basically handles the vault and the underlying system. So I was able to login and get a token, and implement some decryption and encrytion functions with the help of the rubywarden doc.

Attachment
0