line / line/abc-user-feedback

refine .env URLs

Open
#1,111 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
378
Forks
33
Avg merge
20h 19m
Merged PRs (30d)
18

Description

**AS-IS**

1. API

```
BASE_URL=http://localhost:3000 # default: http://localhost:3000
# APP_PORT=4000 # default: 4000
```

2. WEB

```
NEXT_PUBLIC_API_BASE_URL=http://localhost:4000
API_BASE_URL=http://127.0.0.1:3000
NEXT_PUBLIC_MAX_DAYS=90
```

**TO-BE**

Objective; (1) clearly define which variable is for API backend or WEB frontend. (2) Remove `NEXT_` prefix because our user doesn't consider what `NEXT` is.

1. API

```
WEB_BASE_URL=http://localhost:3000
# API_BASE_PORT=4000 # default: 4000
```

2. WEB

```
API_BASE_URL=http://localhost:4000
WEB_BASE_URL=http://127.0.0.1:3000
QUERY_MAX_TIMESPAN=90
```

This could break user experience because environment variables should be changed.

### Additional information

It is related to issue #232

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository for the API and WEB environment-variable definitions and every reference to BASE_URL, NEXT_PUBLIC_API_BASE_URL, API_BASE_URL, NEXT_PUBLIC_MAX_DAYS, and the proposed names. Check how the API and frontend consume these values, then verify that the renamed variables consistently distinguish the two services and preserve the documented defaults.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
full-stack, tooling
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.