Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 🐞 Bug report
description: Something doesn't work as expected
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting! ⚠️ Please **remove any personal data** from text, screenshots and files.
For security vulnerabilities, use [private reporting](https://github.com/lestolo/subscription-tracker/security/advisories/new) instead.
- type: textarea
id: what
attributes:
label: What happened?
description: A clear description of the bug.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Open the app
2. Tap …
3. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
validations:
required: true
- type: input
id: device
attributes:
label: Device and OS
placeholder: e.g. iPhone 15, iOS 26.0 / Pixel 8, Android 16
validations:
required: true
- type: input
id: browser
attributes:
label: Browser and version
placeholder: e.g. Safari 26, Chrome 141
validations:
required: true
- type: dropdown
id: installed
attributes:
label: Is the app installed on the Home Screen?
options:
- "Yes"
- "No, used in the browser"
validations:
required: true
- type: textarea
id: extra
attributes:
label: Screenshots, console errors, additional context
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 🔒 Report a security vulnerability
url: https://github.com/lestolo/subscription-tracker/security/advisories/new
about: Please report security issues privately.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ✨ Feature request
description: Suggest an idea or improvement
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What problem would this solve? Who would benefit?
validations:
required: true
- type: textarea
id: solution
attributes:
label: Proposed solution
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/new_service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 📺 Add a service to the catalogue
description: Request a subscription service to be added to the built-in catalogue
labels: ["catalogue"]
body:
- type: input
id: name
attributes:
label: Service name
placeholder: e.g. Crunchyroll
validations:
required: true
- type: input
id: website
attributes:
label: Official website
placeholder: https://…
validations:
required: true
- type: dropdown
id: category
attributes:
label: Category
options: [Video & TV, Music & audio, Cloud storage, Productivity, AI, Creative, Gaming, VPN & security, Shopping & food, News & reading, Health & fitness, Education, Phone & internet, Finance, Social, Other]
validations:
required: true
- type: input
id: icon
attributes:
label: Simple Icons slug (if available)
description: Search on https://simpleicons.org
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Description

<!-- What does this PR change and why? Link related issues (e.g. "Closes #12"). -->

## Type of change

- [ ] Bug fix
- [ ] New feature
- [ ] Catalogue / translations
- [ ] Documentation
- [ ] Refactoring / tooling

## Checklist

- [ ] `npm test` passes
- [ ] Tested on a phone-sized viewport, in light and dark mode
- [ ] New UI strings are translated in every language in `js/core/i18n.js`
- [ ] `ST.VERSION` bumped if cached assets changed (`sw.js` → `ASSETS`)
- [ ] No secrets, API keys or personal data added
- [ ] No new runtime dependencies or third-party requests
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Unit tests
run: npm test
- name: Check that every cached asset exists
run: |
node -e "
const fs = require('fs');
const src = fs.readFileSync('sw.js', 'utf8');
const list = src.match(/const ASSETS = \[([\s\S]*?)\];/)[1].match(/'([^']+)'/g).map(s => s.slice(1, -1));
const missing = list.filter(p => p !== './' && !fs.existsSync(p));
if (missing.length) { console.error('Missing assets:', missing); process.exit(1); }
console.log('All', list.length, 'cached assets exist');
"
- name: Validate JSON files
run: |
node -e "for (const f of ['manifest.webmanifest','vercel.json','package.json']) JSON.parse(require('fs').readFileSync(f,'utf8'))"
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
.vercel/
.DS_Store
Thumbs.db
*.log
.env
.env.*
coverage/
6 changes: 6 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tests/
tools/
docs/
.github/
*.md
!README.md
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

All notable changes to this project are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [1.0.0] - 2026-10-04

### Added

- Subscription tracking stored locally in IndexedDB.
- Catalogue of ~120 popular services with logos from Simple Icons, plus custom subscriptions.
- Monthly, quarterly, yearly and custom billing frequencies with correct month-end handling.
- Multi-currency totals with optional manual exchange rates.
- Local renewal reminders (on open and via Periodic Background Sync) and `.ics` calendar export.
- Installable PWA with offline support and an animated "Add to Home Screen" guide.
- Italian and English interface, light and dark themes.
- JSON backup export and import.
73 changes: 73 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Project maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported privately to the project maintainers through GitHub's
[private vulnerability reporting](https://github.com/lestolo/subscription-tracker/security/advisories/new)
form (please mention "Code of Conduct" in the title). All complaints will be
reviewed and investigated promptly and fairly.

All project maintainers are obligated to respect the privacy and security of the
reporter of any incident.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing to SubTrack

Thanks for taking the time to contribute! 🎉 Issues and pull requests in English or Italian are both welcome.

## Ground rules

- **Never commit secrets or personal data**: no API keys, tokens, e-mail addresses, real subscription data or `.env` files. The app is designed to run without any secrets.
- Keep the project **dependency-free and build-free**: plain HTML, CSS and JavaScript that runs as-is in the browser.
- Keep it **private by design**: no analytics, no third-party requests, no remote fonts or CDNs.
- Follow the [Code of Conduct](CODE_OF_CONDUCT.md).

## Getting started

```bash
git clone https://github.com/<your-user>/subscription-tracker.git
cd subscription-tracker
npm start # http://localhost:8080
npm test
```

## Making changes

1. Open an issue first for larger changes so we can agree on the approach.
2. Create a branch from `main`: `git checkout -b feat/short-description`.
3. Keep logic that doesn't touch the DOM in `js/core/` and cover it with tests in `tests/`.
4. Every user-facing string must go through `js/core/i18n.js` and exist in **all** languages (a test enforces this).
5. Never insert user-provided text with `innerHTML`: use the `h()` helper or `textContent`.
6. If you change any file listed in `sw.js` → `ASSETS`, or add a new one, bump `ST.VERSION` in `js/core/version.js` so installed apps update.
7. Run `npm test` and try the app on a phone-sized viewport, in both light and dark mode.
8. Use [Conventional Commits](https://www.conventionalcommits.org/) for messages, e.g. `feat: add Revolut to catalogue`, `fix: month-end renewal on leap years`.

## Adding services to the catalogue

Edit `RAW` in `js/core/catalog.js`: `[id, name, category, brandColor, simpleIconsSlug | null]`.

- `id`: lowercase, unique, no spaces.
- `brandColor`: hex without `#`.
- If the brand is on [simpleicons.org](https://simpleicons.org), set the slug and run `npm run icons`; otherwise use `null`.
- Please don't add prices: they change too often and differ by country.

## Reporting bugs

Use the [bug report template](https://github.com/lestolo/subscription-tracker/issues/new?template=bug_report.yml) and include your device, OS and browser version. Remove personal data from screenshots and exported files.

## Security issues

Please **don't** open a public issue; see [SECURITY.md](SECURITY.md).
Loading
Loading