- R 99.2%
- Just 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| docs/superpowers/plans | ||
| invoices | ||
| R | ||
| renv | ||
| reports | ||
| tests | ||
| .ecrc | ||
| .editorconfig | ||
| .gitignore | ||
| .gitleaksignore | ||
| .markdownlint.yaml | ||
| .markdownlintignore | ||
| .pre-commit-config.yaml | ||
| .prettierrc.json | ||
| .Rbuildignore | ||
| .Rprofile | ||
| .yamllint.yaml | ||
| _targets.R | ||
| _targets_cost.R | ||
| CLAUDE.md | ||
| DESCRIPTION | ||
| justfile | ||
| README.md | ||
| renovate.json | ||
| renv.lock | ||
Codefloe Platform Analytics
Quarterly analytics for the codefloe.com Forgejo platform. Generates anonymous usage metrics for users, repositories, organizations, and packages with quarter-over-quarter comparison.
Reports
Platform Analytics
2025
- Q4 2025 - October to December
Infrastructure Costs
2025
Prerequisites
- R 4.5+
- Forgejo admin API access
- Hetzner S3 bucket for data persistence
Setup
-
Install dependencies
R -e 'renv::restore()' -
Configure environment variables
Create
.Renviron(R reads this automatically, including in targets workers):FORGEJO_ADMIN_TOKEN=your_token_here AWS_ACCESS_KEY_ID=your_access_key AWS_SECRET_ACCESS_KEY=your_secret_keyOptional overrides:
FORGEJO_BASE_URL=https://codefloe.com S3_BUCKET=prod-analytics S3_ENDPOINT=https://fsn1.your-objectstorage.com S3_REGION=fsn1
Usage
Run for current quarter
R -e 'targets::tar_make()'
Run for a specific quarter
ANALYTICS_QUARTER=2025-Q1 R -e 'targets::tar_make()'
View pipeline graph
R -e 'targets::tar_visnetwork()'
Check pipeline status
R -e 'targets::tar_progress()'
Force regenerate report
To regenerate the report without refetching data:
R -e "targets::tar_invalidate(c('report', 'report_images')); targets::tar_make()"
Force full refresh
To refetch all data and regenerate everything:
R -e "targets::tar_invalidate(targets::tar_objects()); targets::tar_make()"
Infrastructure Cost Reports
Monthly cost reports based on Hetzner invoice CSVs. Covers dedicated servers and all "Projekt codefloe" cloud resources.
Dedicated servers fall into two groups:
- Exclusive (artemis, and the retired hades, minerva, demeter): charged at full price. The retired ones stay in the list so invoices from before July 2026 still resolve.
- Shared Proxmox VE hosts (zeus, hera, apollo, poseidon): these run VMs for several projects, so only codefloe's share of every host-related invoice line is counted, including IPv4 and uplink add-ons.
The share per host is the sum over its codefloe VMs of
max(vCPU / host threads, RAM / host RAM), giving zeus 25%, hera 37.5%, apollo 25% and poseidon 75%. Shares live incodefloe_shared_hosts()inR/cost_parse.Rand must be kept in sync with the live Proxmox VM configuration and the hardware table in the codefloe docs. Costs are broken down by environment (prod/dev) and server type (k8s cluster/single). Reports also include completed Liberapay payments from the public team payment history, net of reported reversals. Payments are summed by month in their original currencies and converted to EUR using the ECB reference rate from the payment date, or the preceding business day. Donor-level fields are discarded during retrieval and are never stored or displayed.
Running cost reports
- Download the monthly invoice CSV(s) from Hetzner
- Drop them into the
invoices/directory - Run the cost pipeline:
R -e 'targets::tar_make(script = "_targets_cost.R", store = "_targets_cost")'
Multiple CSVs can be dropped at once for batch processing.
Reports are generated in reports/costs/<YYYY-MM>/.
To force re-processing, delete _targets_cost/ and re-run.
Output
Quarterly analytics reports: reports/<quarter>/quarterly_report.md
Monthly cost reports: reports/costs/<YYYY-MM>/cost_report.md
Metrics Collected
Users
- Total count, new registrations
- Public/private visibility split
- Active users, admin users
Repositories
- Total count, new repos
- Public/private split
- Forks, mirrors, archived repos
- Total stars, forks, size
Organizations
- Total count
- Public/private split
- Total repos and members
Packages
- Total count, new packages
- Public/private split
- Breakdown by package type
Data Storage
Raw data is uploaded to S3 after each run, organized by quarter:
s3://prod-analytics/
├── 2025-Q1/
│ ├── users.csv
│ ├── repos.csv
│ ├── orgs.csv
│ └── packages.csv
├── 2025-Q2/
│ └── ...
Previous quarter data is automatically loaded for comparison. The first run will report absolute numbers only.
Anonymization
- No usernames, emails, or repository names are collected
- Only aggregate counts and metadata are stored
- Private repository/org names are never exposed