docs(dev): align setup with current stack
This commit is contained in:
+44
-26
@@ -1,46 +1,64 @@
|
||||
# Getting Started with Create React App
|
||||
# Job Tracker frontend
|
||||
|
||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
The frontend is a statically exported Next.js 16 application using React 19, TypeScript, Material UI, and React Router. Next.js supplies the build shell; authenticated and public application routes are defined in `src/App.tsx`.
|
||||
|
||||
## Available Scripts
|
||||
## Requirements
|
||||
|
||||
In the project directory, you can run:
|
||||
- Node.js 24 (the version used by CI)
|
||||
- npm 11 or a compatible npm release
|
||||
- The Job Tracker API at `http://localhost:5202` for normal local use
|
||||
|
||||
### `npm start`
|
||||
Install the lockfile exactly:
|
||||
|
||||
Runs the app in the development mode.\
|
||||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||
```powershell
|
||||
npm ci
|
||||
```
|
||||
|
||||
The page will reload if you make edits.\
|
||||
You will also see any lint errors in the console.
|
||||
## Development
|
||||
|
||||
### `npm test`
|
||||
Start the application on Next.js's default development port:
|
||||
|
||||
Launches the test runner in the interactive watch mode.\
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||
```powershell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### `npm run build`
|
||||
Open `http://localhost:3000`. The client calls `http://localhost:5202/api` on localhost unless `NEXT_PUBLIC_API_BASE_URL` overrides it.
|
||||
|
||||
Builds the app for production to the `build` folder.\
|
||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||
The Playwright harness uses port `3300` and starts its own isolated API and SQLite database. Do not point it at a development or production database.
|
||||
|
||||
The build is minified and the filenames include the hashes.\
|
||||
Your app is ready to be deployed!
|
||||
## Quality gates
|
||||
|
||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||
```powershell
|
||||
npm run lint
|
||||
npm test -- --runInBand
|
||||
npm run build
|
||||
```
|
||||
|
||||
### `npm run eject`
|
||||
The production build is written to `out/` and is served by nginx in the frontend container.
|
||||
|
||||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||
Run the browser suite after installing Chromium once:
|
||||
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
```powershell
|
||||
npx playwright install chromium
|
||||
npm run test:e2e
|
||||
```
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
The browser suite covers login, job creation, Career Workspace routing, and public CV/PDF access against isolated services.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
## Useful paths
|
||||
|
||||
## Learn More
|
||||
- `app/` — thin Next.js application shell
|
||||
- `src/App.tsx` — application routes and shared authenticated shell
|
||||
- `src/api.ts` — API client and local/default base URL
|
||||
- `src/components/` — feature and shared UI components
|
||||
- `src/i18n/` — English and Norwegian Bokmål UI messages
|
||||
- `src/theme.ts` — application theme
|
||||
- `e2e/` — Playwright browser tests
|
||||
- `next.config.js` — static-export configuration
|
||||
- `playwright.config.ts` — isolated browser-test services
|
||||
|
||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
## Runtime configuration
|
||||
|
||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||
`NEXT_PUBLIC_API_BASE_URL` is the only browser-visible API setting. Leave it unset in the production container so nginx proxies same-origin `/api` requests. Values prefixed with `NEXT_PUBLIC_` are embedded at build time and must never contain secrets.
|
||||
|
||||
See the repository `README.md` for full-stack development and `deploy/README.md` for production requirements.
|
||||
|
||||
Reference in New Issue
Block a user