Skip to content

dmitryweiner/lost-and-found

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lost and Found

Killer feature: AI image objects detection

Powered by Clarifai

Application for fast image categorization and searching

Technologies

Use cases

Registration

  • Anonymous user can enter username and password.
  • User should repeat password.
  • User can sing up.

Login

  • User can enter username and password.
  • User should be able to sign in.

Main page

  • This page should be accessible only to logged user. If user not logged in, she should be redirected to login page.
  • User can view all her tags.
    • Tags are selectable.
    • If clicked, photos should be filtered by the selected tag.
  • User can view all her photos.
    • Photos should show associated tags.
  • User can go to upload page.

Upload page

  • This is protected page.
  • User can select photo from local disk.
  • User can add associated tags.
  • User can upload photo.

Photo page

  • This is protected page.
  • This page is accessible from clicking on the photo.
  • User can view photo and associated tags.
  • User can delete photo via dialog.

Profile page

  • This is protected page.
  • This page is accessible from clicking on the username.
  • User can view all tags and delete them.
  • User can view amount of photos.
  • User can change password.

Server API

/user

  • POST register
  • GET / get current user
  • GET /:id get current user by ID

/auth

  • POST authentication
  • GET get current authentication status
  • DELETE finish sesstion

/file

  • POST upload file

/photo

  • POST create photo
  • GET /:id get photo by ID
  • GET /?query=abc search photos by a query string
  • PUT /:id update photo
  • DELETE /:id delete photo

/tag

  • GET / get all tags of the user
  • DELETE /:id delete tag

Database

User

  • ID
  • username
  • password
  • created_at

Token

  • ID
  • token
  • user_id
  • created_at

Photo

  • ID
  • user_id
  • name
  • created_at

Tag

  • ID
  • user_id
  • name
  • created_at

Photo to Tag

  • photo_id
  • tag_id

Development

Installation

npm install
# don't forget to edit .env files and to add API URL and database credentials 

Run both server and client

npm start

Todo