Skip to content

MahmudJewel/full-stack-Auction-app

Repository files navigation

Questions => Full Stack Test:

Make a bidding website using “django rest framework” where multiple users can list their items. Tasks:

  • Create API Endpoints for user login and registration
  • Create- “Create, List, Details, Update, Bid” API endpoints for products
  • A bid has an ending time, the highest bidder at the moment of closure wins the bid
  • Make a frontend for using react or vue (feel free to use nuxt or next) with at least two pages (products and profile). You can use modals/dialogs for login, registration, etc.
  • The profile page will show the user's biddings, which bid he/she won, lost,or is currently active as well as his/her listing (through API)
  • The profile page should contain how much a user spent, or earned through biddings (through API)
  • You must display the list of the top 5 users with the highest bidding amounts (win/loss) on the logged-in user’s items (through API) We would love to see your imagination in UI. This is an open book exam, feel free to browse the internet, and ask on StackOverflow (share a link of your question if any)

Tech stack I used

Back-end:

Django Rest Framework (3.14.0)

Front-end

React

Other Libraries

django-cors-headers (3.14.0)
djangorestframework-simplejwt (5.2.2)
PyJWT (2.6.0)

Setup

The first thing to do is to clone the repository:

$ git clone https://github.com/MahmudJewel/full-stack-Auction-app.git

Back-end

Create a virtual environment to install dependencies in and activate it:

$ cd full-stack-Auction-app
$ python -m venv venv
$ source venv/bin/activate

Then install the dependencies:

(venv)$ pip install -r requirements.txt

Note the (venv) in front of the prompt. This indicates that this terminal session operates in a virtual environment set up by virtualenv2.

Once pip has finished downloading the dependencies:

(venv)$ python manage.py migrate
(venv)$ python manage.py runserver 8000

Front-end

$ cd Frontend
$ npm install
$ npm start

Developed API

Login & verify user

SRL METHOD ROUTE FUNCTIONALITY ACCESS
1 POST /api/token/ Login user All users
2 POST /api/token/refresh/ Refresh the access token All users
3 POST /api/token/verify/ Verify the validity of a token All users

User Related API

SRL METHOD ROUTE FUNCTIONALITY ACCESS
4 POST /api/auth/user/ Register new user Allow any
5 GET /api/auth/user/ List all user Adminuser
6 GET /api/auth/user/uid/ User details IsOwnerOrAdmin
7 PUT /api/auth/user/uid/ Update user IsOwnerOrAdmin
8 DELETE /api/auth/user/uid/ Delete user IsOwnerOrAdmin

Product Related API

SRL METHOD ROUTE FUNCTIONALITY ACCESS
9 GET /api/product/ List all product Allow any
10 GET /api/product/pid/ Single product details Allow any
11 POST /api/product/ Create new product Admin
12 PUT /api/product/uid/ Update product Admin
13 DELETE /api/product/uid/ Delete product Admin

Bid Related API

SRL METHOD ROUTE FUNCTIONALITY ACCESS
14 GET /api/auction/ List all bid Allow any
15 GET /api/bids/uid/ List indivisual user’s bid Allow any
16 POST /api/auction/ Create new bid Authenticated
17 PUT /api/auction/uid/ Update bid Authenticated
18 DELETE /api/auction/uid/ Delete bid Authenticated

Some Screenshot

Home Page

1-home

Details Page

2-detail page

Details with Loging Warning

3-details with loging warning

Details with Price Warning

4-details price warning

Price Updated

5-price updated

Signup Page

6-signup

Signup Warning

7-signup warning

Loging Page

8-login

Loging Warning Page

9-login warning

Happy Coding

Juwel Mahmud

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published