Coder Social home page Coder Social logo

cryptocurrency-price-page's Introduction

Architect Design

Purpose

To show the realtime price that fetch from backend, the frontend can refresh the data and continuously request the latest data from backend, by polling.

Solution

Using React.js to build up the whole frontend application.

Divide the pages and services via domain.

Folder Structure

├── public
└── src
    ├── api
    ├── assets
    ├── components
    ├── hooks
    ├── pages
    ├── routes
    ├── services
    ├── styles
    ├── types
    └── utils

This application uses Domain Driven Design to build up the folder structure.

  • public -> store static files, like icon, etc.
  • src/api -> request layer using axios.
  • src/assets -> include some static files.
  • src/components -> has some common components inside.
  • src/hooks -> some common hooks.
  • src/pages -> each pages.
  • src/routes -> the routes of the pages.
  • src/services -> the services of each page.
  • src/styles -> global style and some scss and css variables.
  • src/types -> the definition of types from each page.
  • src/utils -> common utils function used in the project.

Each page will have corresponding files in pages/, services/ and types/.

When there is a bug that is not related to the common components, utils or hooks, you need to search the files mentioned above to find the bug and fix it.

Tech Stack

Main Package

Dev Dependencies

Startup

  1. Install Dependencies
pnpm install
# alias: pnpm i
  1. Config dot environment file
cp ./.env ./.env.dev.local
  1. Start development server
pnpm dev
# pnpm run dev

FAQ

cryptocurrency-price-page's People

Contributors

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