Update Frontend Setup Documentation #287
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
key changes:
nvm
to use the official curl command and not an npm packagePasting the markdown below so you don't have to go search for what it looks like:
H.E.A.T. Frontend Setup Documentation
This guide will help you set up the frontend application for the Home Energy
Analysis Tool (H.E.A.T.) project. Please follow these instructions carefully.
Prerequisites
Install Git Large File Storage (Git LFS)
Git LFS is required to manage large files in the repository. Choose one of the
methods below to install it:
Method 1: Using Homebrew (Recommended)
Method 2: Manual Installation
For more details, visit the
official documentation.
Repository Setup
Fork the repository
Go to the
home-energy-analysis-tool repository
and click the "Fork" button at the top right to create your own copy of the
repository.
Clone your forked repository
After forking, clone your fork to your local machine using the following
command (replace
your-username
with your GitHub username):Navigate to the project directory
Change into the
heat-stack
directory within the project:cd home-energy-analysis-tool/heat-stack
Copy the example environment file
Copy the example environment file into a new
.env
file:Node.js Setup
The project requires Node.js version 18 to avoid engine errors with node v19+.
Use Node Version Manager (NVM)
for managing Node.js versions (nvm is preinstalled in coding spaces).
Install NVM (Official Method)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Install Dependencies and Build
Install project dependencies:
Build the rules engine into the
public/pyodide-env
folder:Start the development server:
If you encounter errors during this process, try the following steps:
node_modules
folder andpackage-lock.json
file:Setting Up in GitHub Codespaces
If using GitHub Codespaces, follow these steps:
Navigate to the project directory:
cd home-energy-analysis-tool/heat-stack
Create an environment file:
Use Node.js version 18:
Install dependencies and build:
Disable auto-save in VSCode (this is to avoid auto recompiling and page
refresh while making changes):
this Stack Overflow post.
Handling Special Cases
Updating Pyodide
If the version of Pyodide changes or you encounter issues with the Pyodide
environment:
cp ./node_modules/pyodide/* public/pyodide-env/
numpy
wheel file is in thepublic/pyodide-env
folder.If missing:
Pyodide releases.
numpy
wheel file.public/pyodide-env
folder.numpy
file matches the version.Fixing Loader Errors
If you encounter a loader error, run:
Additional Notes
npm audit fix
command can resolve minor dependency issues.Script Overview
Below is a table summarizing the available scripts in the project:
npm run build
npm run build:icons
npm run build:remix
npm run build:server
npm run predev
npm run dev
npm run prisma:studio
npm run format
npm run lint
npm run setup
npm run start
npm run start:mocks
npm run test
npm run buildpy
public/pyodide-env
folder.npm run coverage
npm run test:e2e
npm run test:e2e:run
npm run test:e2e:install
npm run typecheck
npm run validate
Epic Stack Docs:
The Epic Stack 🚀
Ditch analysis paralysis and start shipping Epic Web apps.This is an opinionated project starter and reference that allows teams to ship their ideas to production faster and on a more stable foundation based on the experience of Kent C. Dodds and contributors.
The Epic Stack
Watch Kent's Introduction to The Epic Stack
"The Epic Stack" by Kent C. Dodds
Docs
Read the docs
(please 🙏).
Support
discussion on GitHub
and the KCD Community on Discord.
idea discussion
for suggestions.
report a bug.
Branding
Want to talk about the Epic Stack in a blog post or talk? Great! Here are some
assets you can use in your material:
EpicWeb.dev/brand
Thanks
You rock 🪨