All mandatory requirements and optinal include pay function, remove from cart function. How it looks and performance is up to the grader to decide
-
Backend
- Django backend
- JSON API for the shop page
- HTML landing page served by Django
- SQLite database
-
Frontend
- React UI
-
Automatic DB population
- Landing page has a button to populate the database
- Populates 6 users
- Users
testuser1,testuser2,testuser3each own 10 items - Password format:
pass#where # is hte usernumber - Email format:
testuser#@shop.aa - Existing database data is deleted before repopulation
-
Browse
- Any user can see all items currently for sale
- Item cards show title, description, price, and date added
-
Create account
- Users can create an account with username, password, and email
-
Login
- Registered users can log in with username and password
-
Add item
- Authenticated users can add an item to their cart
- Creation date is automatically stored by the backend
-
Add to cart
- Authenticated users can add another user's available item to their cart
- Users cannot add their own items
- Items added to a cart remain available for other users
-
Remove from cart
- Users are able to reomve items from their cart and hey appear back in the shop.
-
Pay
- Users can pay for the items in their cart and as a result the item will become unavailabe after purchase for other users.
Open a bash terminal:
cd backend
py -m venv .venv
source .venv/Scripts/activate
py -m pip install -r requirements.txt
py manage.py migrate
py manage.py runserverDjango landing page will have the following URL: http://127.0.0.1:8000/
Open a powershell terminal:
cd frontend
npm install
npm run devReact shop will have the following URL: http://127.0.0.1:5173/
testuser1 / pass1
testuser2 / pass2
testuser3 / pass3
testuser4 / pass4
testuser5 / pass5
testuser6 / pass6
Use the Django landing page button to populate the database before testing.
After populating user can open the webshop by clicking the "Open Ben's SkiShop" button.