Turborepo boilerplate with the following stack:
- Turborepo
- TypeScript
- NextJS
- Styled Components
- Jest
- React Testing Library
- Storybook
- Eslint
- Prettier
- Husky
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.
The following aspects were used to create the apps
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
...
dev
: runs your application onlocalhost:3000
build
: creates the production build versionstart
: starts a simple server with the build production codegenerate
: generate component fileslint
: runs the linter in all components and pagestest
: runs jest to test all components and pagestest:watch
: runs jest in watch modestorybook
: runs storybook onlocalhost:6006
build-storybook
: create the build version of storybook
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
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.