This project uses PNPM for package management. So, make sure to install PNPM to use the project.
From your terminal:
pnpm dev
This starts your app in development mode, rebuilding assets on file changes.
To build your app for production:
pnpm build
Then run the app in production mode:
pnpm start
We are using Next.js with App Router for this project. Next.js has a well-defined directory structure that must be used to make sure the app runs properly. Read more about Next.js here
In the Next.js
App Router, a page is a React Component exported from a page.js
, page.jsx
, page.ts
, or page.tsx
file in the app
directory. Each page is associated with a route based on its file/directory name. Read more about App
here. An example is given below -
app
|__ members
| |__ [id]
| | |__ page.js
| |
| |__ page.js
|
|__ blogs
| |__ page.js
|
|__ page.js
/
/members
/members/[id]
/blogs
Note: In
/members/[id]
the[id]
part is dynamic it can be1
,2
,a
, etc.
All the reusable components are created inside /components
directory.
All the public assets like icons
, images
are stored inside the public
directory.