gitlytics 0.4.6__tar.gz → 0.4.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. {gitlytics-0.4.6 → gitlytics-0.4.7}/PKG-INFO +1 -1
  2. {gitlytics-0.4.6 → gitlytics-0.4.7}/pyproject.toml +1 -1
  3. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/__init__.py +1 -1
  4. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/core.py +4 -2
  5. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/_headers +31 -0
  6. gitlytics-0.4.7/src/gitlytics/static/google-search-icon-48x48.png +0 -0
  7. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/index.html +7 -2
  8. gitlytics-0.4.7/src/gitlytics/static/llms-full.txt +30 -0
  9. gitlytics-0.4.7/src/gitlytics/static/llms.txt +21 -0
  10. gitlytics-0.4.7/src/gitlytics/static/site.webmanifest +1 -0
  11. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics.egg-info/PKG-INFO +1 -1
  12. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics.egg-info/SOURCES.txt +3 -0
  13. gitlytics-0.4.6/src/gitlytics/static/google-search-icon-48x48.png +0 -0
  14. {gitlytics-0.4.6 → gitlytics-0.4.7}/LICENSE +0 -0
  15. {gitlytics-0.4.6 → gitlytics-0.4.7}/README.md +0 -0
  16. {gitlytics-0.4.6 → gitlytics-0.4.7}/setup.cfg +0 -0
  17. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/__main__.py +0 -0
  18. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/api.py +0 -0
  19. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/automation.py +0 -0
  20. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/cli.py +0 -0
  21. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/process.py +0 -0
  22. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/_redirects +0 -0
  23. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/android-chrome-192x192.png +0 -0
  24. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/android-chrome-512x512.png +0 -0
  25. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/apple-touch-icon.png +0 -0
  26. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/assets/CardModal-C59MkcBx.js +0 -0
  27. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/assets/ExportModal-TgUqez0T.js +0 -0
  28. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/assets/exports-CBIW6Z6w.js +0 -0
  29. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/assets/html2canvas-pro.esm-9xys3ejh.js +0 -0
  30. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/assets/html2canvas.esm-DXEQVQnt.js +0 -0
  31. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/assets/index-BRI0yQ1K.css +0 -0
  32. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/assets/index-Bi9mu2Wz.js +0 -0
  33. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/assets/index.es-BpixEfNZ.js +0 -0
  34. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/assets/jspdf.es.min-WsKal4G6.js +0 -0
  35. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/assets/purify.es-CC4Brkr_.js +0 -0
  36. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/favicon-16x16.png +0 -0
  37. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/favicon-32x32.png +0 -0
  38. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/favicon-48x48.png +0 -0
  39. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/favicon.ico +0 -0
  40. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/gitlytics-logo.png +0 -0
  41. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/google-search-icon.png +0 -0
  42. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/robots.txt +0 -0
  43. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics/static/sitemap.xml +0 -0
  44. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics.egg-info/dependency_links.txt +0 -0
  45. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics.egg-info/entry_points.txt +0 -0
  46. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics.egg-info/requires.txt +0 -0
  47. {gitlytics-0.4.6 → gitlytics-0.4.7}/src/gitlytics.egg-info/top_level.txt +0 -0
  48. {gitlytics-0.4.6 → gitlytics-0.4.7}/tests/test_api.py +0 -0
  49. {gitlytics-0.4.6 → gitlytics-0.4.7}/tests/test_automation.py +0 -0
  50. {gitlytics-0.4.6 → gitlytics-0.4.7}/tests/test_cli.py +0 -0
  51. {gitlytics-0.4.6 → gitlytics-0.4.7}/tests/test_core.py +0 -0
  52. {gitlytics-0.4.6 → gitlytics-0.4.7}/tests/test_process.py +0 -0
  53. {gitlytics-0.4.6 → gitlytics-0.4.7}/tests/test_star_history.py +0 -0
  54. {gitlytics-0.4.6 → gitlytics-0.4.7}/tests/test_username.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitlytics
3
- Version: 0.4.6
3
+ Version: 0.4.7
4
4
  Summary: Monitor and automate your GitHub repository traffic analytics.
5
5
  Author-email: Ameya Chopade <ameyaccod171@gmail.com>
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gitlytics"
7
- version = "0.4.6"
7
+ version = "0.4.7"
8
8
  description = "Monitor and automate your GitHub repository traffic analytics."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -9,7 +9,7 @@ from pathlib import Path
9
9
 
10
10
  # Single source of truth for the package version.
11
11
  # Mirrors the version in pyproject.toml — keep them in sync.
12
- __version__ = "0.4.6"
12
+ __version__ = "0.4.7"
13
13
 
14
14
  __all__ = [
15
15
  "fetch_traffic",
@@ -40,8 +40,9 @@ class StarHistoryFetchError(Exception):
40
40
 
41
41
  def make_headers(token: str) -> dict:
42
42
  # Auth headers for authenticated API calls
43
+ # GitHub Classic PATs require the `token` prefix, not `Bearer`.
43
44
  return {
44
- "Authorization": f"Bearer {token}",
45
+ "Authorization": f"token {token}",
45
46
  **_GITHUB_BASE_HEADERS,
46
47
  }
47
48
 
@@ -394,12 +395,13 @@ def _star_headers(token: str | None) -> dict:
394
395
  # so each item carries `starred_at`. Token is optional for public reads.
395
396
  # Merge order matters: star+json must land AFTER the base headers so it
396
397
  # overrides the default Accept (otherwise GitHub returns bare user objects).
398
+ # GitHub Classic PATs require the `token` prefix, not `Bearer`.
397
399
  h = {
398
400
  **_GITHUB_BASE_HEADERS,
399
401
  "Accept": "application/vnd.github.star+json",
400
402
  }
401
403
  if token:
402
- h["Authorization"] = f"Bearer {token}"
404
+ h["Authorization"] = f"token {token}"
403
405
  return h
404
406
 
405
407
 
@@ -4,3 +4,34 @@
4
4
  Referrer-Policy: strict-origin-when-cross-origin
5
5
  Permissions-Policy: camera=(), microphone=(), geolocation=()
6
6
  Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://www.googletagmanager.com https://www.google-analytics.com https://scripts.clarity.ms https://www.clarity.ms; connect-src 'self' https://api.gitlytics.dev https://api.github.com https://www.google-analytics.com https://*.google-analytics.com https://www.googletagmanager.com https://*.clarity.ms; img-src 'self' data: https://api.gitlytics.dev https://avatars.githubusercontent.com https://github.com https://raw.githubusercontent.com https://www.google-analytics.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; frame-ancestors 'none'; base-uri 'self'; form-action 'self'
7
+
8
+ # Hashed Vite bundles — safe to cache forever because filename changes on every build
9
+ /assets/*
10
+ Cache-Control: public, max-age=31536000, immutable
11
+
12
+ # Static assets with long but not immutable caching (favicon, logo, icons, manifests)
13
+ /*.ico
14
+ Cache-Control: public, max-age=86400
15
+ /*.png
16
+ Cache-Control: public, max-age=86400
17
+ /*.svg
18
+ Cache-Control: public, max-age=86400
19
+ /*.webp
20
+ Cache-Control: public, max-age=86400
21
+ /*.woff2
22
+ Cache-Control: public, max-age=31536000, immutable
23
+ /robots.txt
24
+ Cache-Control: public, max-age=86400
25
+ /sitemap.xml
26
+ Cache-Control: public, max-age=86400
27
+ /llms.txt
28
+ Cache-Control: public, max-age=3600
29
+ /llms-full.txt
30
+ Cache-Control: public, max-age=3600
31
+
32
+ # HTML entry points — always re-validate so new deployments are picked up immediately
33
+ /index.html
34
+ Cache-Control: no-cache, no-store, must-revalidate
35
+ /
36
+ Cache-Control: no-cache, no-store, must-revalidate
37
+
@@ -20,7 +20,12 @@
20
20
  <link rel="stylesheet" crossorigin href="/assets/index-BRI0yQ1K.css">
21
21
  </head>
22
22
  <body>
23
- <h1 style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;">Gitlytics Dashboard</h1>
24
- <div id="root"></div>
23
+ <div id="root">
24
+ <!-- SEO Fallback Content -->
25
+ <main style="max-width: 800px; margin: 0 auto; padding: 2rem; font-family: sans-serif;">
26
+ <h1>Gitlytics Dashboard</h1>
27
+ <p>Interactive React dashboard to visualize your historical GitHub repository traffic metrics. Powered by the Gitlytics open-source platform.</p>
28
+ </main>
29
+ </div>
25
30
  </body>
26
31
  </html>
@@ -0,0 +1,30 @@
1
+ # Gitlytics Dashboard — Full Context
2
+
3
+ > Detailed technical information about the React dashboard frontend for Gitlytics.
4
+
5
+ ## 1. Overview
6
+
7
+ The dashboard frontend is built with React, TypeScript, Vite, and Tailwind CSS. It communicates with the FastAPI backends (either the self-hosted local backend or the cloud backend) to fetch, process, and present GitHub traffic data.
8
+
9
+ ## 2. Authentication Modes
10
+
11
+ The frontend supports three methods of interaction:
12
+ - **OAuth Mode** (SaaS only): Authenticates via GitHub OAuth, logging in securely through the backend.
13
+ - **PAT Mode**: Authenticates on-demand using a locally-supplied GitHub Personal Access Token (PAT).
14
+ - **Username Mode**: Fetches and displays public traffic summaries using tokenless requests.
15
+ - **CSV Upload Mode**: Allows users to import and visualize historical traffic CSV files generated by the automation action.
16
+
17
+ ## 3. Core Pages & Layouts
18
+
19
+ - **Login Page** (`LoginView.tsx`): Gateway for OAuth login, PAT login, CSV uploads, and public username searches. Includes a public star history widget.
20
+ - **Dashboard Page** (`DashboardView.tsx`): Main workspace presenting metrics, top-N charts, clone leaderboards, referrers, and growth timelines.
21
+ - **Workspace Selector** (`WorkspaceView.tsx`): OAuth-specific interface to manage pinned repositories (up to 3).
22
+ - **Public Profile View** (`UsernameView.tsx`): Simplified public analytics dashboard.
23
+
24
+ ## 4. Key Integration URLs
25
+
26
+ - Homepage: https://gitlytics.dev
27
+ - Documentation: https://docs.gitlytics.dev
28
+ - Cloud Dashboard: https://dashboard.gitlytics.dev
29
+ - Gitlytics Main Code Repository: https://github.com/ameyac11/gitlytics
30
+ - Gitlytics Automation Repository: https://github.com/ameyac11/gitlytics-github-traffic-automation
@@ -0,0 +1,21 @@
1
+ # Gitlytics Dashboard
2
+
3
+ > The client dashboard for Gitlytics, an open-source GitHub Traffic Analytics platform. It visualizes repository views, clones, stars, forks, and referrers beyond GitHub's default 14-day retention limit.
4
+
5
+ ## Key Resources
6
+
7
+ - [Homepage](https://gitlytics.dev) : The main website for the Gitlytics project.
8
+ - [Documentation](https://docs.gitlytics.dev) : Guides, API documentation, and CLI references.
9
+ - [Cloud Dashboard](https://dashboard.gitlytics.dev) : The hosted SaaS platform.
10
+ - [GitHub Repository](https://github.com/ameyac11/gitlytics) : The main codebase containing core Python library, API backend, and dashboard package.
11
+ - [Automation Repository](https://github.com/ameyac11/gitlytics-github-traffic-automation) : The automated traffic backup composite action.
12
+ - [Full LLMs Context](https://dashboard.gitlytics.dev/llms-full.txt) : Plain-text context for LLM ingestion.
13
+
14
+ ## Dashboard Capabilities
15
+
16
+ - **Metrics Grid**: Displays accumulated views, uniques, clones, and stars, calculating week-over-week changes.
17
+ - **Traffic Visualizations**: Interactive top-N charts, cumulative growth timelines, and weekday heatmaps.
18
+ - **Leaderboards**: Displays clones and views comparison with visual badges.
19
+ - **Star History**: Lifetime sampled star history with 1Y / All time filters.
20
+ - **Referrer Logs**: Domain categorization and click timeline tracking.
21
+ - **Reporting**: Export reports directly to PNG, multi-page PDF, or raw CSV formats.
@@ -0,0 +1 @@
1
+ {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitlytics
3
- Version: 0.4.6
3
+ Version: 0.4.7
4
4
  Summary: Monitor and automate your GitHub repository traffic analytics.
5
5
  Author-email: Ameya Chopade <ameyaccod171@gmail.com>
6
6
  License: Apache-2.0
@@ -27,7 +27,10 @@ src/gitlytics/static/gitlytics-logo.png
27
27
  src/gitlytics/static/google-search-icon-48x48.png
28
28
  src/gitlytics/static/google-search-icon.png
29
29
  src/gitlytics/static/index.html
30
+ src/gitlytics/static/llms-full.txt
31
+ src/gitlytics/static/llms.txt
30
32
  src/gitlytics/static/robots.txt
33
+ src/gitlytics/static/site.webmanifest
31
34
  src/gitlytics/static/sitemap.xml
32
35
  src/gitlytics/static/assets/CardModal-C59MkcBx.js
33
36
  src/gitlytics/static/assets/ExportModal-TgUqez0T.js
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes