Skip to content

Commit dca6654

Browse files
authored
docs(readme): refresh per #422 (#580)
- Document the data model and end-to-end alert flow at the top, with a link to CONTRIBUTING.md for the full breakdown. - Split Quick Tour into a user path (docker compose pull/up against the published image, no Poetry needed) and a contributor path (make run, which builds locally and requires Poetry). - Fix the docs URL: 8080 -> 5050 to match docker-compose.yml. - Drop the outdated Swagger screenshot from the v0.1.2 release. - Remove the dead Heroku redoc badge (also fixes its brain=main typo). - Reframe the Contributing section to highlight that CONTRIBUTING.md also covers data model, codebase tour and developer setup.
1 parent 74395ab commit dca6654

1 file changed

Lines changed: 28 additions & 26 deletions

File tree

README.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
<a href="https://github.com/pyronear/pyro-api/actions?query=workflow%3Abuilds">
55
<img alt="CI Status" src="https://img.shields.io/github/actions/workflow/status/pyronear/pyro-api/builds.yml?branch=main&label=CI&logo=github&style=flat-square">
66
</a>
7-
<a href="http://pyronear-api.herokuapp.com/redoc">
8-
<img src="https://img.shields.io/github/actions/workflow/status/pyronear/pyro-api/builds.yml?brain=main&label=docs&logo=read-the-docs&style=flat-square" alt="Documentation Status">
9-
</a>
107
<a href="https://codecov.io/gh/pyronear/pyro-api">
118
<img src="https://img.shields.io/codecov/c/github/pyronear/pyro-api.svg?logo=codecov&style=flat-square" alt="Test coverage percentage">
129
</a>
@@ -32,21 +29,38 @@
3229

3330
The building blocks of our wildfire detection & monitoring API.
3431

32+
The API stores access metadata (Users, Cameras, Organizations), the core wildfire-monitoring workflow (Detections grouped into Sequences), and client integrations (Webhooks). End to end, an alert flows like this: an admin registers a user, the user registers a camera and mints a camera token, then the camera uploads a picture as a detection, which is grouped into a sequence over a dense time window. For the full data model, UML diagram, codebase tour and developer setup, see [`CONTRIBUTING.md`](CONTRIBUTING.md).
33+
3534
## Quick Tour
3635

37-
### Running/stopping the service
36+
Two ways to run the stack, depending on whether you just want to use the API or to develop against it.
3837

39-
You can run the API containers using this command:
38+
### As a user (no Poetry needed)
39+
40+
Pull the published `ghcr.io/pyronear/alert-api` image and start the stack:
4041

4142
```shell
42-
make run
43+
cp .env.example .env
44+
docker compose pull
45+
docker compose up
4346
```
4447

45-
You can now navigate to `http://localhost:8080/docs` to interact with the API (or do it through HTTP requests) and explore the documentation.
48+
Then navigate to [http://localhost:5050/docs](http://localhost:5050/docs) to interact with the API and explore the OpenAPI documentation.
4649

47-
![Swagger](https://github.com/pyronear/pyro-api/releases/download/v0.1.2/swagger_interface.png)
50+
To stop the service:
51+
```shell
52+
docker compose down
53+
```
54+
55+
### As a contributor (builds locally, requires Poetry)
4856

49-
In order to stop the service, run:
57+
```shell
58+
make run
59+
```
60+
61+
This regenerates `requirements.txt` from `poetry.lock` and builds the backend image locally, so it requires [Poetry](https://python-poetry.org/docs/) to be installed. See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full developer setup, tests, and migration workflow.
62+
63+
To stop the service:
5064
```shell
5165
make stop
5266
```
@@ -59,28 +73,16 @@ make stop
5973
- [Docker](https://docs.docker.com/engine/install/)
6074
- [Docker compose](https://docs.docker.com/compose/)
6175

62-
### Starting your service
76+
Contributors building the image locally also need [Poetry](https://python-poetry.org/docs/); see [`CONTRIBUTING.md`](CONTRIBUTING.md).
77+
78+
### First-time setup
6379

64-
#### 1 - Clone the repository
6580
```shell
6681
git clone https://github.com/pyronear/pyro-api.git && cd pyro-api
67-
```
68-
#### 2 - Set your environment variables
69-
First copy the example environment setup
70-
```shell
7182
cp .env.example .env
7283
```
7384

74-
#### 3 - Start the services
75-
76-
```shell
77-
docker compose pull
78-
docker compose up
79-
```
80-
81-
#### 4 - Check how what you've deployed
82-
83-
You can now access your backend API at [http://localhost:5050/docs](http://localhost:5050/docs)
85+
Then run the stack as described in the [Quick Tour](#quick-tour) above.
8486

8587

8688
## More goodies
@@ -94,7 +96,7 @@ This project is a REST-API, and you can interact with the service through HTTP r
9496

9597
Any sort of contribution is greatly appreciated!
9698

97-
You can find a short guide in [`CONTRIBUTING`](CONTRIBUTING.md) to help grow this project!
99+
[`CONTRIBUTING.md`](CONTRIBUTING.md) covers more than the contribution guidelines: it also documents the data model, codebase structure, developer setup, testing workflow and database migrations. Start there if you want to understand how the project is organised.
98100

99101

100102

0 commit comments

Comments
 (0)