A progressive Node.js framework for building efficient and scalable server-side applications.
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.
- Users can register with email and password for secure account creation.
- Login functionality allows users to access their accounts and interact with the marketplace.
- 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.
- An admin role oversees item approval, ensuring the quality and legitimacy of items listed on the marketplace.
Before you start, make sure you have the following prerequisites in place:
- Ensure you have Node.js and NPM installed in your system.
- NestJS CLI. Install it globally by typing this command:
npm install -g @nestjs/cli
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
# Development
$ npm run start
# Watch mode
$ npm run start:dev
# Production mode
$ npm run start:prod
# Unit tests
$ npm run test
# E2e tests
$ npm run test:e2e
# Test coverage
$ npm run test:cov
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 |
Click to see!
- Overview
- App module
- Auth module
- Users module
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.
- Author - Kamil MyΕliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
- Author - Afif Ramadhan
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
Nest is MIT licensed.