110 lines
2.8 KiB
Markdown
110 lines
2.8 KiB
Markdown
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
|
|
|
## Package Manager
|
|
|
|
This project uses **PNPM** for dependency management, providing better disk space efficiency and faster installs through proper library linking.
|
|
|
|
### Installation
|
|
|
|
If you don't have PNPM installed:
|
|
|
|
```bash
|
|
npm install -g pnpm
|
|
```
|
|
|
|
### Install Dependencies
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
## Getting Started
|
|
|
|
### Development Server
|
|
|
|
Run the development server:
|
|
|
|
```bash
|
|
pnpm dev
|
|
```
|
|
|
|
Open [http://localhost:4000](http://localhost:4000) 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.
|
|
|
|
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
|
|
|
### Production Build
|
|
|
|
Build the application for production:
|
|
|
|
```bash
|
|
pnpm build
|
|
pnpm start
|
|
```
|
|
|
|
## Docker Deployment
|
|
|
|
```bash
|
|
docker-compose up -d
|
|
```
|
|
|
|
Stop with `docker-compose down`.
|
|
|
|
## Working on Multiple Features (Git Worktrees)
|
|
|
|
Git worktrees allow you to work on multiple branches simultaneously without switching contexts or stashing changes.
|
|
|
|
### Create a new worktree
|
|
|
|
```bash
|
|
git worktree add ../Portfolio_Remake-feature-name feature-branch-name
|
|
```
|
|
|
|
### Navigate and install dependencies
|
|
|
|
```bash
|
|
cd ../Portfolio_Remake-feature-name
|
|
pnpm install
|
|
```
|
|
|
|
### List all worktrees
|
|
|
|
```bash
|
|
git worktree list
|
|
```
|
|
|
|
### Remove a worktree when done
|
|
|
|
```bash
|
|
git worktree remove ../Portfolio_Remake-feature-name
|
|
```
|
|
|
|
**Tip:** Run dev servers on different ports (e.g., main on `:4000`, feature on `:4001`) to work on both simultaneously.
|
|
|
|
## Learn More
|
|
|
|
To learn more about Next.js, take a look at the following resources:
|
|
|
|
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
|
|
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
|
|
|
## Deployment
|
|
|
|
Deploy to [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) or use Docker (see above).
|
|
|
|
## Available Scripts
|
|
|
|
| Script | Description |
|
|
|--------|-------------|
|
|
| `pnpm dev` | Start development server on port 4000 |
|
|
| `pnpm build` | Build production application |
|
|
| `pnpm start` | Start production server |
|
|
| `pnpm lint` | Run ESLint checks |
|
|
| `pnpm lintfix` | Auto-fix ESLint issues |
|
|
| `pnpm security:audit` | Run security vulnerability scan |
|
|
| `pnpm security:check` | Generate security report |
|
|
| `pnpm security:outdated` | Check for outdated dependencies |
|