Skip to content

Latest commit

 

History

History
107 lines (68 loc) · 2.95 KB

File metadata and controls

107 lines (68 loc) · 2.95 KB

DEVELOPER DOCUMENTATION

Oblivion Desktop is an Electron project bootstrapped with Electron React Boilerplate.

In a nutshell, Oblivion Desktop is a GUI program that interacts with "WARP-Plus"'s binary executable and changes the system's proxy settings.

Getting Started

  1. Make sure you have Node.js and NPM installed on your system.

  2. Clone this repository ($ git clone https://github.com/bepass-org/oblivion-desktop.git)

  3. Install the program's dependencies:

npm install
  1. Run the development server:
npm run dev # or npm start

Packaging for Production (build from the source)

To package for your local platform:

npm run package

for faster production build (test purposes) use one of the following:

npm run package:linux
npm run package:windows
npm run package:mac

When the command(s) finish, you are to have your production build(s) at release/build!

for more specific builds checkout: https://www.electron.build/cli For more specific builds, take a look at this!

IPC (sending data between main and renderer)

as you may be familiar with electron already.
As you are probably familiar with Electron already; We need to use IPC in order to send and receive data between main and renderer.
Take a loot at src/main/ipc.ts and src/renderer/index.tsx for an in-action example.

Codebase Terminology

For clarity when working with the TypeScript codebase:

Dependencies

After Warp-Plus (wp) updates, always refresh dependencies:

npm install
Code Abbreviations

wp: WARP-Plus module (Cloudflare integration)

od: Oblivion Desktop core functionality

hp: OblivionHelper utility package

TypeScript Conventions

  • All abbreviations should be typed explicitly:
interface WpConfig { /* Warp-plus settings */ }
type OdState = /* OblivionDesktop state */;
Avoid inline abbreviations - use proper type aliases
  • Document abbreviations in JSDoc:
/** @param wpConfig - Warp-plus configuration object */
Maintenance;

The project uses:

Strict TypeScript (strict: true)

Consistent ESLint rules

Pre-commit type checking## Notes

  • (After WP updates;) to get the latest WP version, that app is using. run: npm i.
  • wp refers to warp-plus in the source code.
  • od refers to oblivion desktop in the source code.
  • hp refers to oblivion helper in the source code.

Note: On Linux/MacOS, configuration files for the program are in ~/.config/oblivion-desktop (that's /home/user/.config/oblivion-desktop as realpath) - do not touch these files.

Happy hacking! 😉