This is a Django API that sends the NASA Astronomy Picture of the Day to a user's phone number via text message. This service gets the daily picture and description from the Nasa-APOD API and sends it to the user's phone number via text message using the Twilio API.
I created this app to share my love of space and astronomy with others. I also wanted to create a fun and easy way to learn about the universe.
Nasa-APOD Texting Service requires the following to run:
Linux:
python3 -m venv venv
source venv/bin/activate
Windows:
python -m venv venv
. ./venv/Scripts/activate
pip install -r requirements.txt
touch .env
DB_NAME=your_database_name
DB_USER=your_database_user
DB_PASSWORD=your_database_password
DB_HOST=your_database_host
DB_PORT=your_database_port
NASA_API_KEY=your_nasa_api_key
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone_number
generate a secret key for Django randomly
SECRET_KEY=your_secret_key
generate a secret key for JWT randomly
JWT_SECRET_KEY=your_jwt_secret_key
python manage.py makemigration api
python manage.py migrate
use the following command to start the server:
python manage.py runserver
users must sign up with a name, a phone number, an email address and a password. The phone number must have the country code of the country in which the phone number originated: Canada -> +16574832074. The email address must be valid. The user will receive a welcome text message. The user will also receive a text message every day with the NASA Astronomy Picture of the Day.
https://nasa-client-production.up.railway.app/
This app is deployed on railway and can be accessed at: https://nasa-apod-production.up.railway.app/api
This app was created using the following tools: Django, Django Rest Framework, docker, PostgreSQL, Nasa-APOD API, Twilio API
Nasa-APOD Texting Service was created by:
with the mentorship of:
- Github
- CEO of SharpestMinds