Welcome to the Astronomy on Bluesky development team! 🎉
This guide is your starting point for getting up to speed with the project. It provides all the resources, tools, and information you need to hit the ground running.
System Architecture:
Follow these steps to get started:
- Request Access: Ensure you have access to the required resources.
- Bluesky account
- Added to github Astronomy on Bluesky org
- Added to Bluesky Devs Discord
- Set Up Your Environment: Follow the Development Environment Setup instructions to configure your local machine.
- Explore the Codebase: Start with the Repository Structure section for an overview of the code organization.
- Start Your First Task: Pick a First Task to familiarize yourself with the project and workflow.
1. Install the uv python package manager:
curl -LsSf https://astral.sh/uv/install.sh | sh2. Clone the repository you'd like to work on - either with git:
git clone <repo_url>or the GitHub CLI:
gh repo clone bluesky-astronomy/<repo_name>3. Navigate into the repo and initialize a virtual environment with uv:
uv sync4. Install & start PostgreSQL
Many services require a running PostgreSQL development database to run locally. Detailed instructions are in this file. We also recommend installing pgAdmin to make managing local databases much easier.
Make sure to start the PostgreSQL image every time you work on the project with sudo docker start AstroskyDB.
You will also need to download a copy of the development database - for now: ask Emily. (As of December 2025, we're hoping to improve this step soon - sorry!)
Once you download the dev database, you can load it to your (running) Docker container with
psql -h localhost -U postgres devdb < devdb.sqlreplacing -U with your user (if changed) assuming that you have a PostgreSQL client installed on your system. (There may also be a way to do this step with pgAdmin.)
5. Set up relevant environment variables
Required environment variables for each project are/will be documented in the readme file of every repository.
Note
To work with a repository that requires setting the BLUESKY_DATABASE environment variable, you'll need to download the development copy of the database. We're in the process of updating how this gets shared and downloaded (December 2025); for now, please ask Emily for a copy.
As a hint, you could use a setup like
ASTROFEED_PRODUCTION=0
ASTROFEED_POSTGRES=0
BLUESKY_DATABASE="postgres://<your_db_username>:<your_db_password>@localhost:5432/<your_db_name>?ssl-mode=REQUIRED"
DEBUG_ENABLED=11. Install npm
We recommend first installing nvm to manage node.js installs. Then, install the latest LTS release of npm with
nvm install --ltsnvm use --lts2. Install required dependencies
Instructions may depend on the project, but this is usually as simple as doing npm install in the folder.
3. Start development server
The following npm commands are useful:
npm run dev: runs a development copy of the server locally.npm run build: performs a test build of the site/app. Useful to test build pipeline.npm run preview: previews the site/app locally from build artifacts. Useful to test build pipeline.
Note
Some parts of the website require connection to the Flask backend. By default, in dev mode, the website is configured to connect to a locally running Flask server. You will need to go through the Python setup steps above, get a dev database running, set the dev environment variable, and then do ./run_server in the astronomy-feeds folder to start a Flask server. (See this guide).
The Astronomy on Bluesky project consists of the following (main) repositories:
| Repository | Description | Branch protection? | Private? |
|---|---|---|---|
.github |
Template things for the Bluesky-Astronomy organization. | Yes | |
astronomy-feeds |
MAIN MODULE. Includes code for the firehose, database spec, a moderation bot, and a Flask server to serve the feeds to users. | Yes | |
branding |
Branding resources and logos for the Astronomy feeds. | Yes | |
development-guide |
This guide! | ||
devops |
Devops resources, including Ansible configurations for deploying servers. | Yes | Yes |
dm-bouncer |
A direct message 'bouncing' service for limited group DMs. Intended for communication for moderators on the Astronomy feed. | Yes | |
Galaxy-Zoo-Poster-Bot |
A bot to post an image of a galaxy from the Galaxy Zoo archives every hour on BlueSky. | Yes | |
moderation-guide |
A guide for the feed moderators, with instructions about things like what to moderate (and how.) | No | |
rules |
Rules which anyone posting to the Astronomy feeds must follow. | Yes | |
scripts |
Scripts and notebooks to do various little jobs, like database maintenance or making plots. | ||
website |
The astronomy.blue website. | Yes |
- Code Style:
- For now, recommend following community-supported standards and best practices for each language. For example:
- Python: PEP 8 -- Style Guide for Python Code
- Python: Run code through Ruff
- Python: Usage of Type Hints on variable definition. For example:
- num_files: int
- user_name: str
- JavaScript/Typescript: Airbnb style guide
- For now, recommend following community-supported standards and best practices for each language. For example:
- Branching Strategy:
- Use the
feature-,bugfix-,hotfix-, andchore-prefixes for branches. - Main branch:
main. - The
mainbranch has branch protections on most repositories (see above table.) Commits to main will require approval.
- Use the
- Code Reviews:
- All code must go through a pull request (PR) process.
- Assign at least one reviewer.
- Testing:
- Unit tests are required (where possible) for all new features.
- On the team, Vince has the most experience with setting up unit tests in the astronomy-feeds repo.
- Run tests locally before submitting a PR.
- CI/CD Pipeline:
- More coming soon! For now, the astronomy-feeds repo is checked for style with ruff on all PRs.
- Docs for the Python SDK
- Official protocol docs
- Bluesky's source code
- A nice introductory talk about AT Protocol
- An amazing flowchart of the AT Protocol's structure
- peewee, our database ORM
- Svelte/SvelteKit, our frontend framework of choice for web apps
- Bluesky handle debug tool (can also look up DIDs)
- Explore the records on any Bluesky PDS
- Clearsky search tool (can look up various things)
- Look up different AT Protocol lexicons
- edavis.dev's charts of Bluesky activity
- Jaz's stats page
- Searchable list of all firehose commits (down as of 22nd Nov. 2024)

