This is my project for Start2Impact full stack section. The current project is a fake pokemon card marketplace.
The idea was to build something that I've never did and with multiple types of endpoint and pages. So a marketplace was the correct one. To use correctly the product you have to follow the next steps.
The main problem I had with this project was how to handle images. The solution was Multer for local, with that you can install this product and upload and get images just with an image folder. I've implemented it as a middelware. For production insted I've used supabase storage, a bucket to handle static files.
Client: React, TailwindCSS, React Query, ShadcnUi, React Router, Axios, Vite, Supabase Storage
Server: Node, Express, Postgres, Multer, JWT
The project has the following features:
- Login
- Signup
- Buy a product
- Review an order
- Delete an order
- Sell a product
- Review a product
- Update a product
- Delete a product
- Search a product
- Get the most selling users
- Get the most expensive products
All you need to do to use this project is to install it locally with the following steps. After the installation you will just need to change the .env file in client and api folders. The project is using postgres as a db but the tables will be created automatically when you signup, upload and buy a product. If you want to use multer and create tables automatically, uncomment routes middleware.
Clone the project
git clone https://github.com/Giammarco-Ferranti/Pokemon-Marketplace.gitInstall dependencies in root
npm installDo the same in client
cd client
npm installAnd in api folder
cd api
npm installStart your postgres db
your postgres dbGo back to the root
npm run devYou are ready to go
After you start the project signup(will create a users table), I'm usign JWT as registration ,then click on avatar in navbar > profile > listings > add a new listing(will create a products table). Add as much as you want. The last thing is to create a new user and buy a product(will create orders table). You will se that you can't buy a product that's yours. After you start buying products the best user table is gonna start populating.
The steps again:
- Signup
- Upload a product in profile > listings > plus icon
- Create anothe user
- Buy a product
For the images you will find a zip in the root folder with high quality cards images.