Git Product home page Git Product logo

template-configurado-nextjs's Introduction

Folder structure

component

The individual UI components that make up the app will live in here

lib

Business/app/domain logic will live in here.

pages

Will be the actual routes/pages as per the required Next.js structure.

Api

This call will be going serverless to the local project, and then to the API Gateway.

pages/api

Request to API Gateway will be handled here.

public

Static assets will live in here.

Configuration

This folder is to handle the configuration of the axios client, the environment variables, requests, etc.

Hooks

This folder is to handle the custom hooks. Hooks are functions that let you “hook into” React state and lifecycle features from function components. The mayory of the hooks are going to be related to api calls with react-query.

Interfaces

This folder is to handle the interfaces. The interfaces are going to be used in the components, hooks, etc.

Husky

Husky is a git hook manager. It will run the pre-commit hook to run the linter and prettier before committing.

We going to use the following hooks:

'build', 'packages', 'update', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test', 'translation', 'security', 'changeset',

Example:

git commit -m "feat: add new feature"

Commits needs to be specific, dont use "update" or "fix" without specifying what was updated or fixed. Recommend dont use update or chore, use feat or fix instead.

Prettier && Lint

Prettier is a code formatter. It will format the code to a standard format. Lint is a code linter. It will check the code for errors and inconsistencies.

Commitizen

Commitizen is a tool that will help us to create a commit message with a specific format.

How to run

Development

The project is using Next.js with yarn workspaces. To run the project in development mode, you need to run the following commands: yarn install yarn dev

Production

To run the project in production mode, you need to run the following commands: yarn install yarn build yarn start

template-configurado-nextjs's People

Contributors

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