https://github.com/tejado/cf-analytics
Custom Analytics Dashboard for your Cloudflare account. Built on Cloudflare’s Developer Platform.
https://github.com/tejado/cf-analytics
Last synced: 3 months ago
JSON representation
Custom Analytics Dashboard for your Cloudflare account. Built on Cloudflare’s Developer Platform.
- Host: GitHub
- URL: https://github.com/tejado/cf-analytics
- Owner: tejado
- Created: 2025-07-15T07:24:04.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-07-15T07:36:01.000Z (6 months ago)
- Last Synced: 2025-07-26T20:25:01.438Z (6 months ago)
- Language: TypeScript
- Size: 964 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cloudflare Analytics
A simple proof-of-concept to build custom analytics dashboards for Cloudflare accounts with Cloudflare’s Developer Platform. The data is fetched via Cloudflare's GraphQL API.
[Screenshot](https://github.com/tejado/cf-analytics/blob/main/.github/cf-analytics-screenshot.png)
The following is a potential high-level architecture, by using additionally also Cloudflare Log Explorer for non-sampled data and D1 for authorization.
D1 and Log Explorer are not implemented.
## Getting Started
At first, add your Cloudflare Account ID and Cloudflare Secret Store ID to "wrangler.jsonc".
To fully protect the custom dashboard, Cloudflare Access has to be configured after the deployment according to [Publish a self-hosted application to the Internet](https://developers.cloudflare.com/cloudflare-one/applications/configure-apps/self-hosted-public-app/).
### Install
```bash
npm install
```
### Development
Start the development server with HMR:
```bash
npm run dev
```
Your application will be available at `http://localhost:5173`.
## Build
```bash
npm run build
```
## Preview/run the build locally
```bash
npm run preview
```
## Deploy to Cloudflare
```sh
npm run deploy
```