![]() In other cases it's better to implement everything in JavaScript. when implementing it in JavaScript would be significantly slower, for example, Argon2.if the functionality is not available in Electron, for example, YubiKey API. ![]() All modules used in KeeWeb are built in keeweb-native-modules repository. KeeWeb uses native modules ( node.js C++ addons) in desktop apps. However electron-builder is used for various Linux packages, such as Snap or AppImage. zip) because the setup process is heavily customized and patching electron-builder would be way harder than implementing builders on our own. We're not using electron-builder for major installers (Windows MSI, macOS app. ![]() However it's not used for any of web bundle building tasks, this part is completely moved to WebPack.ĭesktop apps are packaged with electron-packager and then built into distributables with Grunt. While it's so 2010s to use Grunt nowadays, it's still far ahead of using npm scripts and perfectly does the job of running different actions with JS. The app is bundled with WebPack and built with Grunt. We have our own theme engine that supports switching themes with CSS custom properties.ĭesktop apps are created with Electron. SCSS styles are using Bourbon as a framework. New code should be written in reactive style, however there are some direct DOM modifications in different places, ideally they should be replaced. Views are built on Handlebars.js and rendered with morphdom, which gives us a possibility to re-render them without losing input state. events (the EventEmitter module from node.js).The current framework consists of these building blocks: Originally it was on Backbone, but we were not using much of it and the number of limitations became more than problems solved. The app is built on our own micro-framework that is similar to Backbone. service-worker.js: service worker used for caching and update management.manifest.appcache: not used for caching anymore, contains only update information for desktop apps.index.html: HTML page template where all scripts and styles are imported.common: SCSS components used on different areas of the application.base: common styles, such as global font stack.areas: styles divided by parts of the app, such as footer or header.util: utility classes, they are similar co components, but they don't have dependencies and business logic.storage: implementation of storage, such as Dropbox, Google Drive, WebDAV, and others.presenters: presentation-layer model extensions.models: models, such as file, entry, group, and so on.locales: translations distributed with the app.hbs-helpers: helpers for Handlebars used in templates.framework: micro-framework used in the app: models, collections, views, and events.comp: complex components with business logic using utilities, views, events, and so on.collections: collection models with their methods, such as list of open files.auto-type: auto-type engine used in desktop apps.public-key.pem: public key used to verify plugin and update signatures.resources: resources embedded in the application.manifest.json: SPA manifest for other browsers.browserconfig.xml: Microsoft Edge favicons definition.manifest: manifests for different browsers.lib: 3rd-party code that doesn't exist in npm.Now let's dive deeper into the structure of the application code located in keeweb/app folder. grunt*.js: build system configuration files and task definitions.util: utility scripts for performing different tasks on the repository.plugins: infrastructure for developing plugins and plugin examples.package: support files for packagers, docker images, and installers.img: screenshots for the README on GitHub.desktop: source code of the desktop part, entry point of the Electron app.build: build system tasks and the webpack config.app: application source code, both web and desktop.Let's take a closer look at keeweb repository. forks of some repositories that can be found in keeweb organization pre-built native modules used in KeeWeb.tools for low-level working with kdbx files.CORS-enabled proxy used to load favicons from websites.contains plugins, themes, and translations.core library used to read and write the KDBX file format.the main repository containing the application code, desktop installers, and other support files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |