@@ -23,20 +23,28 @@ cd Opensource-Contribution-Leaderboard
2323
2424# 2. Create your config
2525cp src/server/config-example.json src/server/config.json
26+ cp src/server/.env.example src/server/.env
2627```
2728
28- Edit ` src/server/config.json ` :
29+ Edit ` src/server/.env ` with your static settings:
30+
31+ ``` bash
32+ AUTH_TOKEN=ghp_YOUR_GITHUB_TOKEN
33+ ORGANIZATION=YourOrg
34+ ORGANIZATION_HOMEPAGE=https://yourorg.com/
35+ ORGANIZATION_GITHUB_URL=https://github.com/YourOrg
36+ ADMIN_PASSWORD=pick-something-better
37+ SERVER_PORT=62050
38+ ```
39+
40+ Edit ` src/server/config.json ` with dynamic/runtime values:
2941
3042``` json
3143{
32- "organization" : " YourOrg" ,
33- "organizationHomepage" : " https://yourorg.com/" ,
34- "organizationGithubUrl" : " https://github.com/YourOrg" ,
35- "authToken" : " ghp_YOUR_GITHUB_TOKEN" ,
36- "adminPassword" : " pick-something-better" ,
3744 "delay" : " 10" ,
38- "serverPort" : " 62050" ,
39- "contributors" : [" contributor1" , " contributor2" , " contributor3" ]
45+ "startDate" : " 2025-06-01" ,
46+ "contributors" : [" contributor1" , " contributor2" ],
47+ "includedRepositories" : [" Repo1" , " Repo2" ]
4048}
4149```
4250
@@ -56,14 +64,25 @@ Open **http://localhost:8080** — you're done.
5664
5765## Config Reference
5866
67+ Static settings live in ` .env ` :
68+
69+ | Env Variable | What it is |
70+ | ---| ---|
71+ | ` AUTH_TOKEN ` | GitHub personal access token (repo read access) |
72+ | ` ORGANIZATION ` | Your GitHub org name |
73+ | ` ORGANIZATION_HOMEPAGE ` | Org homepage URL |
74+ | ` ORGANIZATION_GITHUB_URL ` | Org GitHub URL |
75+ | ` ADMIN_PASSWORD ` | Password for the admin panel |
76+ | ` SERVER_PORT ` | Internal backend port (default 62050) |
77+
78+ Dynamic settings live in ` config.json ` (modifiable via admin panel):
79+
5980| Key | What it is |
6081| ---| ---|
61- | ` organization ` | Your GitHub org name |
62- | ` authToken ` | GitHub personal access token (repo read access) |
63- | ` adminPassword ` | Password for the admin panel |
6482| ` delay ` | Seconds between API calls per contributor (respect rate limits) |
65- | ` serverPort ` | Internal backend port (default 62050) |
83+ | ` startDate ` | Filter contributions from this date onwards |
6684| ` contributors ` | Array of GitHub usernames to track |
85+ | ` includedRepositories ` | Repos to include in contribution tracking |
6786
6887## Local Development
6988
0 commit comments