<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ohcnwiki.tellmey.fyi/index.php?action=history&amp;feed=atom&amp;title=Contributing%2FLocal_development%2FFrontend_setup</id>
	<title>Contributing/Local development/Frontend setup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ohcnwiki.tellmey.fyi/index.php?action=history&amp;feed=atom&amp;title=Contributing%2FLocal_development%2FFrontend_setup"/>
	<link rel="alternate" type="text/html" href="https://ohcnwiki.tellmey.fyi/index.php?title=Contributing/Local_development/Frontend_setup&amp;action=history"/>
	<updated>2026-07-06T05:18:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.4</generator>
	<entry>
		<id>https://ohcnwiki.tellmey.fyi/index.php?title=Contributing/Local_development/Frontend_setup&amp;diff=465&amp;oldid=prev</id>
		<title>Admin: Add Navbox contributing (via update-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://ohcnwiki.tellmey.fyi/index.php?title=Contributing/Local_development/Frontend_setup&amp;diff=465&amp;oldid=prev"/>
		<updated>2026-07-06T04:21:58Z</updated>

		<summary type="html">&lt;p&gt;Add Navbox contributing (via update-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:51, 6 July 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 80:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 80:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the full branch-naming, commit, and review process that applies across Care repos, see the [[Contributing/Contribution workflow|Contribution workflow]].&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the full branch-naming, commit, and review process that applies across Care repos, see the [[Contributing/Contribution workflow|Contribution workflow]].&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Navbox contributing}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Related}}&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Related}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://ohcnwiki.tellmey.fyi/index.php?title=Contributing/Local_development/Frontend_setup&amp;diff=197&amp;oldid=prev</id>
		<title>Admin: OHC identity seed</title>
		<link rel="alternate" type="text/html" href="https://ohcnwiki.tellmey.fyi/index.php?title=Contributing/Local_development/Frontend_setup&amp;diff=197&amp;oldid=prev"/>
		<updated>2026-07-04T23:07:25Z</updated>

		<summary type="html">&lt;p&gt;OHC identity seed&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Doc header&lt;br /&gt;
