Skip to content

gamblea/doggo-photos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

doggo-photos

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.

Setup

Requires docker be installed locally.

Backend

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.

Frontend

cd fe
npm start

Use

Go to localhost:3000 in browser.

There are test images of dogs in test-data that can be uploaded

Design

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.

About

Web Application to host pictures of dogs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published