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 backend contains two SAFRS app variants over the same Northwind model layer:
3
+
This backend is the FastAPI SAFRS backend used by the demo container.
4
4
5
-
- a Flask app using `SafrsApi`
6
-
- a FastAPI app using `SafrsFastAPI`
7
-
8
-
They exist side by side so the same validation project can be used to compare consumer-facing behavior easily.
5
+
It can also be run standalone from this directory with `run.py`.
9
6
10
7
## Current intent
11
8
12
-
- both backends use the same SQLite database
13
-
- both backends expose the same resource and relationship names as the Northwind `admin.yaml`
14
-
- both backends use the same `admin.yaml`
15
-
- both backends are intended to run on port `5656`
16
-
17
-
The main SAFRS development track is FastAPI, but Flask remains the reference behavior. This project supports switching between them quickly.
9
+
- the demo container uses the FastAPI variant only
10
+
- the backend uses the Northwind SQLite database
11
+
- it exposes the same resource and relationship names as the shipped Northwind `admin.yaml`
12
+
- it serves the same `admin.yaml` used by the frontend
13
+
- the default standalone port is `5656`
18
14
19
-
## Quick start
15
+
## Run standalone
20
16
21
-
Create a virtual environment, install the requirements, and run one backend variant from this directory:
17
+
From this directory:
22
18
23
19
```bash
24
20
python -m venv .venv
25
21
. .venv/bin/activate
26
22
pip install -r requirements.txt
27
-
python run.py fastapi
28
-
```
29
-
30
-
Or:
31
-
32
-
```bash
33
-
python run.py flask
23
+
python run.py
34
24
```
35
25
36
-
Default URL targets for both variants:
26
+
Because `requirements.txt` contains `-e ../vendor/safrs`, run `pip install -r requirements.txt` from the `backend/` directory so that relative path resolves correctly.
The backend now exposes the full resource set currently described in `reference/nw-admin.yaml`:
@@ -74,4 +62,4 @@ The backend now exposes the full resource set currently described in `reference/
74
62
-`Territory`
75
63
-`Union`
76
64
77
-
The active validation focus is no longer basic exposure. It is parity: the Flask and FastAPI apps should both honor the same documented contract and accept the same consumer-facing include paths.
65
+
The active validation focus is consumer-facing parityand behavior validation against the frontend and example clients.
0 commit comments