Giter Club home page Giter Club logo

fsd-next-template's Introduction

Develop

  1. Install the dependencies. Run:
    pnpm install
  2. Set up environment variables. See list of pre-configured environment variables bellow.
    Note: .env.local overwrite .env (more)
  3. Start the development server (see additional info about this feature). Run:
    pnpm dev
  4. Open http://localhost:3000 in your browser.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Publish

  1. Install the dependencies. Run:
    pnpm install
  2. Make the production build. Run:
    pnpm build
  3. Start server (see additional info about this feature). Run:
    pnpm start

Pre-configured environment variables

  1. NEXT_PUBLIC_API_BASE_URL — useful for configuring base URL for any API calls.
  2. NEXT_PUBLIC_ASSETS_VERSION — version of public assets. Can be used to reset browser cache of any assets.
  3. NEXT_PUBLIC_SENTRY_DSN — used to log errors to Sentry.

Sentry

  1. Add NEXT_PUBLIC_SENTRY_DSN to .env file
  2. sentry-cli login — to login through browser or enter auth token
  3. Fill defaults.project field in sentry.properties file

Storybook

  1. To start storybook locally
    pnpm storybook:dev
  2. To build storybook
    pnpm storybook:build

Testing Storybook with Loki

  1. First of all, you need both storybook and next app to be running in dev mode
    pnpm dev && pnpm storybook:dev
  2. Now you can run tests using Loki
    pnpm test:ui
    Then in the terminal you will see files that were changed during the development process. In the .loki folder, 2 folders will appear: current and difference.
  3. To view these changes in an interactive format, you need to generate a report
    pnpm test:ui:report
    After executing this command, 2 files will be generated in the .loki folder. You can run the report file in a browser and see all the changes there. For Mac you can use this command
    open .loki/report.html
  4. If you agree with all the changes, you should run the following command
    pnpm test:ui:ok
    After its execution, all changes will be confirmed and the next run of the pnpm test:ui command will show that all tests passed successfully

fsd-next-template's People

Contributors

dmitriyzvezdetckiy avatar andreyapurple avatar andreytaptima avatar acrom7 avatar dependabot[bot] avatar alcotras71 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.