node version 16.18.0
- app is set up with tailwind
- most style can be written in /styles/tailwind.css
- you can target class & tags with this syntax:
.your-class { @apply py-2 px-4 bg-blue-500; }
- tailwind is mobile first, so write mobile classes:
<div className="p-2"/>
- followed by breakpoint & upper class
<div className="p-2 md:p-4"/>
- tailwind is mobile first, so write mobile classes:
- fonts are in
/styles/font
- fonts are initialized in tailwind.css
- 'xs': '375px',
- 'sm': '640px',
- 'md': '768px',
- 'lg': '1024px',
- 'xl': '1280px',
- '2xl': '1536px',
- '3xl': '1920px',
- '4xl': '2560px',
- '5xl': '3840px',
- '6xl': '7680px',
- font size is set to 62.5%
- use rem for font sizes (e.g 12px - 1.2rem)
- default font is set in tailwind.css
- layout (header/footer) are in
/components/layout
- project is modular
- page specific components are in
/components/[pagename]
- global components are in /components
- global sub-components are in
/components/[component]
- global sub-components are in
- assets are located in
/assets
- sub folders are based on
page/brand
resources/generic
use - import assets like other files
import AnyImageName from "/assets/brand/logo.png" import Image from "next/image";
- Then use next/image element to display
<Image src={AnyImage} alt="Any Image">
- custom object types are in the
/type folder
- forms are handled using React Hook Form
This is a Next.js project bootstrapped with create-next-app
.
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.tsx
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
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.