Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rrxs/amazonia-app

Tech test for job application using Angular and NestJs
https://github.com/rrxs/amazonia-app

angular aws-ec2 cypress docker docker-compose nestjs nodejs tailwind-css typescript

Last synced: about 1 month ago
JSON representation

Tech test for job application using Angular and NestJs

Awesome Lists containing this project

README

        

# Amazônia Project

![Amazônia](images/logo.png)

## Description

A dynamic web application for **Amazônia**, a fictional brand created in a technological challenge promoted by the company [**Ateliware**](https://ateliware.com).

The objective of the challenge is to develop a web application
responsible for calculate the **fastest** delivery route for a drone system.

## Challenge

The challenge is to create a solution for a drone system, which must navigate a map to make quick deliveries. The drone must calculate from 3 positions entered by the user.

Starting from a list of positions and a travel time between them, similar to a chessboard. The system must be able to calculate the fastest route using only bidirectional movements. The solution to this was based on [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm) and can be found [here](https://github.com/rrxs/amazonia-app/blob/main/backend/src/utils/calculationFunctions.ts).

The system first uses the function to calculate the distance and path between the origin point and the object's position and then repeats the process from the object's position to the final destination.

For example, if the user wants to calculate the fastest path with the data.

- Origin: **C2**
- Object: **G2**
- Destination: **H1**

The system should return:

Path: **C2**-C3-D3-E3-F3-F2-**G2**-G1-**H1** \
Travel time: 135 seconds

## Technologies Used

- Angular v16
- Tailwind CSS
- Typescript v5
- Cypress
- NestJs v10
- Node.js v18
- Docker
- AWS EC2

## Live Demo

~~You can see the application live at Live demo~~

## Features

- Users can calculate the fastest route providing a origin, object location and a destination.
- Users can see a list of last 10 calculations.
- Form validation using Angular Reactive forms.
- Full responsive using Tailwind CSS.
- Unit tests.
- e2e tests.

## Preview

![Project Demo](images/demo.gif)

## Folder structure

```text
root

├── backend
│ ├── src
│ │ ├── controllers
│ │ ├── models
│ │ ├── services
│ │ └── utils
│ └── test (e2e tests)

├── frontend
│ ├── cypress
│ └── src
│ ├── app
│ │ ├── components
│ │ ├── models
│ │ ├── pages
│ │ ├── services
│ │ └── utils
│ ├── assets
│ └── environments


├── docker-compose.prod.yml
└── docker-compose.yml
```

## Running locally

First clone the repository.

```shell
git clone https://github.com/rrxs/amazonia-app.git
cd amazonia-app
```

You can run the application using **docker** or build and run manually.

### Using Docker

Run `docker-compose up`. Navigate to `http://localhost:4400/`.

## Development server

### Prerequisites

[Node v18](https://nodejs.org/en)

### Backend

Find more details [here](https://github.com/rrxs/amazonia-app/tree/main/backend).

```shell
# navigate to backend folder
cd backend

# install all dependencies
npm install

# run
npm run start
```

The server should be running on port `4300`.

### Frontend

Find more details [here](https://github.com/rrxs/amazonia-app/tree/main/frontend).

In another terminal.

```shell
# navigate to frontend folder
cd frontend

# install all dependencies
npm install

# run
npm run start
```

Once started you can view the application by opening `http://localhost:4200` in your browser.