Repository navigation
Development
Day-to-day work in this repository: the common tasks and the conventions to follow. See Getting-Started for first-time setup.
There is no linter, formatter, or test suite configured — package.json defines
only the five Astro scripts. The build is the only automated check, and it is the
one the deploy workflow runs. Before opening a pull request, confirm
npm run build succeeds.
.gitignore covers node_modules/, dist/, .astro/, and .wrangler/. Never
commit a build output.
- Create
src/pages/<name>.astro. The filename becomes the route. - Import and wrap the body in
<Layout>, passing at minimum atitleand, for anything public-facing, adescription. - Reuse the container and section conventions in Styling so the page matches the rest of the site.
- If it should appear in the header, add an entry to the
leftNavarray inLayout.astro, with an icon path innavIcon. If it should appear in the footer, add a list item in the relevant footer column.
Most copy is in a frontmatter array rather than in markup — see Content-and-Pages for the exact constant per section. Editing the array is almost always the right move; editing the markup that renders it duplicates content that was deliberately hoisted.
- Put the file in
public/. Product screenshots are.webp. - Reference it by root-relative path, so
public/foo.webpbecomes/foo.webp. - Give it real
widthandheightattributes to avoid layout shift, andloading="lazy"for anything below the fold. - Add
data-lightboxif it should be zoomable, andclass="cursor-zoom-in"so the cursor advertises it. The layout's lightbox script picks it up automatically. - Write a meaningful
alt, oralt=""if the image is decorative.
Import Mermaid.astro, define the diagram source as a template literal in the
page frontmatter, and pass it as code with an optional caption. Diagrams
render in the browser from a CDN import, so check them with npm run dev rather
than assuming a successful build means the diagram is valid — a Mermaid syntax
error surfaces only at runtime, in the browser console.
/docs renders public/openapi.json. The openapi-sync workflow regenerates
it from the reportmate-api source every day and deploys when it changed, so it
needs no hand edits. To pick up an API change sooner, run the workflow on
main from the Actions tab (workflow_dispatch). The page itself needs no
change.
Bumping the pinned Stoplight Elements version in docs.astro means updating the
version in both the stylesheet and script URLs and recomputing both
Subresource Integrity hashes. A stale integrity value blocks the resource
silently, leaving an empty docs panel.
Dependencies are few — Astro, the Tailwind integration, and Tailwind itself.
Update them together and commit the resulting package-lock.json, since the
workflow runs npm ci and will fail if the lockfile is out of step with
package.json.
GitHub Actions are pinned by commit SHA with the version tag in a trailing comment; update both together.
Contribution terms are org-wide and live in the
.github repository: the
CONTRIBUTING guide
and the CLA. In short,
branch from the default branch, keep a pull request to one change, make sure the
build passes, and sign off every commit with git commit -s.
This repository is MIT licensed.
MIT licensed — reportmate.app