Thanks for your interest in contributing to CommitStory! This guide will help you get started.
- Node.js v24+
- npm (comes with Node.js)
- A Cloudflare account (for local Workers development)
- A Google AI API key (for story generation)
-
Fork and clone the repository:
git clone https://github.com/<your-username>/commitstory.git cd commitstory
-
Install dependencies:
npm install
-
Copy the environment files and fill in your values:
cp .env.example .env cp .dev.vars.example .dev.vars
See
.dev.vars.examplefor descriptions of each variable. -
Create your own Cloudflare KV namespace and R2 bucket, then update
wrangler.tomlwith your resource IDs:npx wrangler kv namespace create STORY_KV npx wrangler r2 bucket create commitstory-images
-
Start the development server:
npm run cf:dev
This is an Nx monorepo. Always use nx to run tasks:
# Lint
npx nx run-many -t lint
# Unit tests
npx nx run-many -t test
# Build
npx nx build yourstory
# Build for Cloudflare
npx nx build yourstory --configuration=cloudflare
# E2E tests
npx nx e2e yourstory-e2e
# Visualize project graph
npx nx graph-
Create a branch from
main:git checkout -b feat/your-feature
-
Make your changes. Follow the existing code style — the project uses Prettier and ESLint.
-
Run lint and tests before committing:
npx nx run-many -t lint test -
Commit with a clear message following Conventional Commits:
feat: add new story genre option fix: correct timeline date parsing docs: update setup instructions -
Push and open a pull request against
main.
- Keep PRs focused — one feature or fix per PR.
- Include a description of what changed and why.
- Make sure CI passes (lint + build).
- Add or update tests if your change affects behavior.
- Search existing issues before opening a new one.
- Include steps to reproduce, expected behavior, and actual behavior.
- Screenshots are helpful for UI issues.
Be kind and respectful. We follow the Contributor Covenant.
By contributing, you agree that your contributions will be licensed under the MIT License.