- Pytest, coverage, pre-commit hooks, and code style enforcement for backend; run `pytest` from the backend folder.
- Jest and React Testing Library, code style enforcement and additional pre-commit hooks for frontend; run `yarn run jest` from the frontend folder.
- All tests can be run from the`nox` command in the root directory, or for tests specific to each part of the project, run `nox` in either `frontend` or `backend` respectively.
-`nox` frontend tests include: `pre-commit`, `coverage`, `audit`, `storybook`, and `jest`.
- I use primarily copilot inside my VSCode. This was done through conversations I had with the AI about the state of the code, and ways to improve things, or for setting up documentation, etc as I explain below.
- Any use is extremely caveated by me needing to adjust and correct what was conceieved by the AI, as it is a helpful tool, but often gets little details incorrect.
- The Dockerfile.backend and Dockerfile.frontend - to speed up the process of getting docker loaded efficiently for the project.
- The compose.yml file - getting the different images gathered together quickly.
- The compose.dev.yml file - used to get a further understanding of how to hook up an extension to the previous file.
- The mermaid diagrams used in this file.
- I have the CodeGPT plugin in VSCode, and it has helped with docstrings, logging messages, and sometimes reducing the time it takes me to write out the code.
- I used AI to rapidly set up tests for each users component (router, service), then adapted it to the others independently. I believe AI is great for getting reasonable tests written quickly, and then I simply refined it, and replicated the kinds of tests across the different components.
- My frontend skills are less polished than my backend skills. I've been using AI along the lines of how I would use StackOverflow, answering questions to help me get the code written.
This project uses [Nox](https://nox.thea.codes/) for orchestrating development, testing, and code quality sessions across both frontend and backend. Pre-commit hooks are managed via [pre-commit](https://pre-commit.com/) and are integrated into the Nox workflow for consistent linting and formatting.
- **Nox sessions** are defined in both the project root and in the `frontend` and `backend` directories. You can run all sessions from the root, or target frontend/backend specifically.
- **Pre-commit** is run as a Nox session (`nox -s pre-commit`) and also as a git hook. Both use pinned tool versions and shared config files for consistency.
- **Typical usage:**
- Run all checks: `nox` (from root)
- Run only frontend checks: `cd frontend && nox`
- Run only backend checks: `cd backend && nox`
- Run pre-commit manually: `nox -s pre-commit` or `pre-commit run --all-files`
**Q: Why does isort or black change files differently in Nox vs pre-commit?**
A: Make sure both Nox and pre-commit are using the same pinned tool versions and config files. See `.isort.cfg` and `.pre-commit-config.yaml` for details.
**Q: Why does Storybook open the browser or not exit when run in CI/Nox?**
A: Use `yarn build-storybook` for static builds (exits automatically). For dev server, use `yarn storybook dev --ci` to prevent browser opening.
**Q: Why do pre-commit hooks modify files after a commit or behave differently in CI?**
A: Pre-commit runs in its own environment. Always run `pre-commit run --all-files` locally to reproduce CI behavior. Ensure your config files are up to date and tool versions are pinned.
**Q: How do I run only frontend or backend tests?**
A: Use Nox in the respective directory (`cd frontend && nox`, `cd backend && nox`).
**Q: How do I fix environment or dependency issues?**
A: Delete `.venv` or `node_modules` and reinstall dependencies (`poetry install` for backend, `yarn install` for frontend). Check for version mismatches in config files.
**Q: Where are config files for formatting and type checking?**
A: See `.isort.cfg`, `.coveragerc`, and `mypy.ini` in the project root. These are derived from backend settings for consistency.