Web services on Ruby on Rails for building ecommerce websites. This project can be integrated with frontend frameworks such as react, vue.js or angular.
Backend API for build
- Ruby 2.7.0
- Rails 6.1.5
- PG (postgres) 1.1
- Sendgrid-Ruby
DB_HOST:
The host url of the databaseDB_USERNAME:
The database usernameDB_PASSWORD:
The database passwordDB_NAME:
The database nameSENDGRID_API_KEY:
The API Key of your Sendgrid account.
http://localhost/products?offset=x?limit=x?order=x
This endpoint fetches multiple products
Query parameters:
Name | Required | Type | Description |
---|---|---|---|
offset | false | Number | Defines the initial record on the database query. |
limit | false | Number | Defines the maximum number of records to return from the database. |
order | false | String | Indicates in which order the products must be returned, the value can be either desc or asc |
This endpoint finds a product by it's id
This endpoint creates a new order and sends it to the client via email
Name | Type | Description |
---|---|---|
client_name | String | Client name |
delivery_address | String | Order delivery address |
String | Client email | |
phone | String | Client phone number |
products | Array | This array contains the identifiers of the selected products by the client |
This endpoint fetches all the categories from the database