- Ensure to have
node v18.17+
andnpm
. - Clone the repository.
- Open the repository in your IDE.
- Open your IDE's terminal and install all the dependencies by running
npm intsall
. - Finally, run
npm run dev
and click the provided link for live preview. HAPPY CODING!
We will mostly work in the app
folder.
Inside our app folder, we have these directories:
(pages)
- a route group which contains all the routable pages.components
- contains all reusable components all throughout the project.hooks
- contains all the custom hooks use in this project.lib
- contains the utils.js ShadCN use (No need to modify).styles
- contains all the css files.
public
- contains all the static assets (logos, gifs, fonts).
We are using aliases for our directories. We can simply use @/{folderInApp}
to access folders or files under the himati-website/app
directory.
This project use App Router provided by NextJS. For more information, you can read the here
page.jsx
- Pagelayout.jsx
- Layoutloading.jsx
- Loading UInot-found.jsx
- Not Found UIerror.jsx
- Error UIglobal-error.jsx
- Global Error UIroute.js
- API endpointtemplate.jsx
- Re-rendered Layoutdefault.jsx
- Parallel route fallback page.
folder
- Route segmentfolder/folder
- Nested route segment
[folder]
- Dynamic route segment[...folder]
- catch-all route segment[[...folder]]
- Optional catch-all route segment
For example we want to create a page
with a path /auth/register
, app/(pages)/auth/register/page.jsx
should exist. (Note: without page.jsx
a folder is not routable)
If in need for clarification, feel free to ask.
JN