This is an ecommerce website with backend built in Django and frontend in react with braintree payment gateway integration. It covers following technical topics in 1 app:-
- Database modeling with
sqllite
(seemodels.py
) - API to performance CRUD Operations on database and Custom User authentication with
Django-Rest-Framework
(seeviews.py
and `serializer.py) - Payment Gateway Integration with
Braintree
- Frontend consuming api with
React
Make sure you cd
into the correct folder (with all app files) before following the setup steps.
Also, you need the latest version of Python 3
To start and run the local development server,
- Initialize and activate a virtualenv:
$ pipenv shell
- Install the dependencies:
$ pipenv install -r requirements.txt
-
Change database config so it can connect to your local sql database
-
Run the backend api server:
$ python3 manage.py runserver
- Run the front-end react app
$ cd frontend
$ npm init
$npm run server
Here you can find all existing endpoints, which methods can be used, how to work with them & example responses you´ll get.
Here is a short table about which ressources exist and which method you can use on them.
Allowed Methods
Endpoints | GET | POST | DELETE | PATCH |
|------|-------|---------|--------|
/user | [Y] | [Y] | [N] | [N] |
/product | [Y] | [Y] | [Y] | [Y] |
/product/<id> | [Y] | [N] | [Y] | [N] |
/order | [Y] | [Y] | [N] | [N] |
/category | [Y] | [Y] | [N] | [N] |