You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: improve local development experience and setup documentation
- Add LOCAL_LAYER, PORT, and HOST configuration to .env.example
- Set LOCAL_LAYER=true by default (use vendored injective-ui layer)
- Set HOST=127.0.0.1 by default for better security
- Rename dev:local to dev:remote (since local is now default)
- Expand README with beginner-friendly installation guides
- Add Node.js and Yarn installation verification steps
- Use collapsible sections to keep README organized
- Include troubleshooting for common setup issues
# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
83
+
echo'. "$HOME/.asdf/asdf.sh"'>>~/.zshrc
84
+
85
+
# Restart terminal, then install Node.js
86
+
asdf plugin add nodejs
87
+
asdf install nodejs 20
88
+
asdf local nodejs 20
89
+
```
90
+
91
+
</details>
92
+
93
+
<details>
94
+
<summary><strong>Method 4: Using Volta (cross-platform version manager)</strong></summary>
95
+
96
+
```bash
97
+
# Install Volta
98
+
curl https://get.volta.sh | bash
99
+
100
+
# Restart terminal, then install Node.js
101
+
volta install node@20
102
+
```
103
+
104
+
</details>
105
+
106
+
#### 2. Install Yarn Classic (v1.22.22)
107
+
108
+
**First, check if you already have Yarn:**
109
+
```bash
110
+
yarn --version
111
+
```
112
+
113
+
If you see a version starting with `1.x.x`, you're good! Skip to Installation.
114
+
115
+
If you see `command not found` or version `2.x`/`3.x`/`4.x`, install Yarn Classic:
116
+
117
+
<details>
118
+
<summary><strong>Method 1: Using Corepack (recommended - built into Node.js 16.9+)</strong></summary>
119
+
120
+
```bash
121
+
# Enable Corepack
122
+
corepack enable
123
+
124
+
# Install Yarn 1.22.22
125
+
corepack prepare yarn@1.22.22 --activate
126
+
127
+
# Verify
128
+
yarn --version
129
+
# Should output: 1.22.22
130
+
```
131
+
132
+
> **Note:** If `corepack enable` fails with permission errors, try `sudo corepack enable` (macOS/Linux) or run as Administrator (Windows).
133
+
134
+
</details>
135
+
136
+
<details>
137
+
<summary><strong>Method 2: Using npm (if Corepack doesn't work)</strong></summary>
138
+
139
+
```bash
140
+
# Install globally
141
+
npm install -g yarn@1.22.22
142
+
143
+
# Verify
144
+
yarn --version
145
+
# Should output: 1.22.22
146
+
```
147
+
148
+
> **Note:** If you get permission errors on macOS/Linux, try `sudo npm install -g yarn@1.22.22`
149
+
150
+
</details>
151
+
152
+
### Installation
28
153
29
154
1. Clone the repository
30
155
31
156
```bash
32
157
git clone git@github.com:InjectiveLabs/pdaas.git
33
158
cd pdaas
159
+
```
160
+
161
+
2. Install dependencies
162
+
163
+
```bash
34
164
yarn
35
165
```
36
166
37
-
2. Optional: copy environment variables template and adjust values
167
+
> **Note:** If you get `yarn: command not found`, go back to the Prerequisites section above and install Yarn.
168
+
169
+
3. Copy environment variables template and configure for local development
38
170
39
171
```bash
40
172
cp .env.example .env
41
173
```
42
174
43
-
3. Run the app locally (uses the vendored Injective UI layer)
175
+
Edit `.env` and set your configuration. The vendored `injective-ui` layer is used by default (`LOCAL_LAYER=true`).
176
+
177
+
4. Run the app locally
44
178
45
179
```bash
46
-
LOCAL_LAYER=true PORT=3000 HOST=0.0.0.0 yarn dev
180
+
yarn dev
47
181
```
48
182
49
-
Notes:
50
-
-`LOCAL_LAYER=true` forces Nuxt to use the vendored `injective-ui` layer in this repo instead of fetching `github:InjectiveLabs/injective-ui/layer#master`.
51
-
- You can omit `PORT`/`HOST` if you prefer defaults; they are shown here to bind on `http://localhost:3000`.
52
-
- If you previously saw “Cannot extend config from github:InjectiveLabs/injective-ui/layer#master”, ensure `LOCAL_LAYER=true` is set when running locally.
183
+
The dev server will start on `http://127.0.0.1:3000` (configurable via `PORT` and `HOST` in `.env`).
184
+
185
+
**Notes:**
186
+
- By default, the app uses the **vendored**`injective-ui` layer from this repo (faster, offline-capable).
187
+
- To use the **remote** layer from GitHub instead, set `LOCAL_LAYER=false` in `.env` or run `yarn dev:remote`.
188
+
- For security, the dev server binds to `127.0.0.1` (localhost-only). Use `HOST=0.0.0.0` in `.env` if you need network access.
0 commit comments