Skip to content

Commit c87b059

Browse files
committed
docs: replace legacy backend docs with clearer guides
1 parent 5ecf77b commit c87b059

68 files changed

Lines changed: 2248 additions & 3286 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ build/
2020
/chem_spectra/tmp/
2121
!/chem_spectra/tmp/.keep
2222

23-
src/
23+
/src/

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ The frontend is provided by [chem-spectra-client](https://github.com/ComPlat/che
1111
## Documentation
1212

1313
1. [Installation](INSTALL.md)
14-
2. [Demo & step-by-step manual](https://github.com/ComPlat/react-spectra-editor/blob/master/DEMO_MANUAL.md)
15-
3. Software's [Archicture](./docs/ARCHITECTURE.md)
14+
2. [Developer onboarding](docs/onboarding.md)
15+
3. [Backend architecture](docs/architecture.md)
16+
4. [API reference](docs/api-reference.md)
17+
5. [Core runtime flows](docs/core-flows.md)
18+
6. [Diagram maintenance](docs/dev/diagrams.md)
19+
7. [Demo & step-by-step manual](https://github.com/ComPlat/react-spectra-editor/blob/master/DEMO_MANUAL.md)
1620

1721
### Run test
1822

docs/ARCHITECTURE.md

Lines changed: 0 additions & 116 deletions
This file was deleted.

docs/api-reference.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# API Reference
2+
3+
This document lists the HTTP routes exposed by `chem-spectra-app`.
4+
5+
Use `docs/architecture.md` for component boundaries and `docs/core-flows.md` for runtime behavior. This file is the compact route-level reference for handlers, main inputs, and main outputs.
6+
7+
## `file_api`
8+
9+
| Route | Handler | Main input | Main output |
10+
|---|---|---|---|
11+
| `POST /api/v1/chemspectra/file/convert` | `chemspectra_file_convert()` | `file`, optional `molfile`, form params | JSON with base64 `jcamp` and `img`, or BagIt `list_jcamps` |
12+
| `POST /api/v1/chemspectra/file/save` | `chemspectra_file_save()` | `src`, `dst` or `dst_list`, optional `molfile`, form params | `spectrum.zip` containing source, generated files, predictions, optional CSV |
13+
| `POST /api/v1/chemspectra/file/refresh` | `chemspectra_file_refresh()` | `dst` or `dst_list`, optional `molfile`, form params | JSON with base64 `jcamp` and `img`, or `spectrum.zip` for multiple files |
14+
| `POST /api/v1/chemspectra/molfile/convert` | `chemspectra_molfile_convert()` | `molfile` | JSON with `smi`, `mass`, and molecule `svg` |
15+
16+
## `transform_api`
17+
18+
| Route | Handler | Main input | Main output |
19+
|---|---|---|---|
20+
| `POST /zip_jcamp_n_img` | `zip_jcamp_n_img()` | `file`, optional `molfile`, form params | `spectrum.zip` with JCAMP/image/optional CSV, plus `X-Extra-Info-JSON` |
21+
| `POST /zip_jcamp` | `zip_jcamp()` | `file`, optional `molfile`, form params | `spectrum.zip` with JCAMP files |
22+
| `POST /zip_image` | `zip_image()` | `file`, optional `molfile`, form params | `spectrum.zip` with image files |
23+
| `POST /jcamp` | `jcamp()` | `file`, optional `molfile`, form params | `spectrum.jdx` |
24+
| `POST /image` | `image()` | `file`, optional `molfile`, form params | `spectrum.png` |
25+
| `POST /nmrium` | `nmrium()` | NMRium `file` | `spectrum.jdx`, or `404` if conversion fails |
26+
| `POST /combine_images` | `combine_images()` | `files[]`, form params, optional `extras` | `spectrum.zip` with combined image output |
27+
28+
## `inference_api`
29+
30+
| Route | Handler | Main input | Main output |
31+
|---|---|---|---|
32+
| `POST /predict/by_peaks_json` | `chemspectra_predict_by_peaks_json()` | JSON `layout`, `peaks`, `shift`, `molfile` | prediction JSON |
33+
| `POST /api/v1/chemspectra/predict/nmr_peaks_json` | `chemspectra_predict_by_peaks_json()` | JSON `layout`, `peaks`, `shift`, `molfile` | prediction JSON |
34+
| `POST /predict/by_peaks_form` | `chemspectra_predict_by_peaks_form()` | form `layout`, `peaks`, `shift`, `molfile`, optional `spectrum` | prediction JSON |
35+
| `POST /api/v1/chemspectra/predict/nmr_peaks_form` | `chemspectra_predict_by_peaks_form()` | form `layout`, `peaks`, `shift`, `molfile`, optional `spectrum` | prediction JSON |
36+
| `POST /predict/infrared` | `chemspectra_predict_infrared()` | `layout`, `spectrum`, `molfile` | prediction JSON |
37+
| `POST /api/v1/chemspectra/predict/infrared` | `chemspectra_predict_infrared()` | `layout`, `spectrum`, `molfile` | prediction JSON |
38+
| `POST /predict/ms` | `chemspectra_predict_ms()` | `layout`, `spectrum`, `molfile` | prediction JSON |
39+
| `POST /api/v1/chemspectra/predict/ms` | `chemspectra_predict_ms()` | `layout`, `spectrum`, `molfile` | prediction JSON |
40+
41+
## `spectra_layout_api`
42+
43+
| Route | Handler | Main input | Main output |
44+
|---|---|---|---|
45+
| `GET /api/v1/chemspectra/spectra_layouts` | `get_spectra_layouts()` | none | JSON layout mapping from JCAMP data type configuration |

0 commit comments

Comments
 (0)