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
This folder contains a minimal FastAPI backend that exposes a stubbed **query-to-facets** endpoint for experimentation and PoC work.
4
+
5
+
## Requirements
6
+
7
+
- Python 3.9+
8
+
-`pip`
9
+
10
+
## Set up a Python virtual environment
11
+
12
+
From the repo root:
13
+
14
+
```bash
15
+
python -m venv backend/.venv
16
+
source backend/.venv/bin/activate
17
+
python -m pip install --upgrade pip
18
+
```
19
+
20
+
## Install dependencies
21
+
22
+
From the repo root:
23
+
24
+
```bash
25
+
pip install -r backend/requirements.txt
26
+
```
27
+
28
+
## Run the server
29
+
30
+
From the repo root:
31
+
32
+
```bash
33
+
uvicorn backend.main:app --reload
34
+
```
35
+
36
+
## Format code
37
+
38
+
From the repo root:
39
+
40
+
```bash
41
+
python -m black backend
42
+
```
43
+
44
+
The app will start on `http://127.0.0.1:8000` by default.
45
+
46
+
### Endpoint
47
+
48
+
-**Method:**`POST`
49
+
-**Path:**`/api/v0/facets`
50
+
-**Request body:**
51
+
52
+
```json
53
+
{ "query": "string" }
54
+
```
55
+
56
+
-**Example request:**
57
+
58
+
```bash
59
+
curl -sS -X POST "http://127.0.0.1:8000/api/v0/facets" \
60
+
-H "Content-Type: application/json" \
61
+
-d '{ "query": "public bam files for latino patients with diabetes" }'
62
+
```
63
+
64
+
-**Response:** currently returns a **hard-coded** JSON structure representing resolved facets for the query. This is intentionally stubbed for PoC and will be replaced by a real implementation later.
0 commit comments