Contributions are welcome! Whether you want to fix a bug, improve a translation, or build something new - PRs are open and encouraged. No need to ask for permission first, just dive in. See CONTRIBUTING.md for the details.
This workspace is composed the following projects:
client: The frontend of our application. This project houses the Trakt Web client, built with Deno and SvelteKit. It's designed to be efficient and user-friendly, providing quick access to media insights.
The following environment variables are required for the workspace to function properly:
TRAKT_CLIENT_ID: The client ID for the Trakt API.TRAKT_CLIENT_SECRET: The client secret for the Trakt API.
Want to contribute to Trakt Web? Great! Here's how to get set up:
- Create a Trakt Application: Go to Trakt Settings and create a new application.
- Set the
Redirect uri:: Add the following URIs (one per line):http://localhost:5173http://localhost:5173/callbackhttp://localhost:4173http://localhost:4173/callback
- Set the
Javascript (cors) origins:: Add the following origins (one per line):http://localhost:5173http://localhost:5173/callbackhttp://localhost:4173http://localhost:4173/callback
- Use the Client ID and Client Secret in your development environment.
Note: Port 5173 is for development mode, while port 4173 is for production preview.
This is a Deno project, so you need to have Deno installed on your machine please refer to the Deno installation guide.
- Clone the repository
- Install dependencies:
deno task install - Run tasks:
-
Workspace:
- Format & Lint:
deno task format
- Format & Lint:
-
Client:
- Development:
deno task client:dev - Contributors:
deno task client:dev:contrib
- Development:
For web development, run deno task dev or deno task dev:contrib (for
external contributors) in the projects/client directory. Then open your
browser to see your work.
For Android development, you can:
- Install Development PWA: Install a development version of the Progressive Web App on your Android device with remote debugging capabilities.
- Debug Website Version: Use Chrome browser for debugging the website version.
To set this up, refer to the Chrome Remote Debugging
documentation.
Connect your development environment to Android through the device management
portal at chrome://inspect/#devices. This works with:
- Option 1: Android Studio Emulated Device
- Option 2: Physical Device (USB Connection)
After connecting, set up a reverse proxy with:
adb reverse tcp:5173 tcp:5173Coming Soon!
To build the Trakt Web client, run:
cd projects/client/
[deno|npm|bun] run buildRun the following command:
[deno|npm|bun] run build:preview && [deno|npm|bun] run previewWe use npm-check-updates
(ncu) to drive package bumps. Two GitHub workflows automate the recurring
work; the manual recipes below stay around for ad-hoc runs.
Both workflows live under .github/workflows/ and can be triggered from the
Actions tab via workflow_dispatch.
Both flows enumerate candidates with ncu --jsonUpgraded, then run
.github/scripts/ncu-bisect.sh to find the largest green subset.
Bisection strategy (full set first, halve on failure):
- Phase 1 (fast, typecheck-only): apply the whole candidate set, run
deno install --allow-scripts+deno task check. If green, adopt all. If red, split the set in half and recurse on each half. Singletons that fail are recorded as rejected; everything green stacks on a rolling baseline. Worst case for K candidates with F failures is roughlyF + log2(K)probes (a clean batch of 30 = 1 probe; F=1 = ~6-9 probes). - Phase 2 (final tests): run
deno task test:doctor(vitest, no coverage, parallel) on the adopted set. If it fails, re-bisect the adopted set with full verify (check + tests) to identify which adopted bump regressed at runtime. - Phase 3 (build): run
deno task build:doctor(vite build with Sentry plugin off, no minify, no sourcemap; validates the module graph compiles end-to-end without network/auth side effects).
Local dry-run on a 30-candidate minor set with 2 failures: 15 probes, ~7.5 min wall time (vs. ~60 min for sequential per-package).
ncu --doctor is not used: it spawns npm install --no-save <pkg>@<ver> per
candidate, which conflicts with this project's peer-dep state and would not
actually exercise the deno-managed test runtime even if it succeeded.
i18n is generated once at the start of the workflow (the per-task pretest /
prebuild hooks are skipped by the doctor variants).
- Cadence: every Sunday at 18:00 UTC.
- Scope: minor + patch versions (
ncu --target minor). - On any green: opens
chore(deps): bump minor & patch versionsPR with reviewersseferturanandvladjerca. PR body lists adopted + reverted. - On nothing green: no PR; reverted set surfaces in the workflow log.
- Cadence: first Sunday of each month at 19:00 UTC (cron gates by day-of-month).
- Scope: major-version diffs only (
ncu --target latestminus the--target minorset). - On any green: opens
chore(deps): bump major versionsPR, listing adopted + skipped. - On any red: opens a companion issue assigned to
seferturanwith the reverted packages and the last 80 log lines per package.
If you need to run ncu locally, install it once:
deno install -g --allow-all -n ncu npm:npm-check-updatesNOTE: For the client project pass -p npm on every invocation since the svelte
project is defined via package.json (the workspace itself uses deno). Run the
commands below from projects/client/.
- Check:
ncu -p npm --dep prod -t minor/ncu -p npm --dep dev -t minor - Update: add
-uto write changes.
- Check:
ncu -p npm --dep prod -t latest/ncu -p npm --dep dev -t latest - For each entry:
ncu -p npm <ENTRY> -u -t latest, then build, fix breaks, test, commit.
After any local bump, refresh the lockfile with deno install --allow-scripts
before committing.
If rebasing causes conflicts in your client/i18n/messages folder, here's how
to fix them:
When merging your changes with the main branch, conflicts may occur in
translation files. This is normal when multiple people are working on
internationalization.
To resolve these conflicts:
-
Make sure you have the
denoCLI installed -
Run the resolution command from the project root:
deno task client:i18n:resolve
Or if you're in the
projects/clientdirectory:deno task i18n:resolve
These commands will resolve conflicts in the i18n/messages/*.json files and
merge the translations properly.
For more details about infrastructure, see: INFRASTRUCTURE.md.
Trakt Web is made possible by these amazing tools and services:
Special thanks to Sentry and Crowdin for supporting open source projects with free licenses.