An open API service indexing awesome lists of open source software.

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.

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.

Potential architecture for custom dashboards build on top of Cloudflare Developer Platform.
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
```