An online thriftstore.
An app that allows users to post second-hand goods and connect with members interested in such goods.
- As a new vistor, I want to have a good understanding of what the website does.
- As a new visitor, I want to be able to register for an account.
- As a Returning Visitor, I want to be able to log in securely.
- As a Returning Visitor, I want to be able to create a listing.
- As a Returning Visitor, I want to be able to see my listing.
- As a Returning Visitor, I want to be able to edit my listing.
- As a Returning Visitor, I want to be able to delete my listing.
- As a Returning Visitor, I want to be able to sell my listing.
- As a Returning Visitor, I want to be able to connect with who is purchasing my listing.
- As a Returning Visitor, I want to be able to collect payment from who is purchasing my listing.
- As a Returning Visitor, I want to be able to cancel the purchase of my listing.
- As a Frequent Visitor, I want to be able to search listings I have created.
- As a Frequent Visitor, I want to be able to search listings created by others.
- As a Frequent Visitor, I want to be able to save listings created by others.
- As a Frequent Visitor, I want to be able to see my saved listings created by others.
- As a Frequent Visitor, I want to be able to remove listings created by others I have previously saved.
- As a Frequent Visitor, I want to able to delete my account.
The project can be understood as a social network with collections or arrangements with the ability to broadcast items for sale or guage prices for second-hand goods.
- The website features the ability to
sign up
,sign in
andsign out
in order to conditionally access existing features. A user is based on theuser
model, which requiresusername
,email
andpassword
for new users and only the latter two for existing users. For security, only usernames are stored inlocal storage
whiletokens
are stored in memory. To ensuresign out
across multiple open windows, a logout event triggers astorage event listener
which clears tokens and usernames in the memory of the current window. - Ability to create an account. (any User)
- Ability to sign in to an account. (Registered Owner)
- Ability to sign out of an account. (Registed Owner)
- The website features the ability to create, update and delete a product listing. A product listing is based on the
Product
model and each field is represented as either aform
field or asection
in anarticle
depending on whether a product is being edited or being featured. - Ability to create, edit and delete a product listing. (Registered Owner)
- Ability to
save
andun-save
a product listing. (Registered User)
- The website features the ability to group any and all existing products into named collections aka
bulk deals
. A collection is based on thecollection
model, which is a name and a list of product listings. Each field is represented as either aform
field or aheader
followed by aul
depending on whether a collection is in edit or display mode. - Ability to create, edit and delete a named collection. (Registered Owner)
- Ability to add and remove snippets to/from a collection. (Registered Owner)
search_text
indices are attached to the title and description fields of theproduct
cluster. The frontend UI of the search feature is designed to return product listings that match a query. Additionally, the ability to query bytags
andproduct_type
is enabled by filtering these existing fields in the database.- Ability to search product listings created by others. (any User)
- Ability to filter product listings by type. (any User)
- Ability to filter product listings by tags. (any User)
- Ability to
save
orun-save
product listings from search. (Registered User) - Ability to perform
crud
operations on product listings from search. (Registered Owner)
- Add query params to all resources
- User profile page
- Ability to add friends
- Please visit the frontend sub directory for details on ReactJS Typescript frameworks and libraries.\
- Please visit the backend root directory for details on Python-Django frameworks and libraries.
- VSCode: Visual Studiio Code 2020.3.2 by Microsoft is the IDE used to locally construct the project
- Git: Git is used as the version control system and is utilized via the WebStorm terminal to
commit
to Git andpush
to GitHub. - GitHub: GitHub is used to store the project's code and directory upon concurrent
push
es via Git. - Adobe InDesign: Adobe InDesign is used to mock wireframes.
- ....
-
As a new vistor, I want to have a good understanding of what the website does
- User arrives at home page.
- The screen for
Cheathub
appears with a description of its functionality. - User reads description.
- The screen for
- User continues.
- User arrives at home page.
-
As a new visitor, I want to be able to register for an account.
- User is clicks
Switch to sign up
- The sign up form appears
- The username field is in focus
- User types types a username, email and password.
- The username is taken.
- An error toast alert appears.
- User modifies username
- User is redirected to his/her
collections
profile.
- The sign up form appears
- User continues
- Review:
- A user is able to securely create an account.
- User is clicks
-
As a Returning Visitor, I want to be able to log in securely.
- User clicks
Switch to sign in
- The sign in form appears
- The email field is in focus
- User types types email and password.
- User hits enter.
- A success toast alert appears.
- User is redirected to his/her
collections
profile.
- User is redirected to his/her
- The sign in form appears
- The email field is in focus
- User types types email and password.
- User hits enter.
- A success toast alert appears.
- User continues
- User clicks
-
As a Returning Visitor, I want to be able to create a product listing
- User clicks
Add new product
- A form appears.
- The title field is in focus.
- User inputs
title
,description
,tags
- User uploads images.
- User inputs
- User clicks submit.
- A success toast alert appears.
- The title field is in focus.
- User is redirected to his/her
collections
profile.
- A form appears.
- User continues
- Review:
- ...
- User clicks
-
As a Returning Visitor, I want to be able to see my product listing.
- User arrives at
Collections
profile.- A product listing appears.
- User sees product listing interface with his/her
- A product listing appears.
- User continues
- Review:
- ...
- User arrives at
-
As a Returning Visitor, I want to be able to edit my product listing.
- User clicks
Edit this product
- A form appears.
- The title field is in focus.
- User modifies
description
- User updates image.
- User adds optional
source
url. - User adds additional optional
tags
- User modifies
- User clicks submit.
- A success toast alert appears.
- The title field is in focus.
- User is redirected to his/her
collections
profile.
- A form appears.
- User continues
- User clicks
-
As a Returning Visitor, I want to be able to delete my product listing(s).
- User clicks
Edit this product
- A form appears.
- The title field is in focus.
- User clicks
Delete
- Modal appears
- The cancel button is in focus
- User confirms
- The modal is closed
- A success toast alert appears.
- User clicks
- The title field is in focus.
- User is redirected to his/her
collections
profile.
- A form appears.
- User continues
- User clicks
-
As a Returning Visitor, I want to be able to create a collection of my product listings.
- User clicks
Add New Collection
- A form appears.
- The
name
field is in focus.- User inputs names collection
- User selects existing listings to add.
- User clicks submit.
- A success toast alert appears.
- The
- User is redirected to his/her
collections
profile.
- A form appears.
- User continues
- User clicks
-
As a Returning Visitor, I want to be able to see collections of my product listings.
- User arrives at
Collections
profile.- A
collections
card appears.- User sees
collection
interface that includes product listings added.
- User sees
- A
- User continues
- User arrives at
-
As a Returning Visitor, I want to be able to edit collections of my product listings.
- User clicks
Edit this Collection
- A form appears.
- The
name
field is in focus.- User renames collection.
- User uses
select
input add more products. - User uses
select
input to remove previous products.
- User clicks submit.
- A success toast alert appears.
- The
- User is redirected to his/her
collections
profile. - An updated
collection
appears.
- A form appears.
- User continues
- User clicks
-
As a Returning Visitor, I want to be able to delete a collection of my product listing(s).
- User clicks
Edit this Collection
- A form appears.
- The name field is in focus.
- User clicks
Delete
- Modal appears
- The cancel button is in focus
- User confirms
- The modal is closed
- A success toast alert appears.
- User clicks
- The name field is in focus.
- User is redirected to his/her
collections
profile.
- A form appears.
- User continues
- User clicks
-
As A Returning Visitor, I want to be able to connect with someone interested in my product listing.
- ...
- ...
- ....
- ...
- ...
- ...
- ...
- User continues
- ...
-
As A Returning Visitor, I want to be able to collect payment from someone purchasing my product.
- ...
- ...
- ....
- ...
- ...
- ...
- ...
- User continues
- ...
-
As A Returning Visitor, I want to be able to cancel a transaction.
- ...
- ...
- ....
- ...
- ...
- ...
- ...
- User continues
- ...
-
As A Returning Visitor, I want to be able to connect with someone with a product I am interested in purchasing.
- ...
- ...
- ....
- ...
- ...
- ...
- ...
- User continues
- ...
-
As A Returning Visitor, I want to be able to make payment to someone I am purchasing a product from.
- ...
- ...
- ....
- ...
- ...
- ...
- ...
- User continues
- ...
-
As a Frequent Visitor, I want to be able to search product listings I have created.
- User clicks
Products
- User is rerouted to
Products
page. - A feed of all product listings appear.
- The
Product Search
input appears. - The
search
field is in focus.- User types a
search text
- The listings return products that match
search text
- The listings return products that match
- User uses
select
input to query byproduct_type
- The listings return products of
product_type
- The listings return products of
- User uses
select
input to query bytags
- The listings return products that include input
tag
- The listings return products that include input
- User clickes
Show All
- The listings return most recent products posted.
- User scrolls to end of page
- The
pagination
buttons appear - User clicks
Next
- Listings for next page appear.
- The
- User types a
- User continues
- User is rerouted to
- User clicks
-
As a Frequent Visitor, I want to be able to save product listings created by others.
- User is in
Products
page.- A feed of all product listings appear.
- User finds a product listing.
- User clicks
Save
- A success toast appears
- A feed of all product listings appear.
- User continues
- User is in
-
I want to be able to see my saved product listings created by others.
- User is in
Collections
page.- A collection named
Saves
appears.- User finds all saved products as a collection.
- A collection named
- User continues
- User is in
-
As a Frequent Visitor, I want to be able to un-save product listings created by others I have previously saved.
- User is in
Products
page.- A feed of all product lustings appear.
- User finds a product listing.
- User clicks
UnSave
- A success toast appears
- User clicks
Collections
- The faves collection appears.
- User sees updated Saves.
- A feed of all product lustings appear.
- User continues
- User is in
-
As a Frequent Visitor, I want to be able to delete my account.
- User is clicks
Delete my account
- Modal appears
- The cancel button is in focus
- User confirms
- The modal is closed
- Page is redirected to
/
- User is no longer able to log in with credentials
- The cancel button is in focus
- Modal appears
- User continues
- Review:
- A user is able to securely remove his/her history from the database.
- User is clicks
- Lighthouse via Vercel is used to test performace, which produces unique results on every
git push
. lighthouse-badges is used to generate new badges for every deployment by installingnpm i -g lighthouse-badges
and pushing the new hashed url to the array of urls:lighthouse-badges -o docs/badges -r -u https://thrifthub.vercel.app/ [... all other urls] # Output to docs/badges # Badges will contain the respective average score(s) of all the urls supplied, combined
- Lighthouse's metrics, namely Accessibility and Performance generate specific flags on each audit. Adjustments are made on each push that specifically address any issues.
- ChromeVox Extension was used to ensure that screen-reader accessibility standards are met. This was done by walking through the entire project with the screen-reader plugin enabled. Various adjustments were made following these tests. Notably, the tab-index order of nav elements, and changing refining HTML5 semantic elements for
role
clarity.
- Throughout the development of the project, in-browser dev tools were used to test for consistency across browsers. The browsers themselves were equally used for general use-case testing. The following browsers' per-device applications were accessed with an iPhone 11 Pro, MacBook Pro 15" and iPad Pro 12.9":
- Chrome Version: 83
- Firefox 82
- Opera 72
- Safari 14
- The project frontend is written in Typescript developed with React, bootstrapped with Create React App and deployed with Vercel. The backend is written in Python, developed with Django Rest Framework to serve a restful database via PostGres. Please visit the frontend root directory for details on deployment steps. Please visit the backend root directory for details on deployment steps.
- Clone this repo by running
git clone httpsL//github.com/israelias/django-react-ecommerce
- at the jump,
cd
to the name of this repo:cd django-react-ecommerce
Please visit the frontend root directory for details on required modules viayarn install
and to start the frontend development server onlocalhost:3000
. Please visit the backend root directory for details on required modules viarequirements.txt
and to start the backend development server onlocalhost:8000
.
- Product listings used to fill the database are random items gathered throughout the development of the project include url references in the product sources.
- ESlint Typescript with Prettier
- Create-React-App: Typescript, ESLint & Prettier with Airbnb style guides on VSCode
- Airbnb Javascript style guide — Key takeaway -Config ESLint, Prettier in Typescript React App
- Aaron Sinnot
- Code Institute tutors
- Fellow Code Institute students