/IDA

Primary LanguageJavaScript

Interior Designer Application (HOMY)

This repository contains backend of HOMY, which provides the API to manage designer and client actions(Deployed on AWS)

This document aims to give an overview about the techstack and API documentation. In addition, the reader gets to know how to install and setup a local development environment.

For collaboration guidelines, please check the repository wiki.

CI / CD

The CI/CD-workflow for the project components is located in .github/workflows/ under their respective names.

The CI/CD pipeline diagram is located in repository wiki.

Cyber Security

The notion page includes the relevant documents for SE_09 Cyber Security module.

High-Level Overview

Overview

Techstack

We build the entire backend of Homy with the following technologies:

Additional libraries:

For developing and testing:

Code Structure

The backend consists of:

  • src:
    • common: Functions that are usefull to the whole project
    • modals: Models related to the whole project
    • routes: Routers and controllers related to the whole endpoints
    • services: Definition of external services such as mongoDB
    • app.js: Definition of the application
    • server.js: Definition and start of the server
  • .nvmrc: Declaration of NVM(Node Version Manager)
  • Dockerfile: Instructions for building a docker image of the source code
  • package-lock.json:
  • package.json:
  • swagger.json: Description of API documentation

API Documentation

For SwaggerUI API documentation, please check here.

Installation

Requirements:

To run the backend service you have to clone the repository:

git clone https://github.com/barisarabasuren/IDA.git
cd ./IDA

Switch to the right npm version and instal packages.

nvm use
npm install

Start the server

npm start
  • Note that in order to start the server you need to create .env file. You should create it in the root folder and define the necessary variables. For example:
ACCESS_TOKEN_SECRET=
REFRESH_TOKEN_SECRET=
MONGO_URL=mongodb+srv://<username>:<password>@<cluster_name>/?retryWrites=true&w=majority
  • For MONGO_URL you should edit the fields in angle brackets with your mongo credentials