From 603e95ea2966ded30ed1d530ae7eea0a0dcfa847 Mon Sep 17 00:00:00 2001 From: Alimi Kehinde Marufudeen Date: Sun, 14 Jul 2019 14:27:51 +0100 Subject: [PATCH] [update readme with API Documentation] --- README.md | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 128 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0a53bf4..4ba386b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,134 @@ +# Auto-Mart + [![Build Status](https://travis-ci.org/marusoft/Auto-Mart.svg?branch=develop)](https://travis-ci.org/marusoft/Auto-Mart) [![Coverage Status](https://coveralls.io/repos/github/marusoft/Auto-Mart/badge.svg?branch=develop)](https://coveralls.io/github/marusoft/Auto-Mart?branch=develop) [![Maintainability](https://api.codeclimate.com/v1/badges/b4277f0c9690bd1cbbe6/maintainability)](https://codeclimate.com/github/marusoft/Auto-Mart/maintainability) - -# Auto-Mart +## Application Description Auto Mart is an online marketplace for automobiles of diverse makes, model or body type. With Auto Mart, users can sell their cars or buy from trusted dealerships or private sellers. -[Heroku-link](https://automart-marusoft.herokuapp.com/api/v1) \ No newline at end of file +
Pivotal Tracker: https://www.pivotaltracker.com/n/projects/2346137 +
UI: https://marusoft.github.io/Auto-Mart/UI/index.html +
Heroku: https://automart-marusoft.herokuapp.com/api/v1 +
API documentation: https://automart15.docs.apiary.io/# + +## Table of Content + + [Features](#features)
+ [Technology](#technology)
+ [Installation](#installation)
+ [Testing](#testing)
+ [API End Points](#api-end-points) + +## Features +Below are the features Auto-Mart app +### Users + +- User can Sign up
+- User can Sign in
+- User (seller) can post a car sale advertisement.
+- User (buyer) can make a purchase order.
+- User (buyer) can update the price of his/her purchase order.
+- User (seller) can update the price of his/her posted AD.
+- User (seller) can mark his/her posted AD as sold.
+- User can view a specific car.
+- User can view all unsold cars.
+- User can view all unsold cars within a price range.
+- Admin can delete a posted AD record.
+ +## Optional Features +- User can reset password.
+- User can add multiple pictures to a posted ad.
+- User can view all cars of a specific body type.
+- User can view all used unsold cars.
+- User can view all new unsold cars.
+- User can ​ flag/report​ a posted AD as fraudulent.
+- User can view all unsold cards of a specific make (manufacturer).
+ +## Technology + +Modern JavaScript technologies were adopted in this project + +ES2015: Also known as ES6 or ECMASCRIPT 6, is a new and widely used version of Javascript +that makes it compete healthily with other languages. See [here](https://en.wikipedia.org/wiki/ECMAScript) for more infromation. + +NodeJS: Node.js is an open-source, cross-platform JavaScript run-time environment which allows you enjoy the features of Javascript off the web browsers and implement server-side web development. +Visit [here](https://nodejs.org/en/) for more information. + +ExressJS: This is the web application framework for Node.js +Visit [here](https://expressjs.com) for more information + +Postgres Database: PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. + +Codes are written in accordance with Airbnb JavaScript style guide, see [here](https://github.com/airbnb/javascript) for details. + +## Installation +1. Clone this repository into your local machine: +``` +https://github.com/marusoft/Auto-Mart +``` +2. Navigate into the cloned repository in your machine: +``` +cd Auto-Mart +``` +3. Install dependencies by running. +``` +npm install +``` +4. Start the application by running +``` +npm start +``` +5. Install postman to test all endpoints + +## Testing +- run test using `npm test` + +## API Routes + + + + + + + + + + + + + + + + + + + +
HTTP VERBENDPOINTFUNCTIONALITY
POST api/v1/auth/signup Create a user
POST api/v1/auth/signin Login a user
POST api/v1/car Create a car sale AD.
GET api/v1/car/:id View a specific car
DELETE api/v1/car/:id Admin Delete a specific car AD.
PATCH api/v1/car/:id/status Mark a posted car Ad as sold.
PATCH api/v1/car/:id/price Update the price of a car.
GET api/v1/car View all unsold cars of specific make,state + * status,manufacturer, body type and price range.
+ +GET api/v1/car?status=available&manufacturer=toyota View all unsold cars of a specific make (manufacturer). + + +GET api/v1/car?status=available&state=used View all unsold cars of a specific state(used). + + +GET api/v1/car?status=available&state=new View all unsold cars of a specific state (new). + + +GET api/v1/car?bodyType=van View all cars of a specific body type. + + +GET api/v1/car?status=available&minPrice=30000&maxPrice=378000000 User can view all unsold cars within a price range. + + +POST api/v1/order Create a purchase order + +PATCH api/v1/order/:orderId/price Update the price of a purchase order. + +POST api/v1/flag flag/report a posted AD as fraudulent. + + + +## Author +- Kehinde Morufudeen Alimi \ No newline at end of file