Thank you for your interest in contributing to bytepad! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- Tech Stack
- Architecture
- Making Changes
- Pull Request Process
- Code Style
- Commit Messages
Please read and follow our Code of Conduct.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/bytepad.git - Add upstream remote:
git remote add upstream https://github.com/samitugal/bytepad.git
- Node.js 18+
- npm 9+
- Git
# Install dependencies
npm install
# Start development server (web)
npm run dev
# Start development server (Electron)
npm run dev:electron# Build for production (web)
npm run build
# Build Electron app
npm run build:electron
# Package for distribution
npm run package
# Platform-specific packaging
npm run package:win # Windows
npm run package:mac # macOS
npm run package:linux # Linux
npm run package:all # Windows + macOSbytepad/
├── src/
│ ├── components/ # React components
│ │ ├── analysis/ # Productivity analysis
│ │ ├── bookmarks/ # Bookmark management
│ │ ├── calendar/ # Calendar views
│ │ ├── chat/ # FlowBot AI chat
│ │ ├── common/ # Shared components
│ │ ├── dailynotes/ # Daily notes
│ │ ├── focus/ # Focus mode & timer
│ │ ├── gamification/ # XP, levels, achievements
│ │ ├── graph/ # Knowledge graph
│ │ ├── habits/ # Habit tracking
│ │ ├── journal/ # Journal entries
│ │ ├── layout/ # App layout
│ │ ├── notes/ # Note management
│ │ └── tasks/ # Task management
│ ├── hooks/ # Custom React hooks
│ ├── i18n/ # Internationalization (en, tr)
│ ├── services/ # Business logic & API
│ ├── stores/ # Zustand state stores
│ ├── types/ # TypeScript definitions
│ └── utils/ # Utility functions
├── electron/ # Electron main process
├── public/ # Static assets
└── docs/ # Documentation
- React 18 - UI framework
- TypeScript - Type safety
- TailwindCSS - Styling
- Zustand - State management
- Electron - Cross-platform desktop apps
- electron-vite - Build tooling
- electron-builder - Packaging and distribution
- electron-store - Persistent storage
- LangChain.js - AI orchestration and tool calling
- Multiple providers - OpenAI, Anthropic, Google AI, Groq, Ollama
- Vite - Fast development and building
- PostCSS - CSS processing
- ESLint - Code linting
bytepad uses Zustand for state management with separate stores for each domain:
useAppStore- Application-wide stateuseNotesStore- Notes managementuseTasksStore- Task managementuseHabitsStore- Habit trackinguseJournalStore- Journal entriesuseBookmarksStore- Bookmark managementuseFocusStore- Focus mode stateuseGamificationStore- XP and achievements
User Action → React Component → Zustand Store → LocalStorage
↓
AI Service (optional)
↓
Updated State → UI Re-render
All data is stored locally in JSON format:
- Web (PWA): Browser's IndexedDB/LocalStorage
- Desktop:
- Windows:
%APPDATA%/bytepad/ - macOS:
~/Library/Application Support/bytepad/ - Linux:
~/.config/bytepad/
- Windows:
Optional GitHub Gist synchronization:
- Local changes are saved immediately
- Background sync uploads to Gist at configured interval
- On startup, pulls latest from Gist
- Conflict resolution favors most recent timestamp
-
Create a new branch from
main:git checkout -b feature/your-feature-name
-
Make your changes following our code style guidelines
-
Test your changes:
npm run build npm run dev
-
Commit your changes using conventional commits
- Update documentation if needed
- Ensure the build passes:
npm run build - Push your branch and create a Pull Request
- Fill out the PR template completely
- Wait for review and address any feedback
- Code follows the project's style guidelines
- Self-reviewed the code
- Added/updated documentation as needed
- No new warnings or errors
- Tested the changes locally
- Use TypeScript strict mode
- Avoid
anytypes - use proper typing - Use interfaces for object shapes
- Export types from
src/types/index.ts
- Functional components with hooks
- Keep components under 300 lines
- Use meaningful component names
- Props interfaces should be defined
- Use Tailwind CSS classes
- Follow the existing color scheme (np-* classes)
- Mobile-first responsive design
We use Conventional Commits:
<type>(<scope>): <description>
[optional body]
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style (formatting, etc.)refactor: Code refactoringperf: Performance improvementtest: Adding testschore: Maintenance tasks
feat(tasks): add drag and drop reordering
fix(notes): resolve wikilink parsing issue
docs: update README with new features
refactor(graph): extract node rendering logic
Feel free to open an issue for any questions or concerns.
Thank you for contributing!