Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yashvardhan-kukreja/quillhash-backend-task
This is the backend code for the task allotted to me by Quillhash Technologies as a part of their interview process
https://github.com/yashvardhan-kukreja/quillhash-backend-task
Last synced: 15 days ago
JSON representation
This is the backend code for the task allotted to me by Quillhash Technologies as a part of their interview process
- Host: GitHub
- URL: https://github.com/yashvardhan-kukreja/quillhash-backend-task
- Owner: yashvardhan-kukreja
- Created: 2019-04-01T17:54:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:24:37.000Z (about 2 years ago)
- Last Synced: 2024-11-07T06:00:03.176Z (2 months ago)
- Language: JavaScript
- Size: 3.21 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.com/yashvardhan-kukreja/quillhash-backend-task.svg?token=xkGWiw62FsqB4JqveXu3&branch=master)](https://travis-ci.com/yashvardhan-kukreja/quillhash-backend-task)
# QuillHash Technologies - Backend Task
## Introduction:
Developed Server Side Code for a basic dating app
### Tech stack used:
- **Server-Side Runtime Environment** - NodeJS
- **Server-Side Framework** - ExpressJS
- **Database** - MongoDB
- **Testing** - chai framework, travis
- **DevOps** - Docker (containerization)
- **Deployment** - AWS EC2 and Heroku
-------
## Base URLs (Deployed on AWS and Heroku)
- **AWS URL** - http://ec2-34-207-165-245.compute-1.amazonaws.com/
- **Heroku URL** - https://quillhash-dating.herokuapp.com/
------## Running the app:
Two ways to run the app (https://localhost:8000/)
- ```docker-compose up --build``` -> **Preferred**
- Go to .env file and **NODE_ENV=production**
``` npm install ```
``` npm start ```
-------
## Running the test suite:
Two ways to run the test suite
- ```docker-compose -f docker-compose-dev.yml up --build``` -> **Preferred**
- Go to .env file and **NODE_ENV=test**
```npm install```
```npm test```
## API Endpoints:
### Authentication routes:
- Register a user
```POST /auth/register - body(name, email, contact, password)```
- Login
```POST /auth/login - body(email, password)```
### User routes:
- Fetch my profile details
``` GET /profile/me - header("x-access-token": )```
- Fetch other user's profile details if not blocked
```GET /profile?id= - query("id": )header("x-access-token": )```
- Block a user
```PUT /block - body(id: ) - header("x-access-token": )```
- Unblock a user
```PUT /unblock - body(id: ) - header("x-access-token": )```
- Post an image for my profile (Content-Type: null)
```PUT /image - file(image: ) - header("Content-Type": null, "x-access-token": )```
- Like an image (normal or super like)
```PUT /image/like - body(image_id: , like_type: ) - header("x-access-token": )```
--------
Screenshots depicting manual route testing on POSTman, and AWS terminal in the "screenshots" folder