Skip to content

ImShyMike/rustytime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•’ blazingly fast time tracking for developers

Crates.io Total Downloads GitHub Actions Workflow Status GitHub last commit Crates.io Version Crates.io License Crates.io Size

Features

  • βœ… Time tracking
  • βœ… Stat visualization
  • βœ… WakaTime compatible
  • βœ… Fast and memory efficient

What is this?

rustytime is a WakaTime compatible server that can be used to track time in most apps with any of the existing plugins!

Local Development

# Clone the repo
$ git clone https://github.com/ImShyMike/rustytime && cd rustytime

# Copy the env file
$ cp .env.example .env

Edit your .env file to include the following:

# GitHub OAuth Settings
GITHUB_CLIENT_ID=client_id_goes_here
GITHUB_CLIENT_SECRET=client_secret_goes_here

Build & Run

# Run the full app
$ docker compose up

# OR

# Run the databse + backend 
$ docker compose up timescaledb rustytime
# Run the frontend
$ cd frontend && bun run dev

The app should now be available at http://localhost:5173

Observability (OTel + LGTM)

If you're running the self-hosted Grafana LGTM (Loki/Grafana/Tempo/Mimir) stack or an OpenTelemetry Collector on the same machine, expose its OTLP receiver (default gRPC on 4317). Then add the following to your .env (already scaffolded in .env.example):

OTEL_SERVICE_NAME=rustytime-server
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:4317
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
OTEL_RESOURCE_ATTRIBUTES=deployment.environment=development
# Only when your collector requires authentication headers (comma-separated k=v)
# OTEL_EXPORTER_OTLP_HEADERS=x-otlp-token=changeme

Restart the backend (cargo run) after updating the env vars. The warning about missing OTEL exporter configuration disappears, and spans begin flowing into Tempo. From there you can wire Grafana dashboards against the same Tempo instance alongside your LGTM stack.

Seeding the DB

The seed feature can be enabled in the build to seed the database with a single user and 10000 heartbeats.

cargo run --features seed

WakaTime

When using a WakaTime client, point your requests to http://localhost:3000/api/v1 (or https://api-rustytime.shymike.dev/api/v1 if using the deployed version)

Star History

Star History Chart

License

This project is licensed under the GNU AGPLv3

About

πŸ•’ blazingly fast time tracking for developers

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •