A photo uploading repository for users beloved dog photos. It can store any type of photo but photos of dogs are preferred.
Built using Golang, MySQL, Docker, React and some other fun JS libraries.
Requires docker be installed locally.
cd be
docker-compose up --build
To init the database run
curl http://localhost:5000/admin/createdb
This is not safe at all but allows for it to be easily reset. Definitely a very bad idea to run in production.
cd fe
npm start
Go to localhost:3000 in browser.
There are test images of dogs in test-data
that can be uploaded
The app uses React on the front end to show all data and handle front end rendering. Uses a loginKey
that is request from the backend service through authenticating with Go Server. Upon authentication the frontend will cache the loginKey
to request all user protected data (username, photos, etc).
For image authentication the frontend must put the loginKey
on the query string on each image owned by the user to authenticate. This loginKey
is saved as a cookie but is delete upon logout. The loginKey
is generated by hashing the users email and adding some random bytes onto the end. This array of bytes is then converted to a string.