Skip to content

Tech test for job application using Angular and NestJs

License

Notifications You must be signed in to change notification settings

rrxs/amazonia-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazônia Project

Amazônia

Description

A dynamic web application for Amazônia, a fictional brand created in a technological challenge promoted by the company Ateliware.

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 and can be found here.

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

Folder structure

    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.

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

Backend

Find more details here.

# 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.

In another terminal.

# 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.