logo
0
0
WeChat Login

personal-sync

Monorepo skeleton for the phase 1 personal sync project.

Workspace

  • apps/server: backend service
  • apps/web: web-first app for PC and H5, also reused by Electron renderer
  • apps/desktop: Electron shell, preload bridge, desktop-only runtime wiring
  • packages/shared: shared domain types
  • packages/api-contracts: HTTP and WebSocket contracts
  • packages/client-sdk: shared client access layer
  • packages/platform: shared runtime bridge abstraction for Web and Electron
  • packages/ui: shared UI primitives
  • packages/config: shared TypeScript config references

Next Steps

  1. Install dependencies with pnpm install
  2. Start the server with pnpm dev:server
  3. Start the web app with pnpm dev:web
  4. Implement contract schemas in packages/api-contracts
  5. Implement Prisma schema in apps/server/prisma
  6. Keep business traffic in packages/client-sdk over HTTP/WebSocket and isolate desktop-only abilities behind packages/platform

Docker

Build the integrated image:

docker build -t personal-sync .

Run it with the server env file and a mounted storage directory:

docker run --rm \ -p 3000:3000 \ --env-file .env \ -v "$(pwd)/apps/server/runtime-storage:/workspace/apps/server/runtime-storage" \ personal-sync

The container serves both frontend and backend on the same port:

  1. Requests to /api and /ws go to the server.
  2. Other routes are served by the built web app.

Local development stays unchanged: run pnpm dev:server and pnpm dev:web, and Vite will continue proxying /api and /ws to the local server.

About

个人同步助手

Language
TypeScript78.5%
Python13.4%
JavaScript6.4%
Shell0.9%
Others0.8%