8000 The Big Peerbit Transition by Zorlin · Pull Request #68 · riffcc/flagship · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

The Big Peerbit Transition #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 171 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
5e81801
Add PeerBit adapter to replace Orbiter Core
devin-ai-integration[bot] May 14, 2025
8a2e49b
Update pnpm-lock.yaml to match package.json
devin-ai-integration[bot] May 14, 2025
5a754bf
fix: Add mocks for import.meta.env and utils-ipa in main tests
Zorlin May 14, 2025
51be25c
build: Add better-sqlite3 to peerDependenciesMeta
Zorlin May 14, 2025
95caa7e
refactor: Remove constl dependencies and code
Zorlin May 14, 2025
7a84765
refactor: Remove Constellation test utilities
Zorlin May 14, 2025
9a74d5b
fix: Remove constellation references from index
Zorlin May 14, 2025
17b8ae1
fix: Remove @constl/vue usage in appBar, use computed
Zorlin May 14, 2025
40d5d11
fix: Replace @constl/vue reactivity with vue computed
Zorlin May 14, 2025
3214c18
refactor: Refactor account page data fetching
Zorlin May 14, 2025
468cabf
fix: Remove @constl/vue dependency from content categories store
Zorlin May 14, 2025
3c9050b
refactor: Refactor releases store: remove @constl/vue, use refs
Zorlin May 14, 2025
2682cf9
fix: Refactor profile pic reactivity, remove @constl/vue
Zorlin May 14, 2025
8d92902
fix: Update account ID reactivity in menu
Zorlin May 14, 2025
9437f8a
refactor: Remove constl dependencies and refactor trusted sites logic
Zorlin May 14, 2025
28ac39e
refactor: Refactor test utils, rename to English, fix e2e errors
Zorlin May 14, 2025
b70bbd8
chore: Remove constl-ipa-fork dependency
Zorlin May 14, 2025
60b4770
test: Remove Electron dependency from e2e tests
Zorlin May 14, 2025
d2fdae4
test: Correct browser variable in e2e test utils
Zorlin May 14, 2025
87b3559
fix: Correct path to index.html in e2e tests
Zorlin May 14, 2025
ffa4410
feat: Start local Peerbit node for testing releases
Zorlin May 14, 2025
6b12342
fix: Configure vite ssr for main tests
Zorlin May 14, 2025
e54eb53
fix: Update helia/json and inline deps for vitest
Zorlin May 14, 2025
766f768
fix: Update peerbit import and vite test config
Zorlin May 14, 2025
ea26bf9
fix: Conditionally attach app quit listener for tests
Zorlin May 14, 2025
2e86c31
fix: Update Peerbit node initialization
Zorlin May 14, 2025
c6204c2
chore: Update Peerbit dependencies
Zorlin May 14, 2025
f64ec0c
build: update peerbit server version
Zorlin May 14, 2025
b3a3732
fix: Use Peerbit.create and Program for node init
Zorlin May 14, 2025
d88ec07
fix: Update Peerbit to 4.1.36 and fix Vite test config
Zorlin May 14, 2025
1dc46a9
fix: Use regex for workspace package in Vite test config
Zorlin May 14, 2025
6bb7ade
refactor: Remove peerbit-adapter and integrate directly
Zorlin May 14, 2025
b7ca27e
fix: Enable decorator metadata for borsh
Zorlin May 14, 2025
a570188
fix: Exclude native modules from Vitest processing
Zorlin May 14, 2025
1047014
fix: Move test deps external config to server block
Zorlin May 14, 2025
e0d7c45
fix: Exclude better-sqlite3 from test SSR optimization
Zorlin May 14, 2025
bf862e3
test: Mock peerbit node in unit tests
Zorlin May 14, 2025
1ad7156
feat: Implement Peerbit release creation
Zorlin May 14, 2025
261a64f
fix: Mock contextBridge and ipcRenderer.invoke in preload tests
Zorlin May 14, 2025
f66dc94
fix: Use Peerbit for release form submission and fix duplicate var
Zorlin May 14, 2025
51d2c89
Clear up old PBadapter crap
Zorlin May 14, 2025
ebacff6
feat: Add Peerbit addRelease IPC and E2E test
Zorlin May 14, 2025
2c98a38
test: Add logging to preload and E2E test for debugging API availability
Zorlin May 14, 2025
b170625
fix: Allow unsafe-eval in CSP for E2E tests
Zorlin May 14, 2025
6b7b0b8
test: Add logging for E2E CSP and preload script debugging
Zorlin May 14, 2025
c61c585
fix: Handle mock web prefs and relax CSP for tests
Zorlin May 14, 2025
d27194c
Cleanup
Zorlin May 14, 2025
8589d5f
update: dont initialize libp2p as external
benya7 May 14, 2025
c93d50d
format
benya7 May 14, 2025
bf6fbd9
Commit current workspace
Zorlin May 14, 2025
c16d155
Remove duplicate .env
Zorlin May 14, 2025
8c8c31f
passing tests
Zorlin May 14, 2025
5636ec7
FFS
Zorlin May 14, 2025
012f6ce
update: tsconfig.json
benya7 May 15, 2025
59d3e10
add: initial site DB schema
benya7 May 15, 2025
68b6704
update: add IndexableRelease
benya7 May 15, 2025
e1b3e5b
fix: admin value
benya7 May 15, 2025
72fb642
update: set replicate factor to 1
benya7 May 15, 2025
351f865
format
benya7 May 15, 2025
2c5a8a4
update: package.json
benya7 May 15, 2025
cd54ba8
Working tests
Zorlin May 15, 2025
4ede654
Fix utils
Zorlin May 15, 2025
c6d2f11
Add missing file
Zorlin May 15, 2025
14eec66
Semi-working peerbit!
Zorlin May 15, 2025
e6cf6b9
Semi-working homepage
Zorlin May 15, 2025
c4cf04b
Testing testing testing
Zorlin May 15, 2025
fa0d5b5
Force
Zorlin May 15, 2025
fe62778
update: refactor & clean
benya7 May 15, 2025
b53c154
feat: prefetch Peerbit releases before Vue app mounts to reduce FOUC
Zorlin May 15, 2025
23b0b30
perf: Parallelize peerbit dialing and remove redundant fetch
Zorlin May 15, 2025
5f2dceb
refactor: Move Peerbit test to run after app mount
Zorlin May 15, 2025
ecdd94f
fix: Render UI while waiting for Peerbit service
Zorlin May 15, 2025
036a803
refactor: Refactor Peerbit plugin for async init and reactive service
Zorlin May 15, 2025
daeba84
refactor: Defer Peerbit service init to onMounted
Zorlin May 15, 2025
ff2e3a1
fix: Correctly access async Peerbit service in releases store
Zorlin May 15, 2025
d6318bb
fix: ensure release upload triggers even when no releases found by se…
Zorlin May 15, 2025
18a8dc1
Working uploads
Zorlin May 16, 2025
129c59d
Typo fixes, cleanup
Zorlin May 16, 2025
d852798
update: send ready correctly && add did-finish-load event handler
benya7 May 16, 2025
05b9971
Fix up Account page, add ACL example programs
Zorlin May 16, 2025
84a1f52
Silly IAC stuff
Zorlin May 16, 2025
6220b43
update: clean & improvements
benya7 May 16, 2025
ebd4eb5
update: improve site args
benya7 May 16, 2025
7210100
fix: site.getRelease return type
benya7 May 16, 2025
c19ba47
add: build command for lib
benya7 May 16, 2025
2576296
remove unsuded packages
benya7 May 16, 2025
32aaf55
feat: add @lib test and ACLs
benya7 May 16, 2025
9b8dbea
feat: export AccountType enum in schema.ts for accountPage.vue import
Zorlin May 16, 2025
eaffbd3
update: deep clean
benya7 May 18, 2025
58a77c0
add: peerbit vite plugin
benya7 May 18, 2025
d79d931
fix: missing utils deps
benya7 May 18, 2025
fd19787
feat: add @riffcc/lens-sdk
benya7 May 18, 2025
8718b07
update: more clean & pass typecheck
benya7 May 18, 2025
a787655
chore: bump @riffcc/lens-sdk version
benya7 May 19, 2025
ea7f320
update: init and open on mounted app
benya7 May 19, 2025
72f6470
update: watch:web command
benya7 May 19, 2025
863e315
fix: compile:web command
benya7 May 19, 2025
d31f722
chore: bump @riffcc/lens-sdk version
benya7 May 20, 2025
e313401
update: lens service initialization
benya7 May 20, 2025
4c08dd2
fix: temp solution for development
benya7 May 20, 2025
e373de0
update: remove pinia, add tanstack query & improvements
benya7 May 20, 2025
13e7bce
clean
benya7 May 20, 2025
ac50a81
fix: minnors
benya7 May 20, 2025
251f8d9
fix: call loadFonts at plugin installation
benya7 May 21, 2025
b2d7d3f
update: move all queries/mutations to lens service hooks; renamed sta… 10000
benya7 May 21, 2025
02a2182
add: use copy to clipboard for pk & peerId
benya7 May 21, 2025
4f4de92
fix: navbar redering based on account status
benya7 May 21, 2025
2f3f815
chore: bump @riffcc/lens-sdk version
benya7 May 21, 2025
ce03aad
update: improvements && add hooks for admin operations
benya7 May 21, 2025
d15d48a
update: dependencies
benya7 May 21, 2025
a0c0791
fix: remove peerbit vite plugin
benya7 May 21, 2025
e5138b9
Prepare for Peerbit defederation
Zorlin May 22, 2025
0372341
Add luxon dependency and types.
Sphirye May 22, 2025
ba6bd06
Reformat "formatTime" method to use Luxon Duration interface over uti…
Sphirye May 22, 2025
0a40670
Conditionally show or hide hours from formatted time over utils.ts
Sphirye May 22, 2025
bc06a35
Merge pull request #61 from riffcc/60-video-player-component-duration…
Zorlin May 22, 2025
1565c6a
add: initial data & refech interval to accountStatus query
benya7 May 22, 2025
0b959cb
chore: bump @riffcc/lens-sdk version
benya7 May 22, 2025
6a83630
add: new replication args logic
benya7 May 22, 2025
75b0f8b
Add missing slash "/" to admin router button on appBar.vue
Sphirye May 22, 2025
8e50dab
Merge pull request #63 from riffcc/62-header-the-admin-button-sometim…
Zorlin May 23, 2025
555455e
chore: bump @riffcc/lens-sdk version
benya7 May 23, 2025
fe6cdd3
update: site args
benya7 May 23, 2025
04c85b6
fix: temp solution to make replication works for members and guests
benya7 May 23, 2025
a81bc21
fix: ensure that end featured dialog is not opened on mounted
benya7 May 23, 2025
1f12964
fix: release metadata parsing
benya7 May 23, 2025
6604bbe
Fix formatTime method falsely checking the hours value.
Sphirye May 24, 2025
664d459
Merge pull request #65 from riffcc/64-the-playback-current-timer-form…
Zorlin May 24, 2025
2b7728f
fix: persist advanced options when editing release by initializing me…
Zorlin May 24, 2025
a84e8ee
Experimental speed enhancements
Zorlin May 24, 2025
8dc231c
Fix whitescreen
Zorlin May 24, 2025
c157b00
Fix whitescreen
Zorlin May 24, 2025
5fce02f
Switch to mdi Vue package instead of Woff
Zorlin May 24, 2025
406cd57
Add MDI icons
Zorlin May 24, 2025
03010fe
Update site address
Zorlin May 24, 2025
37339e0
MDI fixes
Zorlin May 24, 2025
576f8eb
Linting fixes
Zorlin May 24, 2025
617dfde
Stop French translation warning
Zorlin May 24, 2025
2ca9a1c
Probably a garbage commit sorry
Zorlin May 24, 2025
076b2c7
Add benchmarks
Zorlin May 24, 2025
af8ae74
Loading stuff
Zorlin May 25, 2025
11f82f9
Update lens sdk
Zorlin May 25, 2025
adbdbc2
Update lens SDK further
Zorlin May 25, 2025
0e52c5f
update: material-desing icons package
benya7 May 25, 2025
652f8b3
update: dependencies
benya7 May 25, 2025
f6131a1
update: vite config
benya7 May 25, 2025
eb6e299
fix: temp solution for lens service not initialized error
benya7 May 25, 2025
c9be70e
update: optimize icons
benya7 May 25, 2025
740d23e
update: include only the needed node polyfills
benya7 May 25, 2025
548d6e5
update: add delete release & improve edit release
benya7 May 25, 2025
f515896
update: remove static stuff
benya7 May 25, 2025
4905ad0
chore: bump @riffcc/lens-sdk version
benya7 May 25, 2025
34a6a44
Update behaviour
Zorlin May 25, 2025
760bc66
I have no idea if this will even...
Zorlin May 25, 2025
f395693
Updates for accounts
Zorlin May 25, 2025
dff032c
Add timing
Zorlin May 25, 2025
c961592
Submodule updates
Zorlin May 25, 2025
2b7c61d
Update env, packages
Zorlin May 26, 2025
f680a8d
Bump SDK submodule
Zorlin May 26, 2025
64df96e
Use SDK 0.1.18
Zorlin May 26, 2025
99af310
Add Dockerfile for building cloud-deployable Riff
Zorlin May 26, 2025
eb2f732
[WIP EPIC] Featured rewrite, maintenance, infinite scroll releases
Zorlin May 26, 2025
663a97c
Half broken admin panel
Zorlin May 26, 2025
08d0ccd
[WIP EPIC] Featured rewrite, maintenance, infinite scroll releases
Zorlin May 26, 2025
e9f83a5
chore: bump @riffcc/lens-sdk version
benya7 May 26, 2025
2fa16c6
add: script to update peerbit vendors
benya7 May 26, 2025
a113ea9
Defederation prep
Zorlin May 26, 2025
2059a11
Version
Zorlin May 26, 2025
37ac739
Version
Zorlin May 26, 2025
f7f9fcf
Version
Zorlin May 26, 2025
90153ad
New siteID for pb.riff.cc
Zorlin May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"permissions": {
"allow": [
"Bash(docker build:*)",
"Bash(pnpm test:*)",
"Bash(grep:*)",
"WebFetch(domain:deepwiki.com)",
"Bash(grep:*)",
"Bash(rg:*)",
"Bash(pnpm build:*)",
"Bash(rm:*)",
"Bash(find:*)",
"Bash(ls:*)",
"Bash(pnpm build:*)",
"Bash(pnpm run lint:*)",
"WebFetch(domain:opencollective.com)",
"Bash(pnpm i:*)",
"Bash(pnpm typecheck:*)"
],
"deny": []
}
}
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
.git
dist
*.log
.DS_Store
packages/*/dist
packages/*/node_modules
test-results
playwright_launch_log.txt
buildResources
.electron-builder.config.cjs
1 change: 1 addition & 0 deletions .electron-vendors.cache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"chrome":"132","node":"20"}
33 changes: 2 additions & 31 deletions .env
Original file line number Diff line number Diff line change
@@ -1,31 +1,2 @@
# The address below should be regenerated for each Orbiter site. If you are setting up an independent site, erase the value below and run the site in development mode (`pnpm dev`) to automatically regenerate.
VITE_SITE_ID=/orbitdb/zdpuAp66YpDp94g7JTa4HEebKSzwR3nvnkagTPecZukQVkibJ

