improvement: fixed some package.json issues. readme files updated.

This commit is contained in:
2026-05-05 00:01:06 +03:30
parent 4c61885cef
commit 15ef17228f
15 changed files with 23445 additions and 228 deletions

View File

@@ -1,36 +1,63 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
# Dyolink — Frontend (Next.js)
## Getting Started
## Prerequisites
First, run the development server:
- **Node.js 20+** and **npm**
## First-time setup
1. **Clone the monorepo** and go to the frontend app:
```bash
git clone <repository-url> dyolink
cd dyolink/frontend
```
2. **Install dependencies**
```bash
npm install
```
3. **Environment**
Create **`.env.local`** in this folder (not committed to git) with the public URLs your browser will use:
```env
NEXT_PUBLIC_APP_URL=http://localhost:3001
NEXT_PUBLIC_API_URL=http://localhost:3000/api
NEXT_PUBLIC_APP_NAME=Dyolink
```
- Adjust **`NEXT_PUBLIC_API_URL`** if the Nest API runs on another host/port.
- These values are baked in at **build time** for production images; for local dev, restart `npm run dev` after changing them.
## Run (development)
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Open **`http://localhost:3001`** (dev server uses port **3001** so it does not clash with the API on 3000).
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
Ensure the backend is running and `NEXT_PUBLIC_API_URL` matches its base URL (including `/api` if your API is mounted there).
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
## After pulling latest `main`
## Learn More
```bash
git pull
npm install
```
To learn more about Next.js, take a look at the following resources:
## Useful commands
- [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.
| Command | Purpose |
|--------|---------|
| `npm run dev` | Development server (port 3001) |
| `npm run build` | Production build |
| `npm run start` | Serve production build (port 3000 — used inside Docker) |
| `npm run lint` | ESLint |
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## Docker
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
Image build and build-args (`NEXT_PUBLIC_*`) are documented in the **repository root `README.md`**.