/ats-fe

React, nextjs, typescript, redux & apollo

Primary LanguageTypeScriptMIT LicenseMIT

ATS frontend

This repo produces a microservice that is responsible for running the user-facing web app.

Key ingredients

  • TypeScript to ensure the highest code quality
  • Node.js to run JavaScript on the server
  • Next.js to bundle source files and render web pages both on the server and the client
  • React to describe interface components
  • Apollo GraphQL client to get data from the backend
  • Redux for static react state
  • Styled components to produce well-structured and collision-free CSS
  • Lodash to leverage common utility functions
  • ESLint and Prettier to ensure that source files are error-free and easy to read
  • Docker to make the production version of the microservice straightforward to deploy
  • GitLab CI to automatically check code quality and generate a new docker image on every push

Project structure

The repository generally follows Next.js folder structure, except that the source code is stored in src subdirectory. This makes it easier to search and replace text across multiple files as well as to run code quality checks.

The code is inspired by Alexander Kachkaev

Running a local copy

  1. Ensure you have the latest git, Node.js and Yarn installed on your machine

    git --version
    ## ≥ 2.14
    
    node --version
    ## ≥ 10.0
    
    yarn --version
    ## ≥ 1.10
  2. Clone the repo from GitLab

    cd PATH/TO/MISC/PROJECTS
    git clone https://gitlab.com/ceddybi/ats-fe.git
    cd ats-fe
  3. Install npm dependencies using Yarn

    yarn
  4. Copy .env.dist to .env. You can have a look at src/config.ts for hints on what is expected.

  5. Start the server in development mode

    yarn dev

    Modifying any of the files will refresh the app, thanks to Next.js hot module reloading. To stop running the server, press ctrl+c.

  6. If you want to test a production copy of the microservice, build and run it like this:

    yarn build
    yarn start