PassWard is a simple Desktop Web App for managing and storing credentials. It was developed using Angular (15.0.2) together with Electron (22.0.0).
In summary, the following features are implemented:
- create, edit and delete a credential
- assign or remove tags while creating/editing credentials
- search for any keyword or filter by multiple tags
The credentials are stored in a storage.json, which is prefilled with test data. For encryption and decryption of passwords, we developed a custom, native Node module called passwardcrypto, written in C++. The encryption itself is done using the Caesar cipher.
Starting the app is basically the same for all platforms. But depending on the platform, the prerequisites vary, especially due to the build of the C++ module, which was created using node-gyp.
For Windows, do the following:
- Install Node.js 18 (we used 18.13.0).
- Install one of the following Python versions: v3.7, v3.8, v3.9 v3.10.
- Install C++ Build Environment: Visual Studio ("Desktop Development with C++" workload) or Visaul Studio Build Tools (with "Visual C++ build tools" workload).
- Run
npm install -g node-gyp
. - Navigate to root directory of the project and run
npm install
. This should create a./passwardcrypto/build
folder. - If no such subfolder is created, navigate to
./passwardcrypto
and runnode-gyp configure
andnode-gyp build
. Then runnpm install
on the root folder. - As Electron has a different application binary interface form a given Node.js binary, native modules need to be recompiled for Electron. Therefore, you need to run
.\node_modules\.bin\electron-rebuild.cmd
(in the root folder). - Run
npm start
. This should open the app.
For macOS, do the following:
- Install Node.js 18 (we used 18.30.0).
- Install one of the following Python versions: v3.7, v3.8, v3.9, v3.10
- Install XCode Command Line Tools, which will install
clang
,clang++
andmake
.- Install the XCode Command Line Tools standalone by running xcode-select --install. -- OR --
- Alternatively, if you already have the full Xcode installed, you can install the Command Line Tools under the menu Xcode -> Open Developer Tool -> More Developer Tools....
- Run
npm install -g node-gyp
. - Navigate to root directory of the project and run
npm install
. This should create a./passwardcrypto/build
folder. - If no such subfolder is created, navigate to
./passwardcrypto
and runnode-gyp configure
andnode-gyp build
. Then runnpm install
on the root folder. - As Electron has a different application binary interface form a given Node.js binary, native modules need to be recompiled for Electron. Therefore, you need to run
.\node_modules\.bin\electron-rebuild.cmd
(in the root folder). - Run
npm start
. This should open the app.
If you experience any problems installing node-gyp, please visit https://www.npmjs.com/package/node-gyp (especially if your macOS Catalina is equal to or higher than 10.15).
In order to run some UI tests as well as Integration tests for inter-process calls, just execute npm test
.
The test can be found under ./tests. We only tested the Electron part of our application.
Some points worth mentioning:
- There is a small "bug" in the Angular implementation regarding the input field for creating Chips (Tags) together with autocomplete. When adding a Tag while creating a credential, you can search first look at existing Tags. For example, if you type "St" and then select "Streaming" as the Tag, both "St" and "Streaming" will be added into the field. Workarounds for this issue didn't work, so we didn't want to waste much time solving it.
- We didn't prioritize form validation, empty fields may be saved.
- We didn't prioritize designing a pretty or proper UI.