Bookify is a simple book search and bookmarking application.
Before you begin, make sure you have the following installed:
- NodeJS (at least v14)
- MySQL
-
Clone the project:
cd projectDirectory
-
Install dependencies with npm:
npm install
or with yarn:
yarn
-
Copy
.env.example
to.env
. -
Modify and add your database and API credentials in the
.env
file.
Here are the available API routes:
Method | Route | Handler |
---|---|---|
POST | /api/auth/register | AuthController.register |
POST | /api/auth/login | AuthController.login |
POST | /api/auth/logout | AuthController.logout |
GET | HEAD /api/users/profile | UsersController.profile |
GET | HEAD /api/books | BooksController.index |
GET | HEAD /api/bookmarks | BookmarksController.index |
POST | /api/bookmarks | BookmarksController.store |
DELETE | /api/bookmarks | BookmarksController.destroy |
GET | HEAD / | Closure |
GET | HEAD /health | Closure |
-
Search Books
-
Route:
GET /api/books
-
Query Parameters:
page
: Page number (default: 1)limit
: Number of results per page (default: 10)query
: Base search query texttitle
: Additional keyword for filtering titlesauthor
: Additional keyword for filtering authorskeyword
: Additional keyword for filtering categories
-
-
List Bookmarks
-
Route:
GET /api/bookmarks
-
Query Parameters:
page
: Page number (default: 1)limit
: Number of results per page (default: 10)
-
- Authorization Type: Bearer Token
- Bearer Token:
{{accessToken}}