Thank you for your interest in contributing to Plan Visualizer! This document provides guidelines and instructions for contributing to the project.
To contribute to this project, you'll need to fork the repository first:
- Navigate to the Plan Visualizer repository
- Click the "Fork" button in the top-right corner
- This creates a copy of the repository in your GitHub account
After forking, clone your fork to your local machine:
git clone https://github.com/YOUR_USERNAME/plan-visualizer.git
cd plan-visualizerAdd the original repository as an upstream remote to keep your fork synchronized:
git remote add upstream https://github.com/NGA-TRAN/plan-visualizer.git- Node.js: Version 20 or higher
- npm: Comes with Node.js, or install separately
- Git: For version control
- Install dependencies:
npm install- Verify the installation:
npm list plan-viz @excalidraw/excalidrawYou should see the required packages listed.
Start the development server with hot-reload:
npm run devThe application will be available at http://localhost:4174 (or the next available port).
Build the project for production:
npm run buildThis command:
- Runs TypeScript type checking (
tsc) - Builds the production bundle with Vite (
vite build) - Outputs optimized files to the
dist/directory
After building, preview the production build locally:
npm run previewThis command:
- Runs TypeScript type checking (
tsc) - Builds the production bundle (
vite build) - Starts a preview server (
vite preview)
The application will be available at http://localhost:4174/ (or the next available port).
Note: The preview server serves the production build, which is useful for testing how the app will behave when deployed.
- Type checking:
npm run type-check- Check TypeScript types without building - Linting:
npm run lint- Check code for linting errors - Formatting:
npm run format- Format code with Prettier
Create a new branch for your changes:
git checkout -b feature/your-feature-nameOr for bug fixes:
git checkout -b fix/your-bug-description- Write clean, readable code
- Follow the existing code style
- Add comments where necessary
- Update documentation if needed
Before submitting:
-
Run the development server and test your changes:
npm run dev
-
Build and preview to ensure the production build works:
npm run build npm run preview
Then test at http://localhost:4174/
-
Run type checking:
npm run type-check
-
Run linting:
npm run lint
Write clear, descriptive commit messages:
git add .
git commit -m "Add: description of your changes"Use conventional commit prefixes when appropriate:
Add:for new featuresFix:for bug fixesUpdate:for updates to existing featuresRefactor:for code refactoringDocs:for documentation changes
Before creating a pull request, sync your fork with the upstream repository:
git fetch upstream
git checkout main
git merge upstream/main
git push origin mainThen update your feature branch:
git checkout feature/your-feature-name
git merge mainPush your branch to your fork:
git push origin feature/your-feature-name- Go to your fork on GitHub
- Click "New Pull Request"
- Select your branch
- Fill out the pull request template (if available) with:
- Description of changes
- Related issues (if any)
- Testing steps
- Screenshots (if applicable)
- Keep pull requests focused on a single feature or fix
- Write clear descriptions of what changed and why
- Reference related issues
- Ensure all checks pass (linting, type checking, etc.)
- Be responsive to feedback and questions
- Follow TypeScript best practices
- Use functional components with hooks
- Follow the existing project structure
- Use meaningful variable and function names
- Add JSDoc comments for complex functions
plan-visualizer/
├── src/
│ ├── app/ # App configuration and routing
│ ├── features/ # Feature modules
│ ├── shared/ # Shared components and utilities
│ ├── store/ # State management
│ └── types/ # TypeScript type definitions
├── public/ # Static assets
├── dist/ # Production build output
└── specs/ # Project specifications
If you have questions or need help:
- Open an issue on GitHub
- Check existing issues and discussions
- Review the README.md for project overview
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Plan Visualizer! 🎉