dead.Stock is a multipage Buy-and-Sell app for discontinued sneakers featuring user authentication, emailing capabilities via SendGrid, and advanced listing management through queries for filtering, favouriting, marking as sold, and deleting.
To do:
- Improve UI/UX for favoriting
- Add shopping cart functionality
- Use grid layout to display each listing
Thanks to Michael Green and Jimmy Zhang for their collaboration on this project.
- Fork and clone this repo
- Follow the Database instructions below
- Navigate to the directory and run
npm install
- Fix to binaries for sass run
npm rebuild node-sass
- Run the server
npm run local
- Note: nodemon is used, so you should not have to restart your server
- Visit http://localhost:8080/
- Register and Login to access full functionality
- Open
psql
and typeCREATE DATABASE midterm;
- Copy
.env.example
to.env
and change
-
DB_HOST= your hostname eg localhost
-
DB_USER= your username
-
DB_PASS= your password
-
SENDGRID_API_KEY= create SendGrid account and enter API key
- Navigate to the directory and run
npm run db:reset
to seed database
- Do not edit the
layout.css
file directly, it is auto-generated bylayout.scss
. - Split routes into their own resource-based file names, as demonstrated with
users.js
andwidgets.js
. - Split database schema (table definitions) and seeds (inserts) into separate files, one per table. See
db
folder for pre-populated examples. - Use helper functions to run your SQL queries and clean up any data coming back from the database. See
db/queries
for pre-populated examples. - Use the
npm run db:reset
command each time there is a change to the database schema or seeds.- It runs through each of the files, in order, and executes them against the database.
- Note: you will lose all newly created (test) data each time this is run, since the schema files will tend to
DROP
the tables and recreate them.
- Node 10.x or above
- NPM 5.x or above
- PG 6.x
The skeleton was provided by LightHouse Labs. The master branch can be found here.