https://github.com/allansifuna/django_customer_orders_api
https://github.com/allansifuna/django_customer_orders_api
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/allansifuna/django_customer_orders_api
- Owner: allansifuna
- Created: 2023-09-11T17:38:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-18T08:12:58.000Z (over 1 year ago)
- Last Synced: 2025-01-12T23:10:04.829Z (4 months ago)
- Language: JavaScript
- Size: 5.43 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CutomerOrdersAPI
[](https://coveralls.io/github/allansifuna/django_customer_orders_api)
## Tech Stack Used
| Purpose | Stack
|----------------|-------------------------------
|API Dev| Django, Django Rest Framework
|SMS |Africastalking SMS API |
|Authentication & Authorization | Google OpenID
|CI/ CD | Github Actions
|Prod Database| Postgres DB
|Test/Dev Database | Sqlite3
|Containerization| Docker
|Infrastructure as Code| Terraform
|Container Orchestration| Kubernetes
|Kuberenetes Engine| Linode Kubernetes Engine
|Domain/Subdomain| FreeDNS
|Version Control| Git, Github
|Coverage| Coveralls
|Test| Django UnitTests# Functionality
## API
The API can be accessed through the following URL [http://customerorders.mooo.com](http://customerorders.mooo.com)
## Authenticate a UserTo interact with API endpoints you require a JWT token that is provided upon signing up or signing in using Google OpenID connect.
Login URL [http://customerorders.mooo.com/login](http://customerorders.mooo.com/login)

Upon a successful login, a user will be redirected to a Django Rest Framework page where they will be provided with access and refresh token.

## Authorization
With a valid access token, a user can append the access token to headers for authentication of successive requests by Clicking on the Authorize button on the API Dashboard and entering **Bearer \** in the input field.

## Adding a CustomerWith a valid access token, one can add a customer into the system.


## Adding an Order
With a valid access token, one can add a customer order upon which an sms should be sent to the customer's Phone number. **Note: With sandbox environment, Africastalking SMS API will not deliver the sms to the recipient's inbox** But if the code does return a successful response then that means the code executed successfully.

Response

## Invalid Access token Response
