The user will have following propreties
- Username is unique
- For login required a password
- The user can be deleted hence all the documents related to this user will be deleted excepts the shared one
All the routes regading to user will be localhost:5000/user/somemethod
Method: Post
URL: localhost/user/signup
Data: A json as with username and password
Response Status: 200
Auth Required: No
Note: The should contain
-
At least one upper case English letter,
-
At least one lower case English letter,
-
At least one digit,
-
At least one special character,
-
Minimum eight in length
Method: Post
URL: localhost:5000/user/login
Data: A json as with username and password
Response Status: 200 with a "token"
Respose: It returns a jwt token that will be used to get the information regarding user is authenticated or not. This token will be set to every request headers to authunticate the requests.
Auth Required: No
Method: Delete
URL: localhost:5000/user/username
Response Status: 200 if the delete is successfull
Auth Required: Yes
The Album will have following properties
- Album name is unique
- Album can be public and private
- Album can be liked and share ( only by it's owner )
- Images will be inside the album
Routes
Method: Get
URL: localhost:5000/album/:album_name
Response Status: 200
Respose: It will list the album details and images containing inside it.
Auth Required: If the album is private
Method: Post
URL: localhost:5000/album/create
Data: A file data with cover_photo, album_name and private info.
Response Status: 200
Respose: It will create an album with desiresed attributes.
Auth Required: Yes
Method: Post
URL: localhost:5000/album/:album_name/add
Data: A file (image) that will be added to that album.
Response Status: 200
Respose: It will add the image to that particular album.
Auth Required: Yes
Method: Get
URL: localhost:5000/album/:album_name/like
Data: Not Required.
Response Status: 200
Respose: It will like that album if not liked before otherwise unlikes it.
Auth Required: Yes
Method: Delete
URL: localhost:5000/album/:album_id
Data: Not Required.
Response Status: 200
Respose: It will remove the album and it's images permanently.
Auth Required: Yes
Method: Delete
URL: localhost:5000/album/:album_name/:image_id
Data: Not Required.
Response Status: 200
Respose: It will remove the particular album images permanently.
Auth Required: Yes