Giter Site home page Giter Site logo

req97670's Introduction

IS27 โ€“ Full Stack Developer Coding challenge

System Requirements

  • Node.js 16.20.0 or newer

  • MacOS, Windows (including WSL), and Linux are supported

  • Yarn, see installation below:

    npm install --global yarn

Technology

Getting Started

First, install dependencies:

yarn install

Second, run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

Deployment

This project uses Github Actions for CI/CD and is hosted on Vercel's cloud infrastructure. See the Actions Tab to view and analyze the pipeline. Two different deployment options are available in this project: Pull Request Preview & Production.

Pull Request Preview

Upon creation of a pull request, this integration will create a build of the requesting branch allowing testing of the code changes in a deployed environment. The preview build URL is https://req97670-j-forsythe.vercel.app/. The configuration file for this deployment can be found in .github/workflows/preview.yaml

Production

Code merged to the main branch will trigger the production build of the project which is hosted here: https://req97670.vercel.app/. The configuration file for this deployment can be found in .github/workflows/production.yaml.

Cloning

If you are cloning this project and would like to deploy on Vercel, follow these steps to configure the project and Github secrets: Using Github Actions and Vercel

Architecture

An architecture diagram that shows the structure of the application as well as a description of each component can be found here: docs/req97670-Architecture-Diagram.drawio.png

Backend

The health endpoint can be accessed on /api/health.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Positions

/api/positions

pages/api/positions/*.js files represent the CRUD operations for positions. You can get all positions and create new ones in pages/api/positions/index.js with GET and POST respectively.

/api/positions/[productId]

The remaining PUT and DELETE and singular GET methods can be found in pages/api/positions/[positionId].js where position id is dynamically interpreted from the fetching calls.

Employees

/api/employees

pages/api/employees/*.js files represent the CRUD operations for employees. You can get all employees and create new ones in pages/api/employees/index.js with GET and POST respectively.

/api/employees/[employeeId]

The remaining PUT and DELETE and singular GET methods can be found in pages/api/employees/[employeeId].js where employee id is dynamically interpreted from the fetching calls.

Frontend

The homepage is found in src/pages/index.js where the organizational chart is displayed. It is wrapped in a global Layout component which controls the <header> & <main> elements.

To use the org chart, simply click on the position that you'd like to modify. From there, the user can: remove a employee if its filled, edit the position including adding or changing an assigned employee, and add new position from this node.

A table of employees can be found at /employees in the src/pages/employees/index.js file where management of this data is accessed. Users are able to edit employees and create new ones from this page.

req97670's People

Contributors

j-forsythe 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.