VITE_BOOTSTRAPPERS=lens.orbiter.riff.cc

# These should ideally stay the same for all Orbiter sites. Changing these will create a parallel network and thereby keep your lens from syncing and interacting with the main network.

VITE_TRUSTED_SITES_SITE_ID_VAR_ID=/orbitdb/zdpuB2wkkeLz6ydHKpsS77vDNRHbasD8JYExS9hY4jBVZqKkf
VITE_TRUSTED_SITES_NAME_VAR_ID=/orbitdb/zdpuArhaMLFcttwWrd5RuHgfS4tV9GcitBKcNwarvQLr9VDFi
VITE_FEATURED_RELEASES_RELEASE_ID_VAR_ID=/orbitdb/zdpuAuoH7hoTZvBuAxG667k5YMSZaCQXU8Y88CoRG57vjZLaZ
VITE_FEATURED_RELEASES_START_TIME_VAR_ID=/orbitdb/zdpuArQnMwqU1jN9eZ9J6k8H1euLRF67qVkeWjU9NBTAf4HLQ
VITE_FEATURED_RELEASES_END_TIME_VAR_ID=/orbitdb/zdpuArhQVb8NYLXu8oyEbKZmdwGmPWXACxrYBR49zGkGyo2NV
VITE_FEATURED_RELEASES_PROMOTED_VAR_ID=/orbitdb/zdpuAzjr3v1PjM33JUp7NJpKtYMNeYQJwiR5K3REKeSCMoegq
VITE_BLOCKED_RELEASES_RELEASE_ID_VAR_ID=/orbitdb/zdpuAkyAA7XiPurjxZ39b2s5Vt57Z5dqnr6TSgMap5wP1qYBi
VITE_CONTENT_CATEGORIES_CATEGORY_ID_VAR_ID=/orbitdb/zdpuAtrNCjNSKf8hBM6rrqC4prVvsNph3Wt7E4Y2W8pFvGDXx
VITE_CONTENT_CATEGORIES_DISPLAY_NAME_VAR_ID=/orbitdb/zdpuAzKVn6Ep8feK8uCtu9GFJGPK2Z3mEmPcg2STKAuGEsKdz
VITE_CONTENT_CATEGORIES_FEATURED_VAR_ID=/orbitdb/zdpuAwmgAbZLeGke6Gaf4tiyw5Rk863nv9BNuwrcezWSKWY7J
VITE_CONTENT_CATEGORIES_METADATA_SCHEMA_VAR_ID=/orbitdb/zdpuAnJewUq9HZwExebbauea47Fw2v5JWtxhVufn3UZZBhTsW
VITE_RELEASES_FILE_VAR_ID=/orbitdb/zdpuAopp994ERCjk8Gb8D6m1kqSk5RoW9mq1Xsb9yogqgdGcX
VITE_RELEASES_AUTHOR_VAR_ID=/orbitdb/zdpuAwK1RDcoYe9XxN7G3eohtC6xrquybseqNUqsJMuMA1gKN
VITE_RELEASES_CONTENT_NAME_VAR_ID=/orbitdb/zdpuB1DGtFGEJDVNzxQuVzixjzT3MNH2cpxqBZBcVgDXVt17j
VITE_RELEASES_THUMBNAIL_VAR_ID=/orbitdb/zdpuAxWrRcBpPYkmBXr7XQLVB721ZbBomncpKf7UMrGgVxqau
VITE_RELEASES_COVER_VAR_ID=/orbitdb/zdpuAx9oHfCHQ4AuMGjACVi9nze5wfKDW9h6NzXVyfv1ZV93t
VITE_RELEASES_METADATA_VAR_ID=/orbitdb/zdpuAwPUmxyTjE26e4LLMNFtnQvaaUeVyQczS2GQjX6MaWzXu
VITE_RELEASES_CATEGORY_VAR_ID=/orbitdb/zdpuArKo58rLT9WawJScfBMh83H68UXrgdVC2FCvwCZVqJ7fA
VITE_COLLECTIONS_AUTHOR_VAR_ID=/orbitdb/zdpuAvM6HdN4tRWMTC2Gyqx9WhgiT3xap2N3cK5JLQUqrxeLS
VITE_COLLECTIONS_METADATA_VAR_ID=/orbitdb/zdpuAuScb292oiKL8DZsdPcQieFbUo64Nz8UMy8W2r6omv6f3
VITE_COLLECTIONS_NAME_VAR_ID=/orbitdb/zdpuB29yexzEQ8xjFHWU5WPnGsR74cNVHRyp2ynKHFLr3ycsh
VITE_COLLECTIONS_THUMBNAIL_VAR_ID=/orbitdb/zdpuAv4xkPWt2sy8uRRsyqvUK18nkJgR23MbEd85FRbtiG73k
VITE_COLLECTIONS_RELEASES_VAR_ID=/orbitdb/zdpuAt2rnT1gYeQxgVcL6B35k7c7JEWWUTtNTQ8xxous6a13N
VITE_COLLECTIONS_CATEGORY_VAR_ID=/orbitdb/zdpuAvAND67Sjsc2csTnJZEdJ5xURyT79PpB5gWX6fVjixvak
VITE_SITE_ADDRESS=zb2rhZybiAQ6sAK3yKp86kkmYNijwzn4sKKwHyCEH6zPQ7q2R
VITE_BOOTSTRAPPERS=/dns4/pblens.riff.cc/tcp/4003/wss/p2p/12D3KooWGGGHrH3hXEtLP4gtt7QDT5gBAWP3ncUMgWgnV2M9Ekvh,/dns4/4032881a26640025f9a4253104b7aaf6d4b55599.peerchecker.com/tcp/4003/wss/p2p/12D3KooWPYWLY5E7w1SyPJ18y77Wsyfo1fEJcwRonKNPxPam3teJ,/dns4/65da3760cb3fd2926532310b0650ddca4f88ebd5.peerchecker.com/tcp/4003/wss/p2p/12D3KooWMQTwyWnvKyFPjs72bbrDMUDM7pmtF328X7iTfWws3A18
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@ thumbs.db
orbite
sfip
stockageLocal
.env
.env
.env
.env
.env
.env
.env
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "lens-sdk"]
path = lens-sdk
url = git@github.com:riffcc/lens-sdk.git
[submodule "lens-node"]
path = lens-node
url = git@github.com:riffcc/lens-node.git
65 changes: 0 additions & 65 deletions .idea/codeStyles/Project.xml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

