This project is a simple command-line application built using Dart and the Alfred framework. It provides a RESTful API for managing orders, products, and user data.
- Authentication: Login and token refresh functionality.
- Orders Management: Create, read, update, and delete orders.
- Products Management: Retrieve all products and individual product details.
- User Management: Retrieve user details.
- Ensure you have Dart installed on your system.
- Clone the repository.
- Run
dart pub getto install dependencies. - Configure the database and socket settings in the
configdirectory. - Run the application using
dart bin/dart_api.dart.
- Login:
POST /login - Refresh Token:
POST /refresh/token - Orders:
GET /orders/all-ordersGET /orders/order/:idGET /orders/my-orders/:idPOST /orders/order-createPUT /orders/order-update/:idGET /orders/order-delete/:id
- Products:
GET /products/all-productsGET /products/product/:id
- Users:
GET /users/user/:id
- Authentication middleware is applied to all order, product, and user routes.
- 404 Not Found responses are handled for undefined routes.
This project is licensed under the MIT License.