Git Product home page Git Product logo

nestjs-mongo-game's Introduction

NestJs Basic User Cookie Auth

Setup

### Install
cd be
docker-compose up --build -d
cp .env.template .env
npm install
cd ../fe
cp .env.template .env
npm install

### BE Start
cd be
npm run start:dev

### React FE
cd fe
npm run dev

Assumptions and Notes

  • I followed the spec, but I prob eact, TypesScript with Tailwind and SWR. It felt like the better fit for this project as I don't think Next is required for what we wanted to achieve in the specs
  • On Components, though I could of atomized a bunch of components like Selects and Buttons I felt like as the project is was small enough, it's nice to sometimes lean on Tailwind. I think I would buiild out a Button component, but I'm always dubious to build form components, because they usually have extra context baked into them, which I don't think is a good DX (i.e. integrating Formik / React Form into a Select atom, makes it hard to use in another context. i.e a Search / Filter.). IIf I was to spend more time on the project, I would break components down further.
  • Tests. As this was quite big test project, I added a couple of tests in the FE. I'm using MSW to capture requests to the the api, making it easy to mock. In a live project I would get to 80%+ patch coverage. You can see an example project here of how I integrate tests in my work: https://github.com/richardhealy/ld-flags-nest-api

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.