Skip to content

Latest commit

 

History

History
122 lines (94 loc) · 3.55 KB

README.md

File metadata and controls

122 lines (94 loc) · 3.55 KB

Zuzugo 租租狗

logo

抓取 591 最新租屋資訊,並提供聊天機器人通知(可簡易的擴充)

Status page: https://zuzugo.instatus.com/

Screenshots

Line Notify Slack Bot
line-notify slack-bot

Roadmap

參見 GitHub Project

Development

  1. Clone 專案,然後
pnpm install
cp .env.example .env
  1. 更新 .env
SLACK_CLIENT_ID=
SLACK_CLIENT_SECRET=
SLACK_REDIRECT_URI=

# 開發可以先關掉
DISABLE_CRON=true

# 記得先 createdb zuzugo-dev
DATABASE_URL=postgres://postgres@localhost:5432/zuzugo-dev?schema=public
  1. Primsa 相關
pnpm prisma generate
pnpm prixma migrate deploy
# start the inngest dev server
pnpm inngest-dev

Previous Works

Misc:關於命名

  • 豬豬快租 -> zuzu.com.tw
  • bbgo -> BB 狗,雖然本專案沒有半行 Go...

yeah

Slack App setup

  1. Go https://api.slack.com/apps?new_app=1 to create a new app from manifest
  2. Use the following manifest (TBD)
{
    "display_information": {
        "name": "zuzugo"
    },
    "features": {
        "bot_user": {
            "display_name": "zuzugo",
            "always_online": true
        },
        "slash_commands": [
            {
                "command": "/zuzugo",
                "url": "https://your-zuzugo-domain/api/slack",
                "description": "zuzugo commands!",
                "should_escape": false
            }
        ]
    },
    "oauth_config": {
        "redirect_urls": [
            "https://your-zuzugo-domain/api/slack/oauth_redirect",
            "https://your-zuzugo-domain/api/auth/callback/slack"
        ],
        "scopes": {
            "bot": [
                "commands"
            ]
        }
    },
    "settings": {
        "org_deploy_enabled": false,
        "socket_mode_enabled": false,
        "token_rotation_enabled": false
    }
}
  1. Go to https://your-zuzugo-domain/api/slack/install
  2. Click Add to Slack channel, select the channel you want to receive the notification
  3. Finish Oauth login
  4. Check the database, you should see SlackAppInstallation table has a new record

License

MIT