- Docker Desktop
- WSL2 (Windows only)
- Clone this repository locally.
- Clone the ietf-tools/datatracker repository into another directory. Check out the
feat/rpc-api
branch, start the Docker environment, and start the dev server. - Continue using the steps for your preferred IDE:
- Create demo data if you have not already
- Open the project in VS Code
- When prompted, in the lower right corner, click Reopen in container
- Wait for the devcontainer to initialize. (This can take a few seconds/minutes the first time)
- The editor will automatically open 2 side-by-side terminals, running both the backend API server and the client dev server.
- Open http://localhost:8088 in your browser and login using some Datatracker user.
- In a terminal, from the project root folder, run the command:
docker/run
- Wait for the containers to initialize. (This can take a few seconds/minutes the first time)
- A tmux session will automatically be started with the backend API server running on the left and the client dev server running on the right.
- Open http://localhost:8088 in your browser and login using some Datatracker user.
- The tmux default prefix binding is set to
Ctrl+Space
and mouse control is enabled by default. - If you exit tmux, you'll land in a normal zsh prompt. Type
exit
again to quit and stop the containers.
- Start Server:
./manage.py runserver 8001
- Run Dev Server:
npm run dev
- Generate Production Build:
npm run build
To create demo data, open an app container shell and run the management command
./manage.py create_demo_data
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_demo_data
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.
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
.
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.