This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
The homepage/landing page is on page.tsx
We are using tailwind css for css formatting. So all styles are attached via class names to html/react elements
To create a new page, add a new folder directly under the app directory, which corresponds to the url you would like that page to live at, and then create a file under it called page.tsx, and import any components you would like into that file. The page will then be available at that specified url. For instance, in the http://localhost:3000/dashboard page, the page is populated by the code in app/dashboard/page.tsx, and has the word dashboard in the url because we named our directory dashboard.
For page specific components, we will create a folder under each page called components, and put our components inside of that. For sitewide components, we can put those in a folder called components that lives directly inside the app folder, and import them into the various pages as needed.
We are using jest for unit testing. After you've written your tests, just run
npm test
And your tests will be run!
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.