|type=guide&lt;br /&gt;
|domain=contributing&lt;br /&gt;
|title=Frontend setup&lt;br /&gt;
|order=2&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This guide walks you through running the Care frontend ([&amp;lt;nowiki/&amp;gt;https://github.com/ohcnetwork/care_fe &amp;lt;code&amp;gt;ohcnetwork/care_fe&amp;lt;/code&amp;gt;]) on your machine. The frontend is a React + TypeScript single-page app built with Vite.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Node.js&amp;#039;&amp;#039;&amp;#039; — the repository pins the runtime to &amp;#039;&amp;#039;&amp;#039;Node 22&amp;#039;&amp;#039;&amp;#039; via its &amp;lt;code&amp;gt;.node-version&amp;lt;/code&amp;gt; file. If you use a version manager such as [&amp;lt;nowiki/&amp;gt;https://github.com/nodenv/nodenv &amp;lt;code&amp;gt;nodenv&amp;lt;/code&amp;gt;] or [&amp;lt;nowiki/&amp;gt;https://github.com/Schniz/fnm &amp;lt;code&amp;gt;fnm&amp;lt;/code&amp;gt;], it will pick this up automatically; otherwise install a matching Node 22 release.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;npm&amp;#039;&amp;#039;&amp;#039; — ships with Node and is the package manager used by this project (the repo tracks a &amp;lt;code&amp;gt;package-lock.json&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;A running Care backend&amp;#039;&amp;#039;&amp;#039; — the frontend needs an API to talk to. Set up the backend first by following [[Contributing/Local development/Backend setup|Backend local setup]].&lt;br /&gt;
&lt;br /&gt;
{{Note|1=The repo does not declare an &amp;lt;code&amp;gt;engines&amp;lt;/code&amp;gt; field in &amp;lt;code&amp;gt;package.json&amp;lt;/code&amp;gt;, so npm will not block other Node versions. Stick to the version in &amp;lt;code&amp;gt;.node-version&amp;lt;/code&amp;gt; to match CI.}}&lt;br /&gt;
&lt;br /&gt;
== Install dependencies ==&lt;br /&gt;
&lt;br /&gt;
From the root of your &amp;lt;code&amp;gt;care_fe&amp;lt;/code&amp;gt; clone:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;npm install&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This also runs the project&amp;#039;s &amp;lt;code&amp;gt;postinstall&amp;lt;/code&amp;gt; step, which installs platform-specific dependencies and generates HTTP headers.&lt;br /&gt;
&lt;br /&gt;
== Point the frontend at your backend ==&lt;br /&gt;
&lt;br /&gt;
Create a &amp;lt;code&amp;gt;.env.local&amp;lt;/code&amp;gt; file in the project root and set the API URL to your local backend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;env&amp;quot;&amp;gt;# Point the frontend to your local backend&lt;br /&gt;
REACT_CARE_API_URL=http://127.0.0.1:9000&amp;lt;/pre&amp;gt;&lt;br /&gt;
The backend from [[Contributing/Local development/Backend setup|Backend local setup]] listens on port &amp;lt;code&amp;gt;9000&amp;lt;/code&amp;gt;, which is what the URL above expects. Make sure the backend is running and has dummy data loaded before you sign in.&lt;br /&gt;
&lt;br /&gt;
== Run the development server ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;npm run dev&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once the dev server is up, open [http://localhost:4000 http://localhost:4000] in your browser. The page reloads automatically when you save edits, and lint errors surface in the terminal.&lt;br /&gt;
&lt;br /&gt;
{{Tip|1=After loading dummy data into your local backend, you can sign in with the seeded development credentials documented in the backend setup. If sign-in fails, confirm the backend is reachable at the &amp;lt;code&amp;gt;REACT_CARE_API_URL&amp;lt;/code&amp;gt; you configured.}}&lt;br /&gt;
&lt;br /&gt;
== npm scripts that matter ==&lt;br /&gt;
&lt;br /&gt;
These are the scripts contributors reach for most often. All are defined in &amp;lt;code&amp;gt;package.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Script&lt;br /&gt;
! What it does&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;npm run dev&amp;lt;/code&amp;gt;&lt;br /&gt;
| Start the Vite dev server at &amp;lt;code&amp;gt;http://localhost:4000&amp;lt;/code&amp;gt; with hot reload.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;npm run build&amp;lt;/code&amp;gt;&lt;br /&gt;
| Build the production bundle into the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;npm run preview&amp;lt;/code&amp;gt;&lt;br /&gt;
| Serve the production build locally (with the service worker).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;npm run lint&amp;lt;/code&amp;gt;&lt;br /&gt;
| Run ESLint over &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;npm run lint-fix&amp;lt;/code&amp;gt;&lt;br /&gt;
| Run ESLint over &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt; and auto-fix what it can.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;npm run format&amp;lt;/code&amp;gt;&lt;br /&gt;
| Format &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tests&amp;lt;/code&amp;gt; with Prettier.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;npm run test&amp;lt;/code&amp;gt;&lt;br /&gt;
| Run a Snyk dependency scan (this is what &amp;lt;code&amp;gt;test&amp;lt;/code&amp;gt; maps to; end-to-end tests use the &amp;lt;code&amp;gt;playwright:*&amp;lt;/code&amp;gt; scripts).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|1=There is no unit-test runner wired into &amp;lt;code&amp;gt;npm run test&amp;lt;/code&amp;gt;. The functional test suite runs through Playwright via the &amp;lt;code&amp;gt;playwright:*&amp;lt;/code&amp;gt; scripts (for example &amp;lt;code&amp;gt;npm run playwright:test&amp;lt;/code&amp;gt;). Setting those up requires a local backend with dummy data — see the repository&amp;#039;s README and &amp;lt;code&amp;gt;tests/&amp;lt;/code&amp;gt; directory for details.}}&lt;br /&gt;
&lt;br /&gt;
== Opening a pull request ==&lt;br /&gt;
&lt;br /&gt;
A few conventions from the frontend repo&amp;#039;s README, in brief:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Claim the issue&amp;#039;&amp;#039;&amp;#039; by commenting on it before you start, and link your pull request to the issue.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Tag &amp;lt;code&amp;gt;@ohcnetwork/care-fe-code-reviewers&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; on your pull request for a faster review.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Attach screenshots&amp;#039;&amp;#039;&amp;#039; of any UI changes so reviewers can see the result without checking out your branch.&lt;br /&gt;
&lt;br /&gt;
For the full branch-naming, commit, and review process that applies across Care repos, see the [[Contributing/Contribution workflow|Contribution workflow]].&lt;br /&gt;
&lt;br /&gt;
{{Related}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>