Local Setup
This guide walks through setting up a local development environment for the MicroHAMS website.
Prerequisites
- Node.js 22+ — Check with
node --version - Git — For cloning and version control
- A code editor — VS Code recommended
Quick Start
# Clone the repository
git clone https://github.com/MicrohamsARC/MicrohamsARC.github.io.git
cd MicrohamsARC.github.io
# Install dependencies
npm install
# Start development server
npm run dev Open http://localhost:4321 in your browser.
Available Commands
| Command | Description |
|---|---|
npm run dev | Start development server with hot reload |
npm run build | Build production site to ./dist |
npm run preview | Preview production build locally |
npm run test | Run unit tests (Vitest) |
npm run test:e2e | Run end-to-end tests (Playwright) |
npm run lint | Run ESLint |
Project Structure
src/
├── content/ # Markdown content (events, articles, docs)
│ ├── articles/
│ ├── docs/
│ ├── events/
│ └── config.ts # Content collection schemas
├── pages/ # Astro pages (routes)
├── layouts/ # Page layouts
├── components/ # Reusable components
├── styles/ # CSS (design tokens, utilities)
├── lib/ # Shared utilities
└── site.config.ts # Site-wide configuration Content Workflow
- Create a new branch:
git checkout -b add-february-meeting - Add your content in
src/content/ - Preview locally with
npm run dev - Commit and push:
git push -u origin add-february-meeting - Open a pull request on GitHub
See Pull Requests for the full PR workflow.
VS Code Setup
Recommended extensions:
- Astro — Syntax highlighting and IntelliSense for
.astrofiles - ESLint — Automatic linting
- Prettier — Code formatting
The repository includes .vscode/extensions.json which will prompt you to install these
when opening the project.
Troubleshooting
Port 4321 already in use
Kill the existing process or use a different port:
npm run dev -- --port 3000 Dependencies out of date
If you get errors after pulling, reinstall dependencies:
rm -rf node_modules
npm install Build errors
Check that your content frontmatter matches the schema. See Schema Reference for required fields.