GithubHelp home page GithubHelp logo

lucasbassetti / nextjs-typescript-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 1.53 MB

NextJS Boilerplate using TypeScript and Styled Components

Shell 0.74% TypeScript 63.64% JavaScript 25.66% Handlebars 9.96%

nextjs-typescript-boilerplate's Introduction

This is a Next.js boilerplate created based in this boilerplate

This project uses lot of stuff as:

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

Folder Strucutre

The following aspects were used to create the folder structure

↳ @types                            # extension types (not related to application types)
  ...
↳ src                               # sources
  ↳ components                      # shared components used in the pages templates
    ↳ complex                       # mixin of data display and input components
      ↳ {ComponentName}             # component name with CamelCase
        ↳ index.tsx                 # element
        ↳ styles.ts                 # styles
        ↳ test.tsx                  # tests
    ↳ data_display                  # ui components without actions
      ↳ {ComponentName}             # component name with CamelCase
        ↳ index.tsx                 # element
        ↳ styles.ts                 # styles
        ↳ test.tsx                  # tests
    ↳ icons                         # icons
      ↳ {ComponentName}             # component name with CamelCase
        ↳ index.tsx                 # element
        ↳ styles.ts                 # styles
        ↳ test.tsx                  # tests
    ↳ forms                         # completed forms
      ↳ {ComponentName}             # component name with CamelCase
        ↳ index.tsx                 # element
        ↳ styles.ts                 # styles
        ↳ test.tsx                  # tests
    ↳ inputs                        # buttons, selects, text fields, etc
      ↳ {ComponentName}             # component name with CamelCase
        ↳ index.tsx                 # element
        ↳ styles.ts                 # styles
        ↳ test.tsx                  # tests
    ↳ placeholders                  # placeholders of components
      ↳ {ComponentName}             # component name with CamelCase
        ↳ index.tsx                 # element
        ↳ styles.ts                 # styles
        ↳ test.tsx                  # tests
    ↳ templates                     # generic templates used in multiple pages templates
      ↳ {ComponentName}             # component name with CamelCase
        ↳ index.tsx                 # element
        ↳ styles.ts                 # styles
        ↳ test.tsx                  # tests
  ↳ constants                       # application constants
    {filename}.tsx                  # some file with constants
    ...
  ↳ hocs                            # application hocs
    ...
  ↳ hooks                           # application hooks
    ↳ use{HookName}                 # application hook
      ↳ index.ts                    # hook function
      ↳ test.ts                     # hook tests
  ↳ layout                          # layout wrapper for all pages (header, etc.)
    ...
  ↳ page_templates                  # routes screens
    ↳ private                       # private screens
      ↳ ComponentTemplate           # route main component (don't create subfolder)
        ↳ components                # components used only in a specific route (see components)
        index.tsx                   # element
        styles.ts                   # styles
    ↳ public                        # public screens
      ↳ ComponentTemplate           # route main component (don't create subfolder)
        ↳ components                # components used only in a specific route (see components)
        index.tsx                   # element
        styles.ts                   # styles
  ↳ providers                       # application providers
    ↳ {ProviderName}Provider        # Provider component
      index.tsx                     # element
      styles.ts                     # styles
  ↳ styles                          # global styles and themes
    global.ts                       # global styles
    theme.ts                        # global themes
    ...
  ↳ utils                           # helper functions
    {filename}.tsx                  # some file with helper functions
    ...

Commands

  • dev: runs your application on localhost:3000
  • build: creates the production build version
  • start: starts a simple server with the build production code
  • generate: generate component files
  • lint: runs the linter in all components and pages
  • test: runs jest to test all components and pages
  • test:watch: runs jest in watch mode
  • storybook: runs storybook on localhost:6006
  • build-storybook: create the build version of storybook

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

nextjs-typescript-boilerplate's People

Contributors

dependabot[bot] avatar lucasbassetti avatar

Stargazers

Matheus avatar Juliana Burzlaff avatar cfpperche avatar uvacoder avatar Edson Frainlar avatar

Watchers

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