Skip to content

Commit 5e7393f

Browse files
DoodleBUGS Project: Phase 2 (Backend) (#388)
Improved lot of things, data input, code generation, minor bugs. Added backend (local runtime) -- not perfectly working
1 parent b3cb45a commit 5e7393f

File tree

15 files changed

+2836
-472
lines changed

15 files changed

+2836
-472
lines changed

DoodleBUGS/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ digest.txt
1010
root.txt
1111
src.txt
1212
public.txt
13+
runtime.txt
1314

1415
node_modules
1516
.DS_Store
@@ -18,6 +19,7 @@ dist-ssr
1819
coverage
1920
*.local
2021
ztest
22+
tmp
2123

2224
/cypress/videos/
2325
/cypress/screenshots/

DoodleBUGS/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,35 @@ npm run preview
4343
```
4444

4545
For more information, questions, or to get involved, please contact [@shravanngoswamii](https://github.com/shravanngoswamii) (Ping me on [Julia Slack](https://julialang.slack.com/archives/CCYDC34A0)).
46+
47+
> [!TIP]
48+
> You can generate a standalone Julia script directly from the app: open the navbar → `Connection``Generate Standalone Julia Script`.
49+
> The script opens in the right sidebar's Execution panel under the Files tab, where you can copy or download it.
50+
51+
## Backend (Julia) Quick Start
52+
53+
The DoodleBUGS app can connect to a local Julia backend for running models.
54+
55+
1. Clone this repository and open a terminal at the repo root.
56+
2. Instantiate backend dependencies (first time only):
57+
58+
```bash
59+
julia --project=DoodleBUGS/runtime -e "using Pkg; Pkg.instantiate()"
60+
```
61+
62+
3. Start the backend server (defaults to http://localhost:8081):
63+
64+
```bash
65+
julia --project=DoodleBUGS/runtime DoodleBUGS/runtime/server.jl
66+
```
67+
68+
4. In the DoodleBUGS app, open the navbar → `Connection` → set URL to `http://localhost:8081``Connect`.
69+
70+
Notes:
71+
- Keep the backend terminal open while using the app.
72+
- If the port is in use or blocked by a firewall, change the port in `DoodleBUGS/runtime/server.jl` and reconnect (the port is currently set to 8081 at the end of the file).
73+
74+
#### Troubleshooting
75+
76+
- To verify connectivity, open your browser at `http://localhost:8081/api/health` (replace 8081 if you changed the port). A healthy server returns `{ "status": "ok" }`.
77+
- If the health check fails, ensure the server is running, the URL/port are correct, and no firewall or VPN is blocking the port. Check the backend terminal output for errors.
Lines changed: 55 additions & 225 deletions
Original file line numberDiff line numberDiff line change
@@ -1,227 +1,57 @@
11
{
2-
"data": {
3-
"N": 30,
4-
"T": 5,
5-
"x": [
6-
8.0,
7-
15.0,
8-
22.0,
9-
29.0,
10-
36.0
11-
],
12-
"xbar": 22,
13-
"Y": [
14-
[
15-
151,
16-
199,
17-
246,
18-
283,
19-
320
20-
],
21-
[
22-
145,
23-
199,
24-
249,
25-
293,
26-
354
27-
],
28-
[
29-
147,
30-
214,
31-
263,
32-
312,
33-
328
34-
],
35-
[
36-
155,
37-
200,
38-
237,
39-
272,
40-
297
41-
],
42-
[
43-
135,
44-
188,
45-
230,
46-
280,
47-
323
48-
],
49-
[
50-
159,
51-
210,
52-
252,
53-
298,
54-
331
55-
],
56-
[
57-
141,
58-
189,
59-
231,
60-
275,
61-
305
62-
],
63-
[
64-
159,
65-
201,
66-
248,
67-
297,
68-
338
69-
],
70-
[
71-
177,
72-
220,
73-
260,
74-
309,
75-
331
76-
],
77-
[
78-
134,
79-
182,
80-
220,
81-
260,
82-
295
83-
],
84-
[
85-
160,
86-
208,
87-
261,
88-
313,
89-
352
90-
],
91-
[
92-
143,
93-
188,
94-
220,
95-
273,
96-
314
97-
],
98-
[
99-
154,
100-
200,
101-
244,
102-
289,
103-
325
104-
],
105-
[
106-
161,
107-
218,
108-
266,
109-
304,
110-
340
111-
],
112-
[
113-
142,
114-
184,
115-
223,
116-
262,
117-
298
118-
],
119-
[
120-
156,
121-
203,
122-
243,
123-
283,
124-
317
125-
],
126-
[
127-
157,
128-
212,
129-
259,
130-
307,
131-
336
132-
],
133-
[
134-
152,
135-
203,
136-
245,
137-
286,
138-
324
139-
],
140-
[
141-
154,
142-
205,
143-
253,
144-
298,
145-
334
146-
],
147-
[
148-
139,
149-
190,
150-
225,
151-
267,
152-
302
153-
],
154-
[
155-
146,
156-
196,
157-
247,
158-
289,
159-
321
160-
],
161-
[
162-
161,
163-
215,
164-
254,
165-
293,
166-
332
167-
],
168-
[
169-
153,
170-
207,
171-
256,
172-
303,
173-
345
174-
],
175-
[
176-
149,
177-
198,
178-
245,
179-
287,
180-
324
181-
],
182-
[
183-
144,
184-
192,
185-
242,
186-
289,
187-
326
188-
],
189-
[
190-
162,
191-
211,
192-
262,
193-
315,
194-
357
195-
],
196-
[
197-
157,
198-
202,
199-
242,
200-
281,
201-
316
202-
],
203-
[
204-
150,
205-
204,
206-
256,
207-
298,
208-
335
209-
],
210-
[
211-
151,
212-
202,
213-
248,
214-
290,
215-
325
216-
],
217-
[
218-
163,
219-
216,
220-
265,
221-
307,
222-
342
223-
]
224-
]
225-
},
226-
"inits": {}
2+
"data": {
3+
"N": 30,
4+
"T": 5,
5+
"x": [8.0, 15.0, 22.0, 29.0, 36.0],
6+
"xbar": 22,
7+
"Y": [
8+
[151, 199, 246, 283, 320],
9+
[145, 199, 249, 293, 354],
10+
[147, 214, 263, 312, 328],
11+
[155, 200, 237, 272, 297],
12+
[135, 188, 230, 280, 323],
13+
[159, 210, 252, 298, 331],
14+
[141, 189, 231, 275, 305],
15+
[159, 201, 248, 297, 338],
16+
[177, 236, 285, 350, 376],
17+
[134, 182, 220, 260, 296],
18+
[160, 208, 261, 313, 352],
19+
[143, 188, 220, 273, 314],
20+
[154, 200, 244, 289, 325],
21+
[171, 221, 270, 326, 358],
22+
[163, 216, 242, 281, 312],
23+
[160, 207, 248, 288, 324],
24+
[142, 187, 234, 280, 316],
25+
[156, 203, 243, 283, 317],
26+
[157, 212, 259, 307, 336],
27+
[152, 203, 246, 286, 321],
28+
[154, 205, 253, 298, 334],
29+
[139, 190, 225, 267, 302],
30+
[146, 191, 229, 272, 302],
31+
[157, 211, 250, 285, 323],
32+
[132, 185, 237, 286, 331],
33+
[160, 207, 257, 303, 345],
34+
[169, 216, 261, 295, 333],
35+
[157, 205, 248, 289, 316],
36+
[137, 180, 219, 258, 291],
37+
[153, 200, 244, 286, 324]
38+
]
39+
},
40+
"inits": {
41+
"alpha": [
42+
250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0,
43+
250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0,
44+
250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0
45+
],
46+
"beta": [
47+
6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0,
48+
6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0,
49+
6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0
50+
],
51+
"alpha.c": 150.0,
52+
"beta.c": 10.0,
53+
"tau.c": 1.0,
54+
"alpha.tau": 1.0,
55+
"beta.tau": 1.0
56+
}
22757
}

0 commit comments

Comments
 (0)