https://github.com/vitaee/bookstoreapp
Book Store App
https://github.com/vitaee/bookstoreapp
docker-compose express-js mysql sequelize
Last synced: 2 months ago
JSON representation
Book Store App
- Host: GitHub
- URL: https://github.com/vitaee/bookstoreapp
- Owner: Vitaee
- Created: 2024-04-30T21:18:35.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-02T23:17:30.000Z (about 2 years ago)
- Last Synced: 2025-05-27T16:11:21.247Z (about 1 year ago)
- Topics: docker-compose, express-js, mysql, sequelize
- Language: TypeScript
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Book Store App
Book Store App, a simple application that displays data from a backend express api with pagination, filtering and sorting features with dynamic table.
# Start Frontend Project
- npm i
- npm run dev
Should be ready on ``` http://localhost:3000 ```
# Start Backend Project
- docker compose build
- docker compose up -d
Should be ready on ```http://localhost:4000```
And thats it our frontend and backed project is ready!
# Sample Documentation
Here is the some api endpoints and their responses.
• URL: ``/api/orders``
• Method: GET
• Description: Retrieve information about all orders in the database including
book details.
• Response:
```json
{
"totalItems": 11,
"totalPages": 4,
"currentPage": 1,
"data": [
{
"orderId": 1,
"customer": "Alice Smith",
"orderDetails": [
{
"bookTitle": "Harry Potter and the Sorcerer's Stone",
"author": "J.K. Rowling",
"price": 20,
"quantity": 1
},
{
"bookTitle": "The Shining",
"author": "Stephen King",
"price": 15,
"quantity": 2
}
]
},
{
"orderId": 2,
"customer": "Bob Johnson",
"orderDetails": [
{
"bookTitle": "A Game of Thrones",
"author": "George R.R. Martin",
"price": 25,
"quantity": 3
}
]
},
]
```
• Status Code: 200 OK
---
• URL: ``/api/books/top-selling/``
• Method: GET
• Description: Retrieve information about top selling books.
• Response:
```json
{
"totalItems": 6,
"data": [
{
"book_id": 2,
"totalSold": "7",
"book": {
"title": "A Game of Thrones"
}
},
{
"book_id": 1,
"totalSold": "5",
"book": {
"title": "Harry Potter and the Sorcerer's Stone"
}
},
]
}
```
• Status Code: 200 OK