Giter Club home page Giter Club logo

frontend's Introduction

Cardbox Frontend

code style: prettier Commitizen friendly Conventional Commits

Get Started

  1. Clone repository

  2. Prepare local certificate authorithy

    Setup via mkcert:

    mkcert -install

    Then generate your personal local certificates for cardbox:

    yarn prepare:certs
  3. Setup local env for development

    Copy from .env.sample file and make sure the default settings are correct

    # Change some if you need
    RAZZLE_SESSION_TOKEN=XXXXXX
    CLIENT_PUBLIC_PATH=https://localhost:9101/
    PORT=9100
    BACKEND_URL=https://cardbox.sova.dev/api/internal
  4. Install and run:

    yarn install
    yarn start

Other commands

yarn api     # update api by codegen
yarn lint    # lint project with fix

Development

HotReload

Sometime you should manually restart server for new changes

# Just type and press ENTER:
rs

Effector

  • Use import {} from "effector-root" instead of "effector". All units should be created in the root domain.
  • Use import { debug } from "patronum" for debug effector units

Structure

Project designed by FeatureSliced

WIP: Project is migrating from FSv1 to FSv2

app

  • src/app/application.tsx — Application component, that have global styles and effector provider
  • src/app/server.tsx — Express server, that renders React to stream
  • src/app/client.tsx — Browser side entry point, that hydrates stores and react app
  • src/index.tsx — Node.js entry point, that have hot module replacement and imports server

pages

  • src/pages/index.tsx — Pages component
  • src/pages/:page-name/index.tsx — View for single specific page
  • src/pages/:page-name/model.ts — Business-logic for specific page, that contains single level logic layer

shared

WIP: soon will be placed at src/shared

  • src/lib — Internal libraries
  • src/ui — Internal UIKit
  • src/lib/effector — START event name to use as page property

frontend's People

Contributors

antonmazhuto avatar asvtsv avatar azinit avatar brutalsignature avatar dependabot[bot] avatar dmi-ch avatar drevoed avatar kater-auf-dach avatar olegbrony avatar sergeysova 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.