Giter VIP home page Giter VIP logo

front-end's Introduction

PolloPollo FrontEnd

Build project

To build the PolloPollo frontend you should follow the process below.

  1. Ensure that you have both NodeJS and Yarn/NPM available
    1. (Optional) If you'd like to be able to fix linting issues, then you need to have the following available globally:
      • TSLint
      • TypeScript
      • To get these, simply run the command yarn global add tslint typescript/npm i -g tslint typescript
  2. Clone the project
  3. Run the command yarn install in a terminal located at the project root
  4. You can now use either of the two following commands to interact with the project:
    • yarn run start to start a development server, OR
    • yarn run build to create an optimized build that is suitable for production.
    • yarn run documentation to extract comprehensive documentation from the front-end projects
    • yarn run lint to lint the application and determine potential culprits that should be fixed before push.
      • yarn run lintWindows can be used on Windows in case yarn run lint fails
    • yarn run fix to attempt to automatically fix linting issues. (This requires that you've completed step 1.1)
      • yarn run fixWindows can be used on Windows in case yarn run fix fails

Deployment of project

To deploy the project then the command yarn run build should be executed.

Afterwards the build folder should be uploaded to the server.

Architecture of the project

The architecture of the project is described in the subsection below.

Static content

Static content that may be used before the JavaScript bundle loads should be contained within the public folder.

This could be files such as .html-files, manifests and images.

Components

Components within the application is split into three different folders, that should contain components handling a specific responsibility.

The purpose of these folders are described in the sections below.

pages

The pages folder contains components that the router should be able to navigate to.

layout

The layout folder contains components that are reuseable on several pages. E.g. a header or footer.

utils

The utils folder contains components that are reuseable on several layouts and pages. E.g. Dropdowns, Chevrons or similar content.

Models

Models are used to define the data model used to communicate with the backend. These should be located under the path src/ts/models

Stores

Stores are used to contain and manage all data required on the frontend, and they're located inside the path src/ts/stores. All models should be contained within the Store.

The Store (and the models attached) are accessible throughout the whole application via the use of function called injectStore().

Config

All configurations should be located under the src/ts/config folder and exported via the index.ts file located within. Todo..

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.