GithubHelp home page GithubHelp logo

chess-ts's Introduction

Chess TS

Minimal implementation of the chess api for a full list search and profile view

Run Locally

Clone the project

  git clone https://github.com/gagocarrilloedgar/chess-ts

Go to the project directory

  cd chess-ts

Install dependencies

  pnpm instal

Start the server

  pnpm dev

Running Tests

To run tests, run the following command

  pnpm dev

Some considerations

  • I have prioritised code structure & quality over styling. I think styling is really use-cased focused and I have mainly used based-libraries + some design sytems as bakcbone for the different projects. I don't think for this callenge styling was super important.

  • Regargind code structure. I like to separate FE projects using:

    • components/: general shared components that could be re-used and are usually dummy
    • pages or sections: I use this as the entry point for the different view. All the code related to that specific view(logic, styling) will be there (if it's not shared with others)
    • modules: This folder is for business logic and abstractions to make it easier for pages to consume apis in a way that is easy to mantain and test. In this folder we can find the use case layer (application), the infra layer (infra) where we do specific implementation of our repositories or ingestion use cases from the domain layer where we define the contract, models and business logic validations that are common between use cases.
  • Regarding testing. I'm using vitest mocking the infra layer as I believe integration tests are usually faster to write and develop that e2e.

  • The testing strategy here is basically to make that if the infra layer works we can expect our app to have the correct behaviour. I've added also a unit test just to showcase a different type.

  • Finally regarding the folder structure I like to use a replica of src for tests to give some predicatibility about naming, etc.

Improvements

  • We could improve error management adding some error boundary class inside the different routes and improve the experience.
  • Add more integration test for the different cases we are expecting (failure and happy paths)
  • For more resilient we could include E2E for the happy paths only.
  • Generators for testing
  • Virtualize the list to only render visible data
  • Improve styles (a lot here).

chess-ts's People

Contributors

gagocarrilloedgar 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.