28 changes: 0 additions & 28 deletions .idea/deployment.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/jsLibraryMappings.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/jsLinters/eslint.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/prettier.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

19 changes: 0 additions & 19 deletions .idea/vite-electron-builder.iml

This file was deleted.

14 changes: 0 additions & 14 deletions .idea/webResources.xml

This file was deleted.

95 changes: 95 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

Flagship is Riff.CC's decentralized media platform for watching, sharing, and curating legally free content. It uses peer-to-peer technology with PeerBit for metadata and IPFS for content/data distribution, and can run as both an Electron desktop app and a web application.

## Key Commands

### Development
- `pnpm install` - Install dependencies (uses pnpm workspaces)
- `pnpm watch` - Run Electron app in development mode
- `pnpm watch:web` - Run web version with hot reload (port 5175)
- `pnpm watch:web:stub` - Run web version with stub data

### Building
- `pnpm build` - Build all packages (main, preload, renderer)
- `pnpm compile` - Build Electron app for distribution
- `pnpm compile:web` - Build web version for production

### Testing
- `pnpm test` - Run all tests
- `pnpm test:e2e` - Run E2E tests with Playwright
- `pnpm test:main` - Test main process
- `pnpm test:preload` - Test preload scripts
- `pnpm test:renderer` - Test renderer/frontend
- Run single test: `pnpm test -- path/to/test.spec.ts`

