Thank you for your interest in contributing to Markdown Web Editor! This document provides guidelines and information for contributors.
- Node.js 18+ and npm
- Git
- A text editor (VS Code recommended)
- Fork and clone the repository
git clone https://github.com/vultuk/markdown-web.git
cd markdown-web- Install dependencies
npm install- Start development server
npm run devThis starts both the client (Vite) and server (Express) in development mode with hot reload.
- Check if the bug has already been reported in Issues
- If not, create a new issue with:
- Clear, descriptive title
- Steps to reproduce
- Expected vs actual behaviour
- System information (OS, Node.js version, browser)
- Screenshots if applicable
- Check if the feature has been suggested before
- Create a new issue with the
enhancementlabel - Describe the feature and its use case
- Explain why this feature would be beneficial
- Create a feature branch
git checkout -b feature/your-feature-name-
Make your changes
- Write clean, readable code
- Follow existing code style
- Add comments for complex logic
- Update tests if needed
-
Test your changes
# Type check
npm run typecheck
# Build to ensure no build errors
npm run build
# Test the application manually
npm run dev- Commit your changes
git add .
git commit -m "feat: add your feature description"Use conventional commit messages:
feat:for new featuresfix:for bug fixesdocs:for documentationstyle:for code style changesrefactor:for code refactoringtest:for adding testschore:for maintenance tasks
- Push and create a pull request
git push origin feature/your-feature-nameThen create a pull request on GitHub with:
- Clear description of changes
- Reference to any related issues
- Screenshots/GIFs for UI changes
markdown-web/
├── src/ # React frontend source
│ ├── components/ # React components
│ ├── hooks/ # Custom React hooks
│ └── styles/ # CSS modules
├── server/ # Express backend
│ ├── api.ts # API routes
│ ├── auth.ts # Authentication helpers
│ ├── https-server.ts # HTTPS server bootstrap
│ ├── index.ts # Server entry point
│ └── themeManager.ts # Theme management
├── bin/ # CLI entry point
└── dist/ # Built files
- App.tsx: Main application component with state management
- FileExplorer: Sidebar file/folder browser
- Editor: Main editing interface
- Header: Global header with controls
- StatusBar: Bottom status information
GET /api/files: List directory contentsGET /api/files/*: Read file contentPOST /api/files/*: Save file contentPOST /api/create-file: Create new filePOST /api/create-directory: Create new directory
- Use TypeScript for all new code
- Define interfaces for component props
- Use proper typing, avoid
any
- Use functional components with hooks
- Use
useCallbackanduseMemofor performance - Follow React best practices
- Use CSS Modules for styling
- Follow BEM-like naming conventions
- Maintain dark theme consistency
- Use descriptive file and variable names
- Keep components focused and small
- Export components as named exports
Currently, the project relies on manual testing. We welcome contributions to add:
- Unit tests for utility functions
- Component tests with React Testing Library
- Integration tests for API endpoints
The build process:
- Client build: Vite builds React app to
dist/client/ - Server build: TypeScript compiles server to
dist/ - CLI script: Points to built server files
- Update version in
package.json - Update
CHANGELOG.md - Create git tag
- Push to GitHub
- Create GitHub release
- Automated npm publish via GitHub Actions
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Assume good intentions
- Use clear, descriptive language
- Be patient with questions and reviews
- Provide helpful feedback in code reviews
- Keep discussions on-topic
- Check the README for basic information
- Look through existing Issues
- Create a new issue with the
questionlabel
Thank you for contributing to Markdown Web Editor! 🎉