Skip to content

Latest commit

 

History

History
205 lines (132 loc) · 8.72 KB

README.md

File metadata and controls

205 lines (132 loc) · 8.72 KB

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description 📖

This NestJS application provides a robust foundation for building a second-hand marketplace platform. Utilizing TypeORM as the Object Data Mapper (ODM) and SQLite as the database, this project enables developers to easily develop and manage large-scale second-hand marketplace applications.

Features 🚀

User Management:

  • Users can register with email and password for secure account creation.
  • Login functionality allows users to access their accounts and interact with the marketplace.

Item Management:

  • Users can advertise items they wish to sell, providing detailed descriptions and relevant information.
  • Users can view all advertised items, allowing them to browse the marketplace for potential purchases.

Admin Approval:

  • An admin role oversees item approval, ensuring the quality and legitimacy of items listed on the marketplace.

Prerequisites 🛠️

Before you start, make sure you have the following prerequisites in place:

  1. Ensure you have Node.js and NPM installed in your system.
  2. NestJS CLI. Install it globally by typing this command: npm install -g @nestjs/cli

Installation 📥

1. Clone the repository: 
https://github.com/OrNixz/upcycled.git

2. Navigate to the project directory: 
cd your-project-name

3. Install dependencies: 
$ npm install

Running the app ▶️

# Development
$ npm run start

# Watch mode
$ npm run start:dev

# Production mode
$ npm run start:prod

Test 🧪

# Unit tests
$ npm run test

# E2e tests
$ npm run test:e2e

# Test coverage
$ npm run test:cov

API Endpoints 🛤️

Name Method URL Body/Query String Description
register POST /auth/register Body - {name, email, password} Create a new user data
login POST /auth/login Body - {email, password} Validate data with existing users
logout POST /auth/logout - Terminates user session
whoami GET /auth/whoami - Provides information about current user
item GET /items Query String - {name, location, category, year} Display list of secondhand items
item POST /items Body - {name, description, price, location, category, year} Create a new secondhand item
item PATCH /items Body - {approved} Approve or reject an item from the user
user GET /users Query String - {email} (optional) Display list of registered users
user POST /users Body - {name, email, password} Create a new user data (deprecated)
user GET /users/:id - Display a specific user based on the ID
user PATCH /users/:id Body - {name, email, password} (optional) Update user data information
user DELETE /users/:id - Remove user data information

Images 📷

Click to see!

1. Modules

  • Overview

  • App module

  • Auth module

  • Users module

2. Register

3. Login

4. Logout

5. Whoami

6. Get users

7. Get user (With query params)

8. Get user (Based on user ID)

9. Add user

10. Update user

11. Delete user

12. Add item

13. Approve item by admin

14. Get items

15. Get item (With query params)

Support 🤝

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch 📬

Nest Author

Project Author

Credits 🙌

This project was inspired by the Learn to Master Nest.js course on the Full-Stack Javascript roadmap, with a slight distinction and additional styling that suits my style. Shout out to the creator who made this project @lunadiotic

License 📝

Nest is MIT licensed.