Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmedeid6842/car
🚗 Nest.js project that aims to provide accurate pricing information for used cars. This application leverages the power of Nest.js, a progressive Node.js framework.
https://github.com/ahmedeid6842/car
nestjs nodejs solid-principles sqlite typeorm
Last synced: 25 days ago
JSON representation
🚗 Nest.js project that aims to provide accurate pricing information for used cars. This application leverages the power of Nest.js, a progressive Node.js framework.
- Host: GitHub
- URL: https://github.com/ahmedeid6842/car
- Owner: ahmedeid6842
- Created: 2023-09-12T23:51:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-21T02:00:02.000Z (about 1 year ago)
- Last Synced: 2024-04-06T14:31:53.703Z (7 months ago)
- Topics: nestjs, nodejs, solid-principles, sqlite, typeorm
- Language: TypeScript
- Homepage:
- Size: 558 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Car
### 📑 Table of Contents
- [📘 Introduction](#introduction)
- [🚀 Getting Started](#getting-started)
- [Prerequisites ❗](#prerequisites)
- [Environment Variables :key:](#environment-variables)
- [Setup ⬇️](#setup)
- [Install :heavy_check_mark: ](#install)
- [Usage 🤿 🏃♂️](#usage)
- [🔍🏗️ API Reference](#api-reference)
- [❓ FAQ ](#-faq-)
- [👥 Authors](#authors)
- [🤝 Contributing](#contributing)
- [⭐️ Show Your Support](#show-your-support)
- [💎 Lessons Learned](#lessons-learned)
- [🙏 Acknowledgements](#acknowledgements)
Welcome to Car, a Nest.js project that aims to provide accurate pricing information for used cars. This application leverages the power of Nest.js, a progressive Node.js framework, to build efficient and scalable server-side applications.
The main goal of this project is to help users determine the fair market value of used cars by considering various factors such as make, model, mileage, condition, and location. By using Admin approval for the reports and estimate report querie, the application provides reliable pricing estimates that can assist car buyers, sellers, and enthusiasts in making informed decisions.To get a local copy up and running, follow these steps.
Before running this project, make sure you have the following prerequisites installed:
### Environment Variables :key:
To run this project, you will need to add the following environment variables to a new file named `.env.development`:
- `DB_NAME`: The name of the database (eg: db.sqlite).### Setup ⬇️
1. Clone the repository:
```shell
git clone https://github.com/ahmedeid6842/car.git
```
2. Change to the project directory:
```shell
cd ./car
```### Install :heavy_check_mark:
Install the project dependencies using NPM:
```shell
npm install
```### Usage 🤿 🏃♂️
To start the application in development mode, run the following command:```shell
npm run start:dev
```The application will be accessible at http://localhost:3000.
- Alright, it's showtime! 🔥 Hit `http://localhost:3000` and BOOM! 💥 You should see the "Hello world" message and the Car APIs working flawlessly. ✨🧙♂️
> The API reference provides detailed documentation on the available endpoints, request/response formats, and authentication requirements.
![10-10 - routes drawio (1)](https://github.com/ahmedeid6842/Car/assets/57197702/c4b976b2-fd38-4bf4-ba51-440d7188bc80)
### How Nest.js enhances this application
Nest.js brings several benefits to this project, including:
- **Modularity**: The application is structured using modules, allowing for better organization and maintainability of code.
- **Dependency Injection**: Nest.js utilizes dependency injection, making it easy to manage and test different components of the application separately.
- **Decorators**: Decorators in Nest.js simplify the implementation of features such as validation, authorization, and logging.
- **Middleware**: Nest.js middleware enables handling of cross-cutting concerns, such as authentication and error handling, in a centralized manner.
- **Scalability**: Nest.js is designed to support scalability, allowing the application to handle high traffic and large datasets efficiently.## 👤 Author
**Ahmed Eid 🙋♂️**
- Github: [@ahmedeid6842](https://github.com/ahmedeid6842/)
- LinkedIn : [Ahmed Eid](https://www.linkedin.com/in/ahmed-eid-0018571b1/)
- Twitter: [@ahmedeid2684](https://twitter.com/ahmedeid2684)We're always looking to improve this project! 🔍 If you notice any issues or have ideas for new features, please don't hesitate to submit a [pull request](https://github.com/ahmedeid6842/car/pulls) 🙌 or create a [new issue](https://github.com/ahmedeid6842/car/issues/new) 💡. Your contribution will help make this project even better! ❤️ 💪
If you find this project helpful, I would greatly appreciate it if you could leave a star! 🌟 💟
## 💎 Lessons Learned
1. **Nest Architecture: Services and Repositories**
- Learn about the Nest.js architecture and how to organize code using services and repositories.
- Understand the benefits of modular structure and separation of concerns.2. **Inversion of Control in NestJS**
- Explore the concept of inversion of control and how Nest.js follows this principle.
- Understand the importance of dependency injection and how it helps in managing and testing components.3. **Persisting Data with TypeORM**
- Learn how to persist data in the car project using TypeORM, an Object-Relational Mapping (ORM) library for TypeScript and JavaScript.
- Understand how to define entities and relationships, perform CRUD operations, and handle database migrations.4. **Interceptors and Middlewares**
- Intercept incoming requests and customize the serialization of user data using interceptors.
- Transform outgoing responses and add common functionality to requests using middlewares.5. **Authentication From Scratch**
- Implement authentication from scratch in the car project using Nest.js and the cookie-session package.
- Understand the concepts of sessions, cookies, and secure authentication strategies.6. **Setting up Database Relations with TypeORM**
- Learn how to define and manage database relations using TypeORM.
- Understand different types of relationships such as one-to-one, one-to-many, and many-to-many, and how to establish them in your application.Special thanks to @StephenGrider for his invaluable course on Nest.js, which greatly contributed to the successful completion of the car project. 💟