Feature Request: Support Custom Server Configuration in aw-client-js

Open
#48 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
nodejs, typescript
Domain
api

Research direction

Start with src/aw-client.ts around line 140 and inspect how aw-client-js currently selects its server endpoint. Determine the supported configuration behavior for a custom base URL and port, then verify that clients can target a non-default or remote ActivityWatch server; the issue does not name a test file, so completion should include coverage for the chosen configuration interface.

Written by the indexing model from the issue text.

Description

To support multi-user environments and remote server deployments, aw-client-js should allow explicit configuration of the server base_url and port.

Currently, the native Windows client achieves this via configuration files in the client's config folder, which enables users to connect to a server running on a different machine or custom port. However, aw-client-js lacks a similar mechanism, making it difficult for browser-based or custom clients to connect to non-default endpoints.

Adding support for custom server URLs in aw-client-js (e.g. via constructor options or environment variables) would bring it in line with the native clients and enable greater flexibility for advanced use cases like:

  • Connecting to a centralized ActivityWatch server
  • Running multiple clients across devices
  • Developing third-party clients or extensions

Relevant code reference: aw-client.ts L140

Dominant language
TypeScript
Stars
40
Forks
20
Avg merge
10d 20h
Merged PRs (30d)
7

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ActivityWatch/aw-client-js

All issues in ActivityWatch/aw-client-js

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.