Skip to content

Repository files navigation

Python FastAPI PostgreSQL React Native Deploy Docker

APEXIS

A daily astronomy and vocabulary app. Once a day, APEXIS fetches NASA's Astronomy Picture of the Day and pairs it with a random English word and its definition.

Built with Python, FastAPI, PostgreSQL (previously sqlite3), and React Native.


Apexis Example

app_example


How it works

Daily script → PostgreSQL → FastAPI → Mobile app
  • A scheduled Python script runs every day, fetching the NASA APOD and a random word from a dictionary API.
  • Data is stored in a PostgreSQL database hosted on Railway, free tier ;).
  • A FastAPI backend serves the data via a REST API.
  • A React Native mobile app displays the data on your phone.

Project structure

apexis/
│── index.py              ← main script 
├── backend/
│   ├── main.py           ← FastAPI app
│   ├── database.py       ← DB queries
│   └── models.py         ← image and word response models for FastAPI
├── apexis-app/
|   ├── App.js            ← frontend for mobile
├── .env
├── .gitignore
├── Procfile              ← Railway file
├── Dockerfile            ← Docker initializer
├── README.md

Installation

Download the APK (android only)

Download the latest APK from the Releases page and install it directly.

You may need to enable Install from unknown sources in your phone's settings.


Running locally

Prerequisites

Setup

  1. Clone the repository
    git clone https://github.com/benaytms/apexis.git
    cd apexis
  2. Create your own '.env' with your own keys (follow the example)
  3. Start it up
    docker compose up --build
  4. The endpoints will be available at http://localhost:8000/docs

Services

Service Description
api FastAPI server on port 8000
cron Daily pipeline - runs at 07:00 UTC (04:00 BRT)
db PostgreSQL on port 5433

Useful commands

docker compose up --build -d    # Run in the backgourd
docker compose logs -f          # Follow logs
docker compose down             # Stops the container
docker container prune          # Removes all stopped containers

APIs used


Version

v.1.0.4


License

MIT

About

Fetches NASA's daily picture, plus a random word definition

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages