mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5259] [MERGED] feat(desktop): portable phase-1 foundational: infra & build #5131
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5259
Author: @CuriousCorrelation
Created: 7/21/2025
Status: ✅ Merged
Merged: 7/24/2025
Merged by: @jamesgeorge007
Base:
next← Head:desktop-feat-portable-app-phase-1-foundational-infra-and-build-system📝 Commits (4)
b8fa1e0feat(desktop): portable phase-1 foundational: infra & build8cf08d8fix(desktop) platform conditions whenportable73be937fix(kernel): import and export type decl3739075fix: remove redundantawaits📊 Changes
19 files changed (+1078 additions, -125 deletions)
View changed files
📝
packages/hoppscotch-common/src/components.d.ts(+6 -5)📝
packages/hoppscotch-data/package.json(+1 -1)➕
packages/hoppscotch-desktop/.eslintrc.cjs(+67 -0)📝
packages/hoppscotch-desktop/package.json(+21 -3)📝
packages/hoppscotch-desktop/src-tauri/Cargo.lock(+549 -60)📝
packages/hoppscotch-desktop/src-tauri/Cargo.toml(+13 -0)📝
packages/hoppscotch-desktop/src-tauri/build.rs(+17 -0)📝
packages/hoppscotch-desktop/src-tauri/tauri.conf.json(+1 -1)➕
packages/hoppscotch-desktop/src-tauri/tauri.portable.macos.conf.json(+62 -0)➕
packages/hoppscotch-desktop/src-tauri/tauri.portable.windows.conf.json(+60 -0)➕
packages/hoppscotch-desktop/src/kernel/index.ts(+13 -0)➕
packages/hoppscotch-desktop/src/kernel/io.ts(+34 -0)➕
packages/hoppscotch-desktop/src/kernel/relay.ts(+26 -0)➕
packages/hoppscotch-desktop/src/kernel/store.ts(+114 -0)➕
packages/hoppscotch-desktop/src/types/kernel.d.ts(+9 -0)📝
packages/hoppscotch-desktop/tsconfig.json(+6 -1)📝
packages/hoppscotch-desktop/vite.config.ts(+18 -17)📝
packages/hoppscotch-kernel/package.json(+1 -1)📝
pnpm-lock.yaml(+60 -36)📄 Description
This is first in a series of architectural overhauls for the Desktop app
to support portable and organizational instances, starting by
transitioning from legacy LazyStore-based data management to a common
kernel-unified persistence, cross-platform path management, automated
data migration, and other foundational portable mode support.
Closes FE-929
Closes FE-930
Closes FE-936
The desktop app right now has a rather fragmented data storage, direct
LazyStore usage throughout the codebase, and no unified system for
cross-platform path management.
Also lack of proper linting infrastructure that exists in
hoppscotch-commonorhoppscotch-selfhost-web, etc.This refactoring addresses these issues and also establishes some
patterns for future development; preparing the groundwork for portable
mode implementation.
This is a first in a series of foundational PRs so this one contains a
ton of inert code that establishes infrastructure patterns, but doesn't
actually do anything substantial from the get-go.
So the currently active code maintains full backward compatibility with
existing user data and workflows to be routed through the migration
systems in the subsequent phases.
Kernel Integration
Added foundational kernel integration that wraps existing platform calls with
unified operations across the app. Created desktop-specific
kernel modules in
src/kernel/includingindex.ts,io.ts,relay.ts, andstore.tsthat provide identical interfaces (as tohoppscotch-common'skerneldirectory') for IO ops, requests viaRelay, and data store ops.
The idea is to initialize kernel in
main.tswithinitKernel("desktop")but right now it shall remain inert.Added TypeScript definitions for kernel globals in
src/types/kernel.d.ts.The kernel modules currently wrap existing functionality and provide a
foundation for future platform-agnostic development without changing
external behavior.
Backward Compatibility: All existing functionality continues to work
unchanged. The kernel system provides wrappers around existing platform
calls without modifying external behavior. Rigth now this is inert.
ESLint Config / Linting Infra
Added ESLint setup in
.eslintrc.cjswith TypeScript andVue support, configured rules to prevent localStorage misuse, and added
specific restrictions on direct localStorage access to encourage proper
persistence patterns.
NOTE: This is pretty much identical to the ones in
hoppscotch-commonand
hoppscotch-web.Added linting scripts to
package.jsonincludinglint,lint:ts,lintfix, andprod-lintfor different development scenarios.Identical to what is already in
hoppscotch-selfhost-weborhoppscotch-common.Build Config Updates
Updated
package.jsonscripts andCargo.tomlfor portable modesupport with feature flags and proper feature gating. Updated
build.rsto handle different config files based on features and separated
portable and standard build commands.
Added new package scripts:
dev:portable,build:portable,prepare-web, and updated existing scripts for developmentworkflow. Created separate Tauri configuration file for portable
builds with appropriate bundling settings that disable automatic updater
artifacts for portable distributions.
Backward Compatibility: Standard build process remains identical.
Portable mode builds are new functionality that doesn't affect existing
build pipelines.
Notes to reviewers
This only introduces the foundation for subsequent changes, many of the
dependencies introduced here will remain inert. So testing should
verify data integrity in different user scenarios, cross-platform
functionality on Windows/macOS/Linux, resolution in CI and general data
storage + cleanup, and backward compatibility with existing user data
and workflows.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.