Skip to content

Conversation

@Olanrewajuemmanuel
Copy link

@Olanrewajuemmanuel Olanrewajuemmanuel commented Jul 20, 2024

Premise

As required for the assessment, an e-commerce API is to be extended and developed using Django and DRF.

Changes

Product and Category Models: Added models for Product and Category with appropriate fields and relationships.
Order Model: Added an Order model with a many-to-many relationship to Product using an intermediary OrderProduct model.
User Authentication: Integrated JWT authentication using Django REST Framework to handle user registration and login.
Permissions: Restricted product creation and modifications to authenticated users or admin.
Order Placement: Allowed authenticated users to place orders and automatically assigned the logged-in user to the created order.
Order History: Provided an endpoint for users to retrieve their order history.
HATEOAS: Implemented HATEOAS for navigable API responses.

Breaking changes

Django package and rest framework were updated to later versions [This may cause incompatibility with previous versions of the codebase]

Tests

Model tests and View tests were carried out to ensure the expected functionality of the API. The framework itself supported all tests, the default rest framework APIs and faker. Tests were carried out to ensure good test and code coverage.

Postman Collection Link

https://restless-shuttle-307210.postman.co/workspace/Liberty-Assured-Ltd-Assessment~94d4d1eb-2613-4e65-8971-7c79602aafb4/collection/17367262-5e442dc6-495d-4ecd-b9e6-20b080f9a029?action=share&creator=17367262&active-environment=17367262-28bd0df6-2546-456e-94c5-9fcdb52fb045

@Olanrewajuemmanuel Olanrewajuemmanuel changed the title Add User authentication E-commerce API Assessment Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant