Coder Social home page Coder Social logo

batmanwgd / turner-app-challenge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jasonbbelcher/turner-app-challenge

0.0 1.0 0.0 1.06 MB

App challenge from Turner Broadcasting & Warner Media

JavaScript 18.23% TypeScript 51.93% CSS 1.67% HTML 27.59% Dockerfile 0.58%

turner-app-challenge's Introduction

Turner App Challenge

The Challenge

We would like you to build an application that allows users to:

  • Search for a Title by its name. DONE
  • Display the titles that match the search query. DONE
  • Allow the user to pull up detailed information about a selected title from the list. DONE

Backend Description

I generally approach projects from the bottom of the stack up. The mongo database was already provided in the cloud for me. Given this, I didn't have to define any models and therefore went with a simple library called monk to help me make queries to it instead of mongoose.

Two GET route is defined.

  1. /api/v1/titles This route pulls the entire collection of objects needed to populate the application. If a query is given like this: [someresource]/?TitleName= or [someresource]/?ReleaseYear a record matching that name will be pulled or if nothing is found it will return everything.

Front End Description

I decided to create the front-end in Angular. I used ngx-bootstrap as my UI framework because I like how easy it is to get started for prototyping quickly.

When the app boots up you are presented with a title jumbotron and a search box with a button to activate search querys.

Two UI components were used from ngx: accordian and typeahead.

Inside the project you will find a service which provides 2 public methods to pull the data from the api. This service is then consumed by the only component page used in the app. The lifecycle hook OnInit was used to load an initial list of Titles into the accordian list and to load the title names into the typeahead search box upon visiting the page.

Final Thoughts

Due to time restrictions and current work situation I had to make decisions to get it functional and usable first and to prioritize things accordingly.

I would have liked to dockerize it and deploy it to Heroku but I ran out of time by the time I finished up with the core requirements. I have done another app challenge months ago which is full CRUD and features those 2 skill sets if you're curious

I enjoyed the challenge and will most probably take a json snapshot of the data and keep working on it after you have reviewed it and shut down the sample database

Installation instruction

create a .env file and add the following:

# env file inside of server directory
PORT=8080
MONGO_URI=[MONGO_URL goes here]

Run API in dev mode

user@yourcomputer: ~/turner-challenge$ cd server
user@yourcomputer: ~/turner-challenge/server$ npm i
user@yourcomputer: ~/turner-challenge/server$ npm run start:dev

access it on localhost:8080/api/v1/titles/

Run server in production mode

user@yourcomputer: ~/turner-challenge$ cd server
user@yourcomputer: ~/turner-challenge/server$ npm i
user@yourcomputer: ~/turner-challenge/server$ npm start

Run frontend in dev mode

user@yourcomputer: ~/turner-challenge$ cd frontend/turner-app-challenge
user@yourcomputer: ~/turner-challenge/frontend/turner-app-challenge$ npm i
user@yourcomputer: ~/turner-challenge/frontend/turnere-app-challenge$ ng serve --open

Note: I have included the .env file for convenience only. Usually this would not be checked into a repo

UI Improvements from Merged Branch

screen 1 screen 2 screen 3 screen 4 screen 5 screen 6

turner-app-challenge's People

Contributors

jasonbbelcher avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.