Spotted React App which transforms messages into images and uploads them to instagram.
yarn
ornpm
In order to install dependencies use yarn and pipenv.
pipenv sync
yarn install
Included in this repo are two configuration files.
Front-end configuration file sconfig.json
is located in the src
subdirectory and back-end configuration file config.json
is in the root folder.
key | value | meaning |
---|---|---|
locale |
"en-US" |
locale used in the app |
Header |
"Spotted" |
the header of the page |
TimeBetweenMessages |
10 |
the minimum time between sending messages (s) |
RecentMessagesCount |
5 |
the number of recent messages displayed on the page |
key | meaning |
---|---|
username |
Instagram username |
password |
Instagram password |
databaseAddress |
MongoDB database address |
databaseName |
MongoDB database name |
{
"username": "myUsername",
"password": "myPassword",
"databaseAddress": "mongodb+srv://username:[email protected]/spotted",
"databaseName": "spotted"
}
You also need to configure an instance of MongoDB for the app.
You need to create a database, specify its name in the config.json
file and create new empty collection named data
inside it.
For this lightweight application, you can use the free database instance available on cloud.mongodb.com
As of today only Polish and English have their locales, feel free to add yours, by creating a key with its name inside /src/locales.json
file.
To build the React app you need to run yarn build
The app can be served with a wsgi server, it should be served using wsgi.py
as a handle.
An example command for gunicorn:
gunicorn wsgi:app
There is a Procfile
included for easy heroku deployment.
You also need to add two buildpacks for the app to build correctly.
heroku/nodejs
heroku/python
MIT © Jan Ochwat