Git Product home page Git Product logo

tractr's Introduction

Tractr test

Créer une mini web app (back-end + front-end dans les technologies de ton choix) contenant:

  • une page listing (de vidéos / produits / utilisateurs, à toi de choisir) avec possibilité de filtrer la liste selon 3 à 4 filtres différents.
  • une page de détail des videos / produits... Par exemple, si c'est une vidéo, un Embed youtube avec une description et l'affichage des critères utilisés dans les filtres suffirait.

I choose for this test to build a serverless application. I used in this test the new library Prisma (2.beta) in association with Nest.Js, GraphQL Nexus and tailwindCss.

A second server has been developed next to this app to acknowledge my capacity to develop both types of app.

App in production

You can find the app in production at this url : https://tractr.vercel.app/ This app host serverless functions, but you can find a second server host in a docker container at this url https://tractr-docker-graphql.rossiaud.net/graphql

You can choose on which server your requests go via the app form. The both servers implement the same function and are linked to the same database. The second implemetation code is hostes here: https://github.com/floross/tractr-docker-graphql

Prisma

Migrate your model

npx prisma migrate save --name '<YOUR_NAME>' --experimental
npx prisma migrate up --experimental

Generate your prisma and nexus definitions

yarn generate

Next.JS

Start the app in dev mode

yarn dev

Build the app

yarn build

Start the app in production mode (after building)

yarn start

Other scripts

Lint the all project

yarn lint

Populate the database with fake data

yarn seed

Note on the UserList and UserDetail page

The UserList page is built with NextJS ssr mode and the UserDetail page is built with NextJS static generation. With this type of app we should only use the static generation, but I choosed the ssr mode page as a proof of concept.

Way to improuve the app

  • Write unit and integration test
  • Split and normalize form components
  • Use a global state management (promising one is Recoil.js)
  • -> Keep track of the filtered params accros the pages
  • Write beautiful error, loading and no users components
  • Make common code between tractr-docker-server and tractr (prisma model and server call call)
  • Manage locales (text and date)
  • Add more documentation and comments

tractr's People

Contributors

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