Flatten repo: move client/ contents to repo root
The project is no longer a monorepo/workspace - there is only a single
app package. Remove the redundant client/ nesting: all source, the
Capacitor Android project, config files and package.json/tsconfig now
live directly at the repo root.
- Merge client/package.json into root package.json (drop the
workspaces field and the now-unnecessary bun --cwd client wrappers).
- Merge client/bun.lock (the actual dependency lockfile) into the
root, replacing the stale workspace-only root lockfile.
- Move src/, public/, android/, index.html, vite.config.ts,
capacitor.config.ts, tsconfig.{app,node}.json to the repo root.
- Update Dockerfile.android to build from the repo root instead of
cd'ing into client/.
- Update .github/workflows/ci.yml type-check step to run bun run build
directly instead of bun --cwd client run build.
- Update README.md and .github/copilot-instructions.md to drop
references to the client/ subdirectory.
- Drop the stale server/downloads/ entry from .gitignore (leftover
from an old server-based architecture that no longer exists).
This commit is contained in:
@@ -8,46 +8,45 @@ for a self-hosted server variant; the current implementation is Android-only).
|
||||
|
||||
## Repository layout
|
||||
|
||||
- `client/` — SolidJS + Vite PWA/webview UI (workspace root's actual app code).
|
||||
- `src/api.ts` — all "business logic": scraping Ravensburger's search API/HTML
|
||||
for `.gme` download links, orchestrating download + sync, calling the
|
||||
native plugin.
|
||||
- `src/native/TiptoiPlugin.ts` + `src/native/DevPlugin.ts` — TypeScript
|
||||
interfaces for Capacitor native plugins (`registerPlugin`). Any change to
|
||||
the native Kotlin plugin's method signatures must be mirrored here.
|
||||
- `src/pages/` — `ScanPage.tsx` (barcode/text search) and
|
||||
`DownloadsPage.tsx` (library + pen sync UI).
|
||||
- `android/` — Capacitor Android project, **checked into the repo** (not
|
||||
generated on demand). `android/app/src/main/java/com/tiptoisync/app/`
|
||||
contains the actual native implementation:
|
||||
- `TiptoiPlugin.kt` — SAF (Storage Access Framework) directory picker for
|
||||
the pen, listing/copying/deleting `.gme` files on the pen, downloading
|
||||
GME/cover files into app-private storage via `HttpURLConnection`.
|
||||
- `DevPlugin.kt` — enables Capacitor live-reload against a Vite dev server
|
||||
(see `DEV_URL` below).
|
||||
This is a single SolidJS + Vite + Capacitor project (no monorepo/workspace) —
|
||||
all app code lives directly at the repo root.
|
||||
|
||||
- `src/api.ts` — all "business logic": scraping Ravensburger's search API/HTML
|
||||
for `.gme` download links, orchestrating download + sync, calling the
|
||||
native plugin.
|
||||
- `src/native/TiptoiPlugin.ts` + `src/native/DevPlugin.ts` — TypeScript
|
||||
interfaces for Capacitor native plugins (`registerPlugin`). Any change to
|
||||
the native Kotlin plugin's method signatures must be mirrored here.
|
||||
- `src/pages/` — `ScanPage.tsx` (barcode/text search) and
|
||||
`DownloadsPage.tsx` (library + pen sync UI).
|
||||
- `android/` — Capacitor Android project, **checked into the repo** (not
|
||||
generated on demand). `android/app/src/main/java/com/tiptoisync/app/`
|
||||
contains the actual native implementation:
|
||||
- `TiptoiPlugin.kt` — SAF (Storage Access Framework) directory picker for
|
||||
the pen, listing/copying/deleting `.gme` files on the pen, downloading
|
||||
GME/cover files into app-private storage via `HttpURLConnection`.
|
||||
- `DevPlugin.kt` — enables Capacitor live-reload against a Vite dev server
|
||||
(see `DEV_URL` below).
|
||||
- `Dockerfile.android`, `build-apk.sh` — reproducible APK build via
|
||||
Docker/Podman (no local Android SDK needed). Output APK lands in
|
||||
`apk-output/tiptoi-sync.apk`.
|
||||
|
||||
## Build & dev commands
|
||||
|
||||
Run from repo root (workspace uses `bun`):
|
||||
Run from repo root (uses `bun`):
|
||||
|
||||
```bash
|
||||
bun install # installs client workspace deps
|
||||
bun run dev # starts Vite dev server (client) with --host
|
||||
bun run build # tsc -b && vite build for client
|
||||
bun run cap:sync # copies web build into android/ project
|
||||
bun run cap:android # builds & runs on connected device/emulator
|
||||
bun install # installs deps
|
||||
bun run dev # starts Vite dev server with --host
|
||||
bun run build # tsc -b && vite build
|
||||
bun run cap:sync # copies web build into android/ project
|
||||
bun run cap:android # builds & runs on connected device/emulator
|
||||
```
|
||||
|
||||
Equivalent scripts also exist directly in `client/package.json` (`bun --cwd
|
||||
client run <script>` or `cd client && bun run <script>`).
|
||||
|
||||
There are no unit/integration tests or linters configured in this repo — only
|
||||
TypeScript's compiler (`tsc -b`, run as part of `build`) enforces correctness
|
||||
on the client. Validate client changes with `bun run build` from the repo
|
||||
root, or `cd client && bunx tsc -b --noEmit` for a faster type-only check.
|
||||
TypeScript's compiler (`tsc -b`, run as part of `build`) enforces correctness.
|
||||
Validate changes with `bun run build`, or `bunx tsc -b --noEmit` for a faster
|
||||
type-only check.
|
||||
|
||||
### Building the Android APK
|
||||
|
||||
@@ -65,7 +64,7 @@ Android SDK/Gradle install required. Result: `apk-output/tiptoi-sync.apk`.
|
||||
DEV_URL=http://<host-ip>:5173 bun run cap:android
|
||||
```
|
||||
|
||||
`client/capacitor.config.ts` reads `DEV_URL` and switches Capacitor's webview
|
||||
`capacitor.config.ts` reads `DEV_URL` and switches Capacitor's webview
|
||||
to load from the dev server (with `cleartext: true`) instead of the bundled
|
||||
`dist/` output. `DevPlugin.kt`/`DevPlugin.ts` support activating/deactivating
|
||||
this from within the running app (see `DevMenu.tsx`, triggered by 5 taps on
|
||||
|
||||
Reference in New Issue
Block a user