muhadel / blackstoneeit-challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table of contents

  1. Overview
  2. Repo structure
  3. How to Install
  4. Running the app
  5. Running by docker-compose
  6. Swagger Documentation

Blackstoneeit Challenge

This challenge imagines that we have a social media platform that is under attack from spam. We have implemented a reporting system for users that lets them report spam to the platform, and our spam protection team.

Features

  • We need a way to block the content and resolve those reports
  • The resolving should be defined as a PUT request to an endpoint with this structure /reports/:reportId
  • Block: Means that the content should no longer be available to users
  • Resolve: Means that the report is considered "resolved", and it is no longer visible to the spam protection team

Dependencies

Dependencies Version
Node.js >= 12.13.1
Typescript >= 4.3.5
@nestjs/cli >= 8.0.0

Backend repo structure:

- src/
   - config/
   - shared/
   - types/
   - modules/
      - report/

Frontend repo structure:

- src/
   - assets/
   - common/
   - components/
   - view/
   - redux/

How to Install

$ npm i -g @nestjs/cli
$ npm install
$ mv .env.example .env

Running the app

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Running by docker compose

# Step 1: Edit your_dockerhost_ip located in frontend/.env.example
# Step 2: Edit your_dockerhost_ip located in nginx/default.conf
# Then run
docker-compose up --build

Swagger Documentation

You can access Swagger documentation via acessing the backend on http://localhost:5000/swagger/ image

About


Languages

Language:TypeScript 80.1%Language:Sass 12.0%Language:HTML 4.8%Language:JavaScript 1.6%Language:Dockerfile 1.2%Language:Shell 0.4%