Skip to content

jeffinnes/AstroLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AstroLog

AstroLog is a simple celestial object observation logger. Version 1.0.0 supports Celestial Objects with NGC (New General Catalogue) Designations.

Expected Versions

Your installed versions may be compatible, however AstroLog was built on these versions.

  • Python 3.14
  • Node 22.11.0
  • PostgreSQL 18

Initial Setup

Create and Activate Python Virtual Environment

Create virtual environment in the /backend directory:

python -m venv .venv

Activate on MacOS/Unix:

source .venv/bin/activate

Activate on Windows:

.venv\Scripts\activate

Install Dependencies and Set Environment Variables

Backend

  1. Navigate to /backend
  2. Ensure the virtual environment is activated
  3. Run pip install -r requirements.txt
  4. Create a .env file in /backend
  5. On your PostreSQL server, create a database to store the application data
  6. In the /backend/.env file, add a db_url variable and set it equal to your database connection string

Frontend

  1. Navigate to /frontend
  2. Run npm install
  3. Create a .env file in /frontend
  4. In the /frontend/.env file, add an api_url variable and set it equal to http://localhost:8000. Adjust as needed to match the domain & port you are running the backend api under.

Seed the Database

From the root of the project, run:

cd backend
fastapi dev main.py

FastAPI will check for and create the database tables if needed.

In PostgreSQL run the INSERT statement from the /seedFiles/celestial_object_seed.sql file to add an initial set of Celestial Objects to the database.

Optionally, run the INSERT statement from the /seedFiles/observation_seed.sql file to add example observation records.

Note!

If your celestial_object table ID does not start incrementing at 1, then you will need to adjust the celestial_obj_id values in the observation_seed.sql query so they match seeded Celestial Object IDs.

Running Locally

Start the Backend

From the root of the project, run:

cd backend
fastapi dev main.py

Tip!

Once the backend is running you can view the auto generated docs at: http://localhost:8000/docs

If you prefer to use Bruno or Postman, you can import the collection from: http://localhost:8000/openapi.json

Start the Frontend

From the root of the project, run:

cd frontend
npm run dev

🎉 Access the app at http://localhost:3000

About

AstroLog is a simple celestial object observation logger.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published