Skip to content

oussamabouchikhi/cars-sale

Repository files navigation

🎯 Car Sale

Old cars pricing api

✨ Features

  • Cookies/Session based authentication (signin/signup with email & password)
  • Authorization (admins have to approve reported sales )
  • Users can get an estimate for how much their car is worth based on the (make, model, year, mileage...)
  • Users can report what they sold their vehicules for

⬇ Installation

Make sure you have Nodejs and @nestjs/cli installed, otherwise you'll have to install them on your machine.

~ node -v
~ nest --version
# Clone via SSH or any other method
$ git clone git@github.com:oussamabouchikhi/cars-sale.git

# CD into the project
$ cd cars-sale

# Install the dependencies
$ npm install

🛠️ Configuration

Rename the example.env.development and the example.env.test files to .env.development .env.test respectively, then edit the environment variables
DB_NAME database name
COOKIE_KEY key for hashing the cookie

DB_NAME=DEVELOPMENT_DATABASE_NAME
COOKIE_KEY=YOUR_COOKIE_KEY_FOR_DEVELOPMENT_ENVIRONMENT
DB_NAME=TEST_DATABASE_NAME
COOKIE_KEY=YOUR_COOKIE_KEY_FOR_TEST_ENVIRONMENT

🚀 Running the app

# development
$ npm start

# watch mode (recomended)
$ npm run start:dev

# production mode
$ npm run start:prod

🧪 Test

# unit tests (you can add the prefix --watch)
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

🐳 Docker

Make sure docker is running on your machine. And Obviously you installed it :)

# Build and run the container
Docker compose up

After running the Above command, you access the app from http://localhost:3000/

Other usefull commands

# Build docker images
docker-compose build

# Show docker images
docker images

# Show docker images on running container
docker ps -a

📄 License

This project is open-sourced under the MIT license.

About

Old cars selling app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages