Git Product home page Git Product logo

nextjs-13-boilerplate's Introduction


logo

GitHub language count Repository size GitHub last commit Repository issues License Stargazers

Next.js 13 with Typescript reference architecture

Getting Started

Start your project with this template.

yarn create next-app -e https://github.com/imperadorxs/nextjs-13-boilerplate

How to run

npm install npm dev
yarn yarn dev

How to build

npm run build
yarn build

How to tests

npm test
yarn test

File structure

This is your source code tree:

src
|-- common
   |-- assets
   |-- helpers
   |-- mocks
   |-- styles
   |-- utils
|-- components
|-- config
|-- hooks
|-- app
   |-- lib
          |-- registry
   |-- head.tsx
   |-- layout.tsx
   |-- page.tsx
|-- services
...

This is your component structure:

...
components
|-- YourComponent
   |-- YourComponent.tsx
   |-- YourComponent.spec.ts
   |-- YourComponent.stories.tsx
   |-- interfaces.ts
   |-- styles.ts
   |-- index.tsx
...

These are the folders and their functions:

./common

Here are all the project assets that will be used by the application such as global styles, images, fonts, mocks, reusable functions, among others

./components

Components are presentational only elements, grouping UI items

./configs

Configs are our application's global settings files

./hooks

Hooks are functions that allow you to “plug in” to React's state and lifecycle features from functional components

./app

App is a new pages folder are mapped in routes and have all the containers needed to implement a functionality

./services

Contains all the files responsible for consuming external services, such as the axios configuration file for consuming RestFul APIs.

More utils commands

Find and fix Javascrit and TypeScript problems according to pre-defined rules npm run lint yarn lint

Advantages of using this react project template

The project is already configured with:

  • React
  • Typescript
  • Jest
  • Eslint
  • Prettier
  • Styled
  • Husky
  • Storybook

Main dependecies

Main dev dependecies

nextjs-13-boilerplate's People

Stargazers

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