The official website for hREA (Holochain Resource-Event-Agent), built with Gatsby and TypeScript.
Before you begin, ensure you have Node.js installed on your system. We recommend using Node Version Manager (nvm) for easy Node.js version management.
-
Install nvm (if you haven't already):
Follow the installation instructions at: https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating
# After installation, restart your terminal or run: source ~/.bashrc
-
Install and use the latest LTS Node.js version:
# Install the latest LTS version of Node.js nvm install --lts # Use the LTS version nvm use --lts # Verify installation node --version npm --version
-
Clone the repository (if you haven't already):
git clone <repository-url> cd hrea-site
-
Install dependencies:
npm install
-
Start the development server:
npm start
The site will be available at
http://localhost:8000🎉 That's it! Your development environment is now ready.
npm startornpm run develop- Start the development server with hot reloadingnpm run build- Build the site for productionnpm run serve- Serve the production build locallynpm run clean- Clean the Gatsby cache and public foldersnpm run typecheck- Run TypeScript type checking
src/
├── pages/ # Website pages (auto-generates routes)
│ ├── index.tsx # Homepage (/)
│ └── 404.tsx # 404 error page
├── components/ # Reusable React components
├── images/ # Static images
├── svgs/ # SVG icons and graphics
├── fonts/ # Custom fonts
└── global.scss # Global styles
- Homepage: Edit
src/pages/index.tsxto modify the homepage content - New pages: Create new
.tsxfiles insrc/pages/- they'll automatically become routes- Example:
src/pages/about.tsxbecomes/about - Example:
src/pages/contact.tsxbecomes/contact
- Example:
When you run npm start, Gatsby provides:
- Hot reloading: Changes to pages and components are reflected instantly
- GraphQL playground: Available at
http://localhost:8000/___graphql - Error overlay: Detailed error information displayed in the browser
- Edit content: Modify files in
src/pages/orsrc/components/ - Save the file: Changes are automatically detected
- View updates: Your browser will refresh automatically to show the changes
- Global styles: Edit
src/global.scss - Component styles: Each component has its own
.scssfile - SASS support: The project uses SASS for enhanced CSS capabilities
Place images in src/images/ and import them in your components using Gatsby's image processing capabilities.