explaingit

nyraseithhh/ai-push

11Audience · developerComplexity · 4/5Setup · hard

TLDR

A step-by-step Chinese tutorial for building an AI companion that proactively sends push notifications to your phone, tracks which apps you're using via iOS Shortcuts, and holds persistent conversations stored on your own server.

Mindmap

mindmap
  root((ai-push))
    What it does
      Proactive AI messages
      Push notifications
      App activity tracking
    Components
      Node.js backend
      SQLite memory store
      Web Push notifications
    Client
      PWA chat web app
      iOS Shortcuts integration
      iPhone home screen
    Setup needs
      VPS with domain
      HTTPS cert
      AI API key
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build an AI companion that sends you unprompted check-in messages throughout the day based on your phone usage patterns.

USE CASE 2

Create a self-hosted AI notification system where all conversation data stays on your own VPS rather than a third-party server.

USE CASE 3

Use iOS Shortcuts to feed your current app activity into an AI so it can send context-aware messages, like noticing you opened Instagram late at night.

USE CASE 4

Learn how to combine a Node.js backend, Web Push, and a PWA to build a mobile-installable AI chat experience without a native app.

Tech stack

Node.jsSQLiteWeb PushnginxiOS ShortcutsDeepSeek API

Getting it running

Difficulty · hard Time to first run · 1day+

Requires a VPS with a domain name, HTTPS certificate, nginx, Node.js 20, and an AI API key, step-by-step tutorial is in Chinese.

No license information is provided in the repository.

In plain English

This repository contains a detailed Chinese-language tutorial for building a system where an AI character can proactively send messages to your phone, show lock-screen notifications, and observe which apps you are currently using. The concept is framed around an AI companion that reaches out on its own rather than waiting for you to start a conversation. The system has three main parts. The first is a backend server built with Node.js that runs on a personal VPS, which is a rented cloud machine. This server stores conversation history and memory in a SQLite database, connects to an external AI language model to generate messages, and sends push notifications to your phone using a web technology called Web Push. The second part is a simple chat web app that can be installed on an iPhone or Android home screen like an app, receives those push notifications, and shows the conversation. The third part uses iOS Shortcuts, a built-in iPhone automation feature, to silently report to the server each time you open a specific app. That information gets fed into the AI's context so it can reference your current activity when composing messages. For example, the tutorial shows how the system could detect that you opened a social media app late at night and send a notification commenting on it, or check in if you have not opened the chat for several hours. Setup requires a VPS with a domain name and HTTPS, Node.js 20, and access to an AI API. The tutorial recommends DeepSeek's chat model for its low cost. All conversation data stays on your own server. The README covers the database schema, server code structure, nginx configuration, iOS Shortcuts setup, and common pitfalls in step-by-step detail.

Copy-paste prompts

Prompt 1
I'm following the ai-push tutorial to build a proactive AI companion. Walk me through setting up the Node.js server on a VPS with nginx and HTTPS so it can send Web Push notifications to my iPhone.
Prompt 2
Show me how to use iOS Shortcuts to silently report which app I just opened to a Node.js backend, and how the server should store and use that context.
Prompt 3
I want to connect my ai-push backend to the DeepSeek API to generate proactive messages. Show me the API call structure and how to include conversation history from SQLite.
Prompt 4
How do I install a PWA chat web app on my iPhone home screen and configure it to receive Web Push notifications from my own Node.js server?
Open on GitHub → Explain another repo

← nyraseithhh on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.