/stargazer

an astronomy dashboard

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

stargazer

A beautiful astronomy dashboard.

Access it here: https://stargazer-24dpp.ondigitalocean.app/

Features

The dashboard consists of:

  • NASA Picture of the Day
  • Interactive Fireball Map
  • Upcoming astronomy events
  • Upcoming shuttle launches
  • Chatbot

Setup Instructions

Using Docker

  1. Clone the repository.

  2. Setup environment variables.

NASA_API_KEY=
REDIS_PASSWORD=
REDIS_HOST=
REDIS_PORT=
GEMINI_API_KEY=
SECRET_KEY=

Make a .env file in the backend directory with the above content.

  1. Build the image.
docker build .

this image is production-optimised (you might want to tag it as well).

  1. Run the container.
docker run -p 8000:8000 --env-file ./backend/.env shravanasati/stargazer

substitute the image name/hash.

Manual setup

  1. Clone the repository.

  2. pnpm i

  3. pnpm dev

This will only run the vite server. If you want to run the backend, you first need to build the assets.

  1. pnpm build

To run the backend server, cd into the backend directory and create a virtual environment.

  1. python3 -m venv venv

Activate the virtual environment using

source ./venv/bin/activate

on Linux systems (there's also a .csh and a .fish script for those respective shells)

./venv/bin/Activate.ps1

on Windows (powershell)

  1. Install dependencies using
poetry install
  1. Setup environment variables.
NASA_API_KEY=
REDIS_PASSWORD=
REDIS_HOST=
REDIS_PORT=
GEMINI_API_KEY=
SECRET_KEY=

Make a .env file in the backend directory with the above content.

  1. Run the server.
stella run server

this would require stella to be installed and offers live reload for the server (the default flask one sucks).

Alternatively,

flask --app app run