This is a public open source project!
Live Website: https://www.trademebooks.com
👷 Check out our progress! https://trello.com/b/neeVBQO7
🎨 Check out our wireframing process! https://figma.fun/CfpxqL
trademebooks.com is the successor project to McMaster Used Student Book Exchange (a.k.a. musbe). Check out the project on GitHub and the live version.
trademebooks.com (TMB) is a platform for university students to buy, sell, and exchange textbooks.
The key features:
- Simple single sign on with platforms such as FaceBook, Google, Linkedin, Twitter, and many more.
- Users have their own profile (bookstore) which allow them to advertise and sell their textbooks.
- Adding/Updating Books: Having the auto-complete feature when adding/updating a new or existing book.
-
Adding/Updating Books: A mobile image recognition (OCR - Optical character recognition) feature that can add/update books with the snap of a photo. - Have a good chat/messaging system in place in order to facilitate communication between buyers and sellers.
-
A middle man payment system;
Suppose person A wants to buy from person B a pdf file, person A and person B both pay trademebooks.com and/or upload the file, then TMB pays and reveals the uploaded files if only both of the two parties have successfully submitted what they wanted from each other. That way, trademebooks.com acts as a trusted middle man.
- Frontend: JavaScript and ReactJS
- Backend: Node.js, Express, and MongoDB
- Server (DevOps): Heroku
- Tools: Visual Studio Code (with plugins: Prettier, ESlint, Husky), and MongoDB Atlas
- Install NodeJS - https://nodejs.org/en/
- Install MongoDB Compass (The GUI for MongoDB) - https://www.mongodb.com/products/compass
cd client
npm install
cd client
npm run test
Make sure to be in the root directory, then:
npm install
Create a file called dev.js under the api/config
directory.
// example file
module.exports = {
baseUrl: 'http://localhost:',
port: 5000,
apiPrefix: 'api',
apiVersion: 'v1',
baseUrl: `${this.baseUrl}${this.port}/${this.apiPrefix}/${this.apiVersion}`,
mongoURI: 'mongodb://localhost:27017/trademebooks_dev_db',
sessionSecret: 'my-secret-session-dev',
sendGridKey: 'my-sendgrid-key',
twilioKeys: {
accountSid: 'my-twilio-account-sid',
authToken: 'my-twili-auth-token'
}
}
Use this file: https://drive.google.com/drive/folders/14W8O1DmqWm1DEV4Pld6hBhu0fmjKOiob
cd api/seeds
node <seed_file>.js
or
npm run db:seed
(Optional) Run MongoDB locally with Docker.
npm run mongo:start
Go to the root directory of the project and run the following command to see if all tests pass. Specifcy if you are on are on mac or windows in the parameter [mac|windows]
npm run test:[mac|windows]
Start the server locally on localhost:3000 with the following command in the root directory:
npm run dev
Run the following commands in the root directory of the project.
For eslint on the backend api
directory; but for eslint on the client frontend, run the test command in the client folder.
npm run lint:check # does a simple check for the backend api folder
npm run lint:fix # tries to fix all the linting issues in the backend api folder
For running prettier formatting for the entire project.
npm run format:check # checks if the entire is formatted properly
npm run format:write # reformat the entire project
- production link: https://www.trademebooks.com/
- heroku link: https://trademebooks.herokuapp.com/
*The application will automatically be deployed to production whenever a push is invoked on the master branch.