Thank you for your interest in contributing to LibreDiary! This document provides guidelines and instructions for contributing.
Please read and follow our Code of Conduct to keep our community approachable and respectable.
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/librediary.git cd librediary -
Add the upstream remote:
git remote add upstream https://github.com/akaalcreatives/librediary.git
- Node.js >= 20.0.0
- pnpm >= 9.0.0
- Docker and Docker Compose (for local PostgreSQL)
-
Clone the repository
git clone https://github.com/akaalcreatives/librediary.git cd librediary -
Install dependencies
pnpm install
-
Set up environment variables
cp .env.example .env # Edit .env with your local configuration -
Start the database
docker compose -f tooling/docker/docker-compose.dev.yml up -d
-
Run database migrations
pnpm db:migrate
-
Start development servers
pnpm dev
This starts both the frontend (http://localhost:5173) and backend (http://localhost:3000).
librediary/
├── apps/
│ ├── web/ # Vue 3 frontend
│ └── server/ # Fastify backend
├── packages/
│ ├── shared/ # Shared types, schemas, utils
│ ├── tsconfig/ # TypeScript configurations
│ └── eslint-config/ # ESLint configurations
├── tooling/
│ └── docker/ # Docker configurations
├── turbo.json # Turborepo configuration
└── pnpm-workspace.yaml # pnpm workspace configuration
| Command | Description |
|---|---|
pnpm dev |
Start all dev servers |
pnpm dev:web |
Start frontend only |
pnpm dev:server |
Start backend only |
pnpm build |
Build all packages |
pnpm lint |
Run ESLint |
pnpm lint:fix |
Fix ESLint errors |
pnpm format |
Format with Prettier |
pnpm typecheck |
Type check all packages |
pnpm test |
Run tests |
pnpm clean |
Clean all build artifacts |
pnpm db:migrate |
Run database migrations |
pnpm db:studio |
Open Prisma Studio |
- We use TypeScript throughout the codebase
- ESLint and Prettier are configured for code quality
- Run
pnpm lint:fixandpnpm formatbefore committing - Pre-commit hooks will automatically lint staged files
Follow the Conventional Commits specification:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style (formatting)refactor: Code refactoringperf: Performance improvementtest: Adding testschore: Maintenance
Examples:
feat(auth): add Google OAuth supportfix(editor): handle empty page titledocs(readme): update installation instructions
-
Sync your fork with upstream:
git fetch upstream git checkout main git merge upstream/main
-
Create a feature branch:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes and ensure they pass all checks:
pnpm lint pnpm typecheck pnpm test -
Push to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request against the
mainbranch and fill out the PR template
- All CI checks must pass
- Code must be reviewed by at least one maintainer
- Commits should follow conventional commit guidelines
- Branch should be up to date with
main
Use our issue templates to report:
- Bug Reports: Something isn't working as expected
- Feature Requests: Suggest a new feature or enhancement
- Documentation: Report documentation issues or improvements
When reporting bugs, please include:
- Description of the issue
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment (OS, Node version, browser)
- Screenshots (if applicable)
Found a security vulnerability? Please report it responsibly by following our Security Policy. Do not open a public issue for security vulnerabilities.
- Questions: Open a Discussion
- Bugs: Use the Bug Report template
- Features: Use the Feature Request template
By contributing to LibreDiary, you agree that your contributions will be licensed under the GNU AGPLv3 license.
Feel free to open an issue for questions or discussions.
Developed by Akaal Creatives