Overview
- In new ASL site we designed and developed using Next.JS
Basic Prerequisites (System Setup):
Requirement | Details |
---|---|
Node.js | Installed on your machine (v16.8+ recommended for latest Next.js) |
npm or yarn | Comes with Node.js (you can use either npm oryarn) |
Code Editor | Recommended: Visual Studio Code |
Terminal / CLI | To run commands ( Example: Terminal on macOS/Linux, PowerShell on Windows) |
Development Knowledge:
Skill | Why It's Needed |
---|---|
JavaScript | Core language used in Next.js |
React.js | Next.js is a React framework |
HTML & CSS | For designing your static pages |
Basic CLI Usage | To create and build the app using commands |
How create Next.JS app:
- Once you meeting the above requirements, you can create your static Next.js app with this below command:
- After entering, the Next.js setup wizard will prompt you with a few interactive questions to help customize your project.
- create-next-app@15.0.0
- Ok to proceed? (y) - press y
- Would you like to use TypeScript**?** … No / Yes -> (No)
- Would you like to use ESLint**?** … No / Yes -> (Yes)
- Would you like to use Tailwind CSS**?** … No / Yes -> (Yes)
- Would you like to use
src/
directory**?** … No / Yes -> (Yes) - Would you like to use App Router**? (Recommended)** … No / Yes -> (Yes)
- Would you like to customize the default import alias (@/*)? … No / Yes -> (No)
Project Setup Options Explained
1. Would you like to use TypeScript with this project?
Explanation:
TypeScript adds static typing to JavaScript.
Recommended:
- Choose No if you’re a beginner or don’t need it.
- Choose Yes if you’re comfortable with TypeScript.
For a simple static site, No is perfectly fine.
2. Would you like to use ESLint with this project?
Explanation:
ESLint helps catch JavaScript errors and enforces coding style.
Recommended:
Yes — It’s good practice to keep your code clean and consistent.
3. Would you like to use Tailwind CSS with this project?
Explanation:
Tailwind is a utility-first CSS framework that many developers love for fast styling.
Recommended:
- Choose Yes if you plan to style your project with Tailwind.
- Choose No if you prefer writing raw CSS, SCSS, or using another framework like Bootstrap.
Tailwind works well with static sites, so say Yes if you're interested in learning it.
src/
directory instead of the root directory?
4. Would you like to use Explanation:
This keeps your project more organized by putting all source code in a src/
folder.
Recommended:
Yes — Helps maintain better project structure, especially as it grows.
5. Would you like to use App Router? (recommended)
Explanation:
App Router is the newer routing system in Next.js (introduced in Next.js 13+), using the app/
directory instead of pages/
.
Recommended:
- Choose No if you’re following classic tutorials using the
pages/
directory. - Choose Yes if you want to use the latest features.
For a beginner building a static site, No is recommended.
@/*
)?
6. Would you like to customize the default import alias (Explanation:
Allows you to use custom path aliases instead of relative paths like ../../components
.
Recommended:
No — unless you already know how you want to structure your imports.
Once after completing this you can create your components or pages according to your project needs.
GitHub Repositories:
We have created two separate Git repositories for different purposes:
new-asl-site
1. - Purpose: This repository is used for committing and tracking changes in the source code.
new-asl-site-build
2. - Purpose: This repository is used by the server to pull the latest build files.
In summary:
new-asl-site
→ Source code (development)new-asl-site-build
→ Production build files (deployment)
How To Run:
- Clone new-asl-site repo.
- Go to project folder: cd my-app-name
- Do any changes in source code and save.
- Run this command: npm run dev
- Then open http://localhost:3000 in your browser to see the changes.
- Finally commit your code and follow the build process.
How to Build:
- Go to project folder: cd my-app-name
- Run this command: npm run build
- This will generate the build files inside the out/ folder.
- Clone new-asl-site-build .
- Now copy all the files from out folder and paste in new-asl-site-build and commit.
- Inform IT Team to take pull.