mattburnett-repo / generic-fse-code-challenge

This repo is for an ongoing, generic personal project. It contains frontend and backend code for a generic FSE code challenge.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

repo header

Generic Full Stack Engineer Code Challenge

This repo is for an ongoing personal project. It contains frontend, backend and authServer code for a generic FSE code challenge. The project retrieves and displays insurance policy / customer records.

It uses React (Frontend) to connect to an ApolloGraphQL server (Backend). The ApolloGraphQL server connects to a remote REST API datastore. Data is pulled from the datastore, through ApolloGraphQL and then displayed to the user as a React UI.

Basic authentication is handled by AuthServer. Authentication is handled separately from application data.

Technology used

  • Authentication
  • Frontend
    • React
    • React-Table
    • React-Date-Picker
    • react-flash-message
    • Apollo graphQL Client
    • Tailwind CSS
    • Jest / React Testing Library
  • Backend
    • ApolloGL Server / datasource-rest
    • Datastore
      • PostgreSQL
      • Node JS / Express / Swagger/OpenAPI
    • Mocha / Supertest / Chai

Getting Started

Installation from the repos

Docker containers

  • Clone the repo and create the .env files for frontend, backend and authServer.

  • You can run Docker containers for the frontend, the backend and the authServer. Instructions are in the respective README.md files

  • You can also run the whole thing from the project root directory, after you create the .env files for each container (see READMEs for authServer / backend / frontend for how to do this. TLDR: Copy .sample-env to .env for each module). You won't be able to use OAuth to log in, but you can log in / register using username / password and see the app.

    docker-compose -p generic-fse up -d

    and then run

    localhost:3000

    in a browser window. It may take a few moments to load.

    Stop the Docker containers with:

    docker-compose -p generic-fse down

Tests

  • Tests for frontend and backend are located in their respective repositories

To Do

  • Google Cloud Deployment
    • Develop CI/CD workflow as a separate effort / sandbox (similar to authSandbox)
  • Logging
  • Expire the auth token / localStorage ...
    • Combine with 'Remember Me' functionality
  • Browse / Search
  • More TypeScript
  • Refinements to JWT authorization
    • Add authLevel to token
    • Check authLevel within the app, for module-level access
  • Investigate / resolve data caching
    • React Table keeps a memoized copy of the data
    • Apollo QL keeps a cache of data
      • use the Apollo QL version

About

This repo is for an ongoing, generic personal project. It contains frontend and backend code for a generic FSE code challenge.


Languages

Language:JavaScript 81.4%Language:CSS 9.5%Language:TypeScript 7.5%Language:Dockerfile 1.0%Language:HTML 0.6%