feat/rpc-api
branch, start the Docker environment, and start the dev server.docker/run
Ctrl+Space
and mouse control is enabled by default.exit
again to quit and stop the containers./workspace
)./manage.py runserver 8001
/workspace/client
)npm run dev
npm run build
To create demo data, open an app container shell and run the management command
./manage.py create_rpc_demo
This requires that the Datatracker dev server be running.
To remove all data and start afresh, you can run
./manage.py purge --yes-im-sure
and all data in the RPC tool's database will be reset. The Datatracker will not be reset, but running create_rpc_demo
again will work as intended.
This project uses two distinct HTTP APIs. Both are accessed using clients generated from OpenAPI specifications. The clients are generated using OpenAPI Generator.
rpctracker_api
This API is used by the Nuxt Client front end to communicate with the Django back end. This API is defined by this project through an OpenAPI specification in rpctracker_api.json
. The API is implemented using the django-rest-framework
and the spec is generated using drf-spectacular
.
rpcapi
This API is used by the Django back end to communicate with the Datatracker. It is implemented in the Datatracker code and described (as of Jan 2024) by a hand-written OpenAPI spec in rpcapi.json
. The current version of the spec is fetched from the Datatracker's feat/rpc-api
branch when starting this project's Docker environment. If the API is updated on the Datatracker side, you must manually copy the new rpcapi.json
into the root of this project and update the clients as described in the next section.
If changes are made to the APIs, you will need to update the clients. If this includes changes to the Datatracker's rpcapi.json
file you must first copy the new version of that file into this project's root. Then, from inside this project's Docker shell, run
./update-rpcapi
This uses OpenAPI Generator to regenerate rpctracker_api.json
and builds both the API clients. It may take a minute or two. When it is done, restart the Django dev server. The Nuxt server normally picks up the changes automatically.
To fully tear down the containers created in either of the VS Code or Generic steps, run the following command from the project root folder:
docker/cleanall
Press Y to confirm.