### Code Quality
- `pnpm lint` - Run ESLint
- `pnpm format` - Format code with Prettier
- `pnpm typecheck` - TypeScript type checking for all packages

## High-Level Architecture

### Monorepo Structure
- `/packages/main/` - Electron main process (system operations, window management)
- `/packages/preload/` - Secure bridge between main and renderer processes
- `/packages/renderer/` - Vue 3 SPA (works in both Electron and web)

### Technology Stack
- **Frontend**: Vue 3 + TypeScript + Vuetify 3
- **State Management**: TanStack Query (Vue Query) + Vue Composables
- **Build Tool**: Vite with multiple plugins
- **P2P Layer**: PeerBit (metadata) and IPFS (content/data)
- **Desktop**: Electron v34

### Key Architectural Patterns

1. **Service Layer Abstraction**
- `LensService` provides core functionality with two implementations:
- Browser implementation for web builds
- Electron implementation using IPC for desktop
- Service is injected as Vue plugin and accessed via composables

2. **State Management**
- No traditional store (Vuex/Pinia)
- Async state handled by TanStack Query
- Local state managed through Vue Composables in `/packages/renderer/src/composables/`

3. **Dual Build Support**
- Single codebase supports both Electron and web builds
- Environment variables control build targets
- Service layer abstracts platform differences

4. **Component Organization**
```
packages/renderer/src/components/
├── account/ - Authentication and user profile
├── admin/ - Admin panel components
├── home/ - Homepage sections
├── layout/ - App shell (header, footer)
├── misc/ - Shared utilities
└── releases/ - Media players and content UI
```

5. **Routing Structure**
- `/` - Homepage with featured content
- `/release/:id` - Individual release pages
- `/admin` - Content management
- `/upload` - Content upload interface

### Critical Entry Points
- Main process: `/packages/main/src/index.ts`
- Renderer: `/packages/renderer/src/index.ts`
- App root: `/packages/renderer/src/App.vue`
- Service integration: `/packages/renderer/src/plugins/lensService/`

### Development Notes
- The project uses pnpm workspaces for dependency management
- Hot module replacement is configured for rapid development
- TypeScript is used throughout for type safety
- Vite configs in each package control build behavior
- Content is distributed via P2P network with configurable replication factors
Loading
Loading
0