b0943f445c47a0cc717cce8310af9bca33e646ef
Community Rule
A Next.js application for community decision-making and governance documentation.
Getting Started
Run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
Storybook Development
This project includes Storybook for component development and documentation. The setup supports both local development and GitHub Pages deployment.
Local Development
For local Storybook development (no base path):
npm run storybook:local
This will:
- Copy local configuration files (without GitHub Pages base path)
- Start Storybook at
http://localhost:6006 - Ignore configuration changes in git
Production Deployment
When ready to deploy to GitHub Pages:
-
Restore GitHub Pages configuration:
npm run storybook:restore -
Build Storybook:
npm run build-storybook -
Deploy to GitHub Pages repository:
# Copy the build to your GitHub Pages repository cp -r storybook-static/* /path/to/communityrulestorybook/ # Or if you have it as a git submodule: cp -r storybook-static/* communityrulestorybook/ cd communityrulestorybook git add . git commit -m "Update Storybook build" git push origin main
Switching Between Configurations
- Local Development:
npm run storybook:local - Production Build:
npm run storybook:restorethennpm run build-storybook - Back to Local:
npm run storybook:local
The gitignore is configured to prevent configuration file changes from triggering git changes during local development.
Available Scripts
npm run dev- Start Next.js development servernpm run build- Build Next.js application for productionnpm run start- Start Next.js production servernpm run storybook:local- Start Storybook with local configurationnpm run storybook:restore- Restore GitHub Pages configurationnpm run build-storybook- Build Storybook for productionnpm run storybook- Start Storybook with current configuration
Languages
TypeScript
80.6%
JavaScript
16.7%
CSS
2.3%
Shell
0.3%
Dockerfile
0.1%