Skip to content

Repository files navigation

tsync-server ✧*:

powering the tsync ecosystem with real-time device synchronization and remote orchestration.

NestJS MongoDB Redis Tailscale TypeScript


features

  • centralized orchestration: manage device statuses and configurations in one place.
  • real-time events: websocket-driven updates for instant device-to-client communication.
  • android remote control: integrated adb bridge for sending commands and screen interaction.
  • smart task scheduling: dynamic cron jobs for health checks, reminders, and data sync.
  • multi-channel alerts: notification dispatching via onesignal, ntfy, and telegram.
  • data persistence: robust mongodb storage for system logs, device history, and user data.

requirements

  • environment: node.js v18+ and pnpm/npm.
  • infrastructure:
    • mongodb instance (local or atlas).
    • redis server for pub/sub and caching.
    • adb setup for remote control features.
  • integrations:

environment setup

create a .env file in the root based on .env.example:

category variables
tailscale TAILNET_ID, TAILNET_API_KEY
database MONGO_URI, DB_NAME, REDIS_URL
notifications ONESIGNAL_APP_ID, ONESIGNAL_REST_KEY, NTFY_URL, NTFY_TOPIC
adb/remote HOST_IP, WOL_SERVICE_PORT
telegram TELEGRAM_API_ID, TELEGRAM_API_HASH, TELEGRAM_SESSION

project startup

  1. install dependencies

    pnpm install
    # or
    npm install
  2. generate telegram session (optional)

    npm run telegram:session
  3. launch development server

    npm run start:dev
  4. production build

    npm run build
    npm run start:prod

Note

this backend is designed specifically for the tsync client ecosystem. ensure your tailscale nodes are correctly configured for adb access.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages