Skip to content

the-astrosky-ecosystem/development-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Developer Onboarding Guide for Astronomy on Bluesky

Astronomy on Bluesky logo

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.

About the Project

System Architecture:

Astronomy on Bluesky architecture diagram

Getting Started

Follow these steps to get started:

  1. Request Access: Ensure you have access to the required resources.
    • Bluesky account
    • Added to github Astronomy on Bluesky org
    • Added to Bluesky Devs Discord
  2. Set Up Your Environment: Follow the Development Environment Setup instructions to configure your local machine.
  3. Explore the Codebase: Start with the Repository Structure section for an overview of the code organization.
  4. Start Your First Task: Pick a First Task to familiarize yourself with the project and workflow.

Development Environment Setup

Python projects

1. Install the uv python package manager:

curl -LsSf https://astral.sh/uv/install.sh | sh

2. 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 sync

4. 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.sql

replacing -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=1

Svelte projects (for now: just the website)

1. Install npm

We recommend first installing nvm to manage node.js installs. Then, install the latest LTS release of npm with

nvm install --lts
nvm use --lts

2. 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).

Repository Structure

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

Workflows and Standards

  • Code Style:
    • For now, recommend following community-supported standards and best practices for each language. For example:
  • Branching Strategy:
    • Use the feature-, bugfix-, hotfix-, and chore- prefixes for branches.
    • Main branch: main.
    • The main branch has branch protections on most repositories (see above table.) Commits to main will require approval.
  • 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.

Resources and Support

Astronomy on Bluesky

Useful documentation

AT Protocol

Other libraries

Useful 3rd party tools

About

A guide for developers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors