TradeAuction is a modern auction platform where users can list items for bidding and place bids on items from other users. New users receive 1000 credits to get started. The site is built as a front-end application using the Noroff Auction API.
- Overview
- UI Components
- Features
- Development Process Management
- Installation
- Usage
- Additional Setup
- Generating Documentation
- Project Resources
TradeAuction allows users to:
- Register with a
stud.noroff.noemail and receive 1000 credits - Log in, log out, and update their profile
- View their total credits
- Create listings with title, deadline, media gallery, and description
- Bid on other users’ listings
- View bids on listings
- Search and browse listings (available to all users)
- Registration/Login Form: stud.noroff.no email required
- Profile Update: Update avatar, banner, and bio after logging in
- Credits Display: View available credits
- Listing Cards: Title, images, description, tags, deadline, and bid info
- Create/Edit Listing Modal: Add or update listings with media and tags
- Search/Filter Bar: Search by title or filter by tags
- Place Bid Form: Enter bid amount on listing detail page
- Bid History: View all bids for a listing
- User Listings: View and manage your own listings
- My Bids: View all bids placed by the user
- Bids Won: See items won by the user
- Account Management: Register, login, logout, update profile, view credits
- Listing Management: Create, update, delete, and search auction listings
- Bidding: Place bids, view bid history, see bids won
- Credits System: Earn credits by selling, spend credits by bidding
- Responsive UI: Built with Bootstrap 5 and SCSS
To get started with TradeAuction, clone the repository and install dependencies:
git clone https://github.com/Padletut/semester-project-2
cd semester-project-2
npm installThis project uses environment variables for configuration.
A template is provided at src/.env.example.
To set up your environment:
- Copy the example file:
cp src/.env.example src/.env
- Open src/.env and fill in your actual values (such as your API key).
To start the development server:
npm run devThis will run the SASS watcher and Vite dev server for live development.
After installing dependencies, you need to install the Playwright browsers required for E2E testing:
npx playwright installTo enable pre-commit hooks for linting and formatting, initialize Husky:
npm run prepareTo build the project for production (including CSS autoprefixing):
npm run buildThis will output the production-ready files to the dist/ folder.
To run all unit tests with Vitest:
npm run testTo run all Playwright E2E tests in headless mode:
npm run e2eTo run E2E tests with the Playwright UI (for debugging and visual feedback):
npm run e2e:uiTo run E2E tests in headed (non-headless) mode:
npm run e2e:headedTo run E2E tests in debug mode:
npm run e2e:debugTo view the Playwright test report:
npm run e2e:reportTo generate the JSDocs for the project, run:
npm run docsThis will generate the JSDoc documentation.