Simple REST API with a MySQL database built using express.js and bookshelf.js.
- RESTful
- MVC framework
- Use Bookshelf as ORM
- Authentication using JWT tokens
- Hashing/salting of passwords using bcrypt
- Data validation using express-validator
- All responses must be wrapped according to the JSend specification
- All queries and responses must follow the structure specified for each endpoint
- Error handling
- Use correct HTTP status codes
- Deployed to Heroku
Register new user
Log in to get a JWT token
List photos
Create a new photo
Update a photo
Delete a photo (and any links between photo and albums)
List albums
Create a new album
Update an album
Delete an album (and any links between album and photos)
List photos in album
Add photo(s) to an album
Delete a photo from an album
Attributes: title
Relations: photos, user
Attributes: title, url, comment (default null)
Relations: albums, user
Attributes: email, password, first_name, last_name
Relations: albums, photos
2 weeks