Asteria is a cloneable personal channel companion bot for Slack. Fork this repository, create your own Slack app, and run an independent instance that posts Daily Updates, Daily Questions, and welcome messages to your own personal channel.
Designed to be hosted on Hack Club Nest. It runs as a plain Node.js process with Socket Mode (no public webhook URL needed) and persists everything to a SQLite file, so it fits perfectly on a Nest server.
Asteria manages one specific Slack channel: your personal channel. You write a Daily Update in App Home, optionally add a song and an event, and send it to the channel with a single button press. The update posts under your own name and avatar. Asteria can also generate a daily question with Hack Club AI, ping a Slack user group in the Daily Update, remind you if you have not posted by the deadline, and welcome people who join the channel.
- Daily Updates sent manually from App Home.
- Daily Updates appear in the personal channel under your own name and avatar.
- Markdown-friendly update text with links, mentions, bullets, and line breaks.
- Optional Song of the Day and Event of the Day fields.
- Slack user group mentions for the Daily Update ping.
- Optional thread starter reply after posting the Daily Update.
- AI-powered Daily Question generation with Hack Club AI.
- Fully editable AI prompt — write the exact prompt sent to the model, with no tags or variables.
- Daily Question scheduling in your timezone.
- Optional inclusion of the Daily Question inside the Daily Update.
- Asteria generates a fresh AI question every time a Daily Update is sent, even when the automatic Daily Question is disabled.
- Test the Daily Question: preview the output or send it to the channel.
- Daily Update reminder DM if you have not posted by the deadline (automatically retried until it is delivered).
- Welcomer messages when people join the configured personal channel.
- Optional rules Canvas link in welcome messages.
- App Home configuration with Daily Update, Daily Question, Welcomer, Sync, and Settings tabs.
- Owner-only configuration access with restricted views for everyone else.
- Two-way Todoist ⇄ Slack List sync: list additions become Todoist tasks, completing a Todoist task marks the list item done and posts a message.
- SQLite persistence for settings, drafts, send history, question history, reminder state, and welcome deduplication.
- Socket Mode operation with no public webhook server.
- Optional status RSS feed for your bot (great for a Nest uptime monitor).
- Node.js 20 or newer.
- A Slack workspace where you can create and install apps.
- A Slack app created from the manifest in this repository.
- A Slack Bot User OAuth Token.
- A Slack App-Level Token with the
connections:writescope. - A Hack Club AI API key.
- A valid Hack Club AI model name, such as
qwen/qwen3-32b. - A Hack Club Nest server (or any Debian-based server) to run it on.
-
Fork or copy this repository and clone it to your Nest server:
git clone <your-repository-url> cd asteria npm install cp .env.example .env
-
Create a Slack app from
manifest.json(see Slack App Setup) and fill in your tokens in.env. -
Start the bot and add it to your personal channel:
npm start
-
Open Asteria's App Home, and you are ready to configure everything from there.
- Open the Slack app manifest flow at https://api.slack.com/apps and create a new app from a manifest.
- Paste the contents of manifest.json into the manifest editor. Feel free to rename
Asteriato something else — the display name in App Home and chat is just a label. - Create the app in your workspace.
- Open the app's Basic Information page and enable Socket Mode.
- Create an App-Level Token with the
connections:writescope and copy it intoSLACK_APP_TOKEN. - Install the app to your workspace and copy the Bot User OAuth Token into
SLACK_BOT_TOKEN. - Copy your Slack user ID into
PERSONAL_CHANNEL_OWNER_ID. - Copy your personal channel ID into
PERSONAL_CHANNEL_ID. - Create or choose a Slack user group for the Daily Update ping and select it later in App Home.
- Add the bot to your personal channel (open the channel, go to Details → More → Add apps, and pick your app). The bot needs to be in the channel to post messages and fire the welcomer.
- Start Asteria.
If you change scopes in the manifest later, reinstall the app in Slack so the new scopes take effect.
| Variable | Required | Purpose | Default |
|---|---|---|---|
SLACK_BOT_TOKEN |
Yes | Bot token used for Web API calls and message posting. | None |
SLACK_APP_TOKEN |
Yes | App-level token used for Socket Mode. | None |
SLACK_SIGNING_SECRET |
Yes | Loaded for Bolt configuration consistency. | None |
PERSONAL_CHANNEL_OWNER_ID |
Yes | Slack user ID of the only person allowed to edit Asteria. | None |
PERSONAL_CHANNEL_ID |
Yes | The Slack channel Asteria manages. | None |
HACKCLUB_AI_KEY |
Yes | Hack Club AI API key. | None |
HACKCLUB_AI_MODEL |
No | Hack Club AI model to use for Daily Questions. | qwen/qwen3-32b |
HACKCLUB_AI_BASE_URL |
No | OpenAI-compatible Hack Club AI base URL. | https://ai.hackclub.com/proxy/v1 |
ASTERIA_DB_PATH |
No | Path to the SQLite database file. | ./data/asteria.sqlite |
ASTERIA_LOG_LEVEL |
No | Bolt log level. | info |
ASTERIA_POLL_INTERVAL_SECONDS |
No | How often the scheduler checks for due jobs. | 60 |
ASTERIA_STATUS_PORT |
No | Port for the optional status RSS server. | 8787 |
ASTERIA_STATUS_FILE |
No | Where the status server reads/writes events. | ./data/status-events.json |
ASTERIA_STATUS_URL |
No | Public base URL used in the status RSS feed. | http://localhost |
Asteria can two-way sync a Slack List with a Todoist project. Everything below is also configurable at runtime from the Sync tab in App Home, but these env vars provide the initial defaults on first boot.
| Variable | Required | Purpose | Default |
|---|---|---|---|
TODOIST_API_TOKEN |
No | Todoist REST API token (App Management, read/write scopes). | None |
TODOIST_SYNC_ENABLED |
No | Set true to enable the sync poller at startup. |
false |
SLACK_SYNC_LIST_ID |
No | ID of the Slack List to sync (from the list URL, e.g. F0C37D72NNM). |
None |
TODOIST_PROJECT_NAME |
No | Todoist project where synced tasks are created. | Public Slack To Do List |
SLACK_NOTIFICATION_CHANNEL_ID |
No | Channel that receives "Task Completed" messages from Todoist. | None |
TODOIST_SYNC_POLL_INTERVAL_SECONDS |
No | How often Asteria polls the Slack List for additions/changes. | 300 |
TODOIST_API_BASE_URL |
No | Todoist API root to use. | https://api.todoist.com/rest/v2 |
ASTERIA_WEBHOOK_PORT |
No | Local port for the webhook server (/webhooks/todoist). |
8792 |
TODOIST_WEBHOOK_SECRET |
No | HMAC secret used to verify Todoist webhook signatures. | None |
How it works:
- New items added to the Slack List are created as Todoist tasks (title, due date, and a
description noting who added them and when), under
TODOIST_PROJECT_NAME. - Unchecking/checking the list item's checkbox completes or reopens the matching Todoist task.
- When a Todoist task is marked complete, the Slack List checkbox is checked and a
Task Completed: <task> (originally added by <user>)message is posted toSLACK_NOTIFICATION_CHANNEL_ID. - Sync runs on the poll interval above; for instant completion messages, create a Todoist
webhook that POSTs to
https://<your-public-url>/webhooks/todoistand set the webhook's HMAC secret (under the webhook settings, "Secret" field) toTODOIST_WEBHOOK_SECRET. Asteria verifies theX-Todoist-Hmac-SHA256header on every request.
These webhook JSON payloads are signed with HMAC-SHA256 using your secret; requests without
a configured secret (or with an invalid signature) are rejected. The webhook server also
serves a /health endpoint.
npm startAsteria starts in Socket Mode and keeps running as a long-lived Node.js process.
Asteria is designed for a Hack Club Nest server. Nest servers are reachable at *.hackclub.app-style URLs (such as asteria.sammy.hackclub.app) and auto-forward traffic from your subdomain to a port of your choosing.
- Copy the repository to your Nest server (for example
~/asteriaor/opt/asteria). - Install Node.js 20 or newer.
- Create a dedicated user for the service (optional but recommended).
- Place the
.envfile somewhere safe and readable by that user. - Install dependencies with
npm install. - Start the app with
npm start, or install the systemd services below.
The SQLite database persists on disk at the path in ASTERIA_DB_PATH, so restarts do not wipe settings, drafts, or history.
This repository includes example unit files:
- deploy/asteria.service — the bot itself.
- deploy/asteria-status.service — the optional status RSS server.
Typical deployment steps:
-
Copy the units to
/etc/systemd/system/:sudo cp deploy/asteria.service deploy/asteria-status.service /etc/systemd/system/
-
Edit both units so
WorkingDirectory,EnvironmentFile,ExecStart,User, andGroupmatch your server. -
Reload systemd and start both services:
sudo systemctl daemon-reload sudo systemctl enable --now asteria sudo systemctl enable --now asteria-status
-
Check the logs with
journalctl -u asteria -f.
The main unit records an up/down event every time the bot starts or stops via scripts/record-status.js. Point your Nest subdomain at ASTERIA_STATUS_PORT (default 8787) and set ASTERIA_STATUS_URL to your public subdomain URL, then subscribe to /rss.xml in your uptime monitor of choice.
Open Asteria's App Home as the owner. The default tab is Daily Update.
- Write the day's update in the main text field.
- Optionally add a Song of the Day.
- Optionally add an Event of the Day.
- Optionally enable a thread starter reply and edit its text.
- Press Send Daily Update to post to the configured personal channel.
- The update is posted under your Slack display name and avatar using Slack's
chat.postMessage/chat:write.customizebehaviour. - A fresh AI question is generated each time you send, and is embedded in the update when the "Include in Daily Update" toggle is on. This happens even when the automatic Daily Question is disabled.
- Enable or disable the generated Daily Question.
- Write the AI prompt in the "AI prompt" field. This text is sent to the model exactly as written — there are no tags, placeholders, or injected topics. A sensible default is pre-filled; replace it with anything you like.
- Choose whether the question should also appear inside the Daily Update.
- Set the approximate send time in your timezone.
- Press Test Daily Question to generate a question now. You will be asked whether you want to preview the output (nothing is posted) or send it to the personal channel (it is posted and recorded).
- Enable or disable welcome messages.
- Edit the welcome text.
- Use
{user}where the new member mention should appear. - Add an optional rules Canvas URL.
- Set the bot name used when Asteria posts its own messages.
- Set the timezone using a valid IANA timezone such as
Europe/LondonorAmerica/New_York. - Configure the Daily Update reminder deadline.
- Pick the personal channel.
- Pick the Slack user group that the Daily Update should mention.
Only the Slack user ID in PERSONAL_CHANNEL_OWNER_ID can save these settings. Everyone else sees a restricted App Home view.
- Open Asteria's App Home.
- Write the Daily Update.
- Add an optional song and event.
- Press Send Daily Update.
- Asteria posts the message to your personal channel under your name and avatar and, if enabled, adds a thread reply. A fresh AI question is generated for every send and embedded when inclusion is enabled.
- If the automatic Daily Question is enabled, Asteria also posts it separately on its own schedule, using your AI prompt.
- If you have not posted by the reminder deadline, Asteria sends you a DM reminder (and retries if the send fails).
- If someone joins your personal channel, Asteria sends the configured welcome message.
When Daily Question inclusion is enabled, a freshly generated question is embedded inside the Daily Update. The Daily Question is also still posted separately on its own schedule when the automatic Daily Question is enabled.
Asteria only requests the scopes it actually uses:
chat:writefor posting Daily Updates, Daily Questions, reminders, and welcome messages.chat:write.customizefor posting the Daily Update with your name and avatar.users.profile:readfor reading your display name and avatar so the Daily Update can appear as you.channels:readandgroups:readfor loading the personal channel picker in App Home.im:writefor opening a DM channel to you and sending reminder DMs.usergroups:readfor loading Slack user groups into the App Home selector.
If you change the manifest scopes, reinstall the Slack app in your workspace.
Asteria uses the OpenAI-compatible Hack Club AI endpoint at https://ai.hackclub.com/proxy/v1 by default.
- The API key comes from
HACKCLUB_AI_KEY. - The model comes from
HACKCLUB_AI_MODEL. - The Daily Question generator runs on its own schedule and whenever a Daily Update is sent. Its prompt is the one you write in the Daily Question tab.
- Song of the Day, Event of the Day, and welcome text are always manually configured.
- Socket Mode not connecting: confirm
SLACK_APP_TOKEN,SLACK_BOT_TOKEN, andSLACK_SIGNING_SECRETare set, and make sure the app has Socket Mode enabled. - Bot not responding: confirm the bot was installed to the workspace and has the right scopes.
- Bot cannot post: add the bot to your personal channel (Details → More → Add apps).
- Daily Question not sending: check
daily_question_enabled, the send time, the timezone, and the Hack Club AI key/model. - User group not pinging: verify the selected Slack user group still exists and reinstall the app if scopes changed.
- Welcome message not firing: confirm the bot is in the personal channel and
welcomer_enabledis on. - Owner sees the restricted view: verify
PERSONAL_CHANNEL_OWNER_IDmatches the Slack user who is opening App Home. - AI errors: verify
HACKCLUB_AI_KEYandHACKCLUB_AI_MODEL, and check the server logs for the request failure. - Timezone issues: use a valid IANA timezone and save the setting again.
- Permissions or scope errors: reinstall the app after changing the manifest.
- Status feed is empty: confirm
asteria-statusis running,ASTERIA_STATUS_URLis your public URL, and your Nest subdomain points atASTERIA_STATUS_PORT.
- manifest.json — the Slack app manifest.
- .env.example — environment template.
- deploy/asteria.service — example systemd unit for the bot.
- deploy/asteria-status.service — example systemd unit for the status RSS server.
- scripts/record-status.js — records up/down events for the status feed.
- app.js — entry point.