PushDeer Documentation

repository·main·Indexed 26 days ago

https://github.com/easychen/pushdeer

PushDeer is an open-source push notification service (version 2.0.0) that supports both official online and self-hosted versions. It provides notifications via App Clips (iOS), native apps for iOS, macOS, and Android, and custom IoT devices such as ESP8266/ESP32. The Android client utilizes MiPush and supports Markdown rendering, image display, and text copying.

Tokens
22.2K
Snippets
58
Records
129
Agent score
90%

What's inside PushDeer

  1. Explore Alamofire component libraries

    main

    To keep the core library focused, additional functionality is provided via separate component libraries:

    • AlamofireImage: Includes image response serializers, UIImage and UIImageView extensions, custom image filters, an auto-purging in-memory cache, and a priority-based image downloading system.
    • AlamofireNetworkActivityIndicator: Controls the visibility of the network activity indicator on iOS, featuring configurable delay timers to mitigate flicker and support for URLSession instances not managed by Alamofire.
  2. Key Features of gorush

    main

    gorush provides several advanced features for notification management:

    • Multi-platform support: APNS, FCM, and HMS.
    • Flexible Configuration: Supports YAML configuration.
    • Scalability: Supports notification queues with multiple workers and various backends like NSQ, NATS, or Redis.
    • Reliability: Supports retrying failed notifications and graceful shutdown.
    • Observability: Exposes Prometheus metrics and system statistics via /sys/stats.
    • Storage Options: App statistics can be stored in memory, Redis, BoltDB, BuntDB, LevelDB, or BadgerDB.
    • Deployment: Ready for Docker, Kubernetes, and AWS Lambda.
  3. PushDeer for Android Overview

    main

    PushDeer for Android is a client application designed to receive and manage push notifications. It supports features such as message lists, device/key management, and Markdown rendering.

    Note: The official Android version may experience issues with interface permissions. The project is currently not actively maintained. For reliable service, it is recommended to use ServerChan³.

  4. Hardware options for DeerESP IOT devices

    main

    DeerESP is an extension of PushDeer for IOT, using ESP8266/ESP32 chips to push messages to smart devices via MQTT. There are four main ways to obtain the hardware:

    1. Pre-assembled (Option 1): Fully assembled with a 3D-printed case (~60 RMB).
    2. DIY Kit (Option 2): Unsoldered components with a 3D-printed case (~50 RMB).
    3. Open Source PCB (Option 3): Self-printed PCB and components via open-source hardware designs (~25 RMB).
    4. Basic Components (Option 4): Direct purchase of an 8266 development board, screen, and buzzer for manual wiring (~35 RMB).

    Option 1 and 4 require no soldering, while 2 and 3 require soldering skills.

  5. Configure iOS Push Notifications

    main

    If you are using the self-hosted version of the iOS client, you must configure push certificates:

    1. Navigate to the push directory.
    2. Rename *.yml.sample files to *.yml.
    3. Configure ios.yml for the main App and clip.yml for the Clip functionality.
    4. Ensure the production value is set correctly based on your deployment state.
    5. By default, the configuration expects c.p12 for the App certificate and cc.p12 for the Clip certificate.
  6. Run gorush web server

    main

    gorush can run as a web server to handle incoming requests. It defaults to port 8088.

    Start the server

    Ensure a config.yml file exists before running.

    # Start with default config
    gorush
    
    # Start with a custom config file
    gorush -c config.yml

    Check API server status

    You can check the status of the API server using httpie:

    http -v --verify=no --json GET http://localhost:8088/api/stat/go
    # for default config
    $ gorush
    # for custom config file
    $ gorush -c config.yml
  7. Set up PushDeer development environment

    main

    To run a self-hosted instance of the PushDeer API, follow these steps:

    1. Clone the repository:
      git clone https://github.com/easychen/pushdeer.git
    2. Start the API using Docker: Run docker-compose up -d from the repository root. The API will be accessible at http://127.0.0.1:8800 by default. You can modify the port in the docker-compose.yml file.
    git clone https://github.com/easychen/pushdeer.git
    docker-compose up -d