Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .env.example

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
10 changes: 10 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,15 @@ updates:
javascript-dependencies:
patterns:
- "*"
# @astrojs/check declares a peer range of typescript ^5 || ^6, so
# TypeScript 7+ breaks `astro check`. Keep it out of the group so one
# incompatible major does not fail the whole grouped update.
exclude-patterns:
- typescript
ignore:
# @types/node follows the Node major pinned in .nvmrc (24).
- dependency-name: "@types/node"
update-types:
- version-update:semver-major
cooldown:
default-days: 7
47 changes: 41 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,61 @@
name: CI

on:
pull_request:
# Docs-only changes skip CI; nothing here reads Markdown.
paths-ignore:
- "**/*.md"
merge_group:
push:
branches:
- main
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Cancel superseded PR runs only; every merge to main runs in full.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
biome:
name: Biome
lint:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup Biome
- name: Set up Biome
uses: biomejs/setup-biome@4c91541eaada48f67d7dbd7833600ce162b68f51 # v2.7.1

- name: Run Biome
- name: Lint
run: biome ci . --reporter=github

build:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
cache: npm

- name: Install dependencies
run: npm ci

- name: Type check
run: npm run typecheck

- name: Build
run: npm run build
24 changes: 24 additions & 0 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Dependency Review

on:
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
dependency-review:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Review dependency changes
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
16 changes: 5 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
# build output
dist/
.wrangler/
# generated types
.astro/
worker-configuration.d.ts
.wrangler/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production
.env.*
.dev.vars*

# macOS-specific files
# editor and OS files
.DS_Store

# jetbrains setting folder
.idea/
.vscode/
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
save-exact=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.12.0
8 changes: 8 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Agent notes

- Static Astro site, no adapter and no UI framework. Page behavior is plain `<script>` tags; don't
add React, Svelte or another islands framework without asking.
- `npm run check` must pass before you push (Biome, `astro check`, build).
- Keep tokens out of `localStorage`: the Auth0 client uses its default in-memory cache and restores
the session silently from the same-site custom domain.
- Dependencies are pinned exactly (`.npmrc` sets `save-exact`). Dependabot updates them monthly.
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contributing

The site is a static [Astro](https://docs.astro.build) build served by a Cloudflare Worker
(`wrangler.jsonc`). Cloudflare Workers Builds deploys `main`.

## Setup

Use the Node version in `.nvmrc`, then:

```sh
npm ci
npm run dev # http://localhost:4321
npm run check # lint, type check, build: what CI runs
npm run preview # serve the build through Wrangler
```

## Auth0

Login uses the Auth0 SPA SDK (`src/lib/auth.ts`) against the tenant on `id.letsbuilda.dev`.
The domain and client ID are public and live in that file, so there is no `.env`.

The Auth0 application must list each origin you run the site from (production and
`http://localhost:4321`) under Allowed Callback URLs, Allowed Logout URLs and Allowed Web Origins.
64 changes: 3 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,5 @@
# Astro Starter Kit: Minimal
# letsbuilda.dev

```sh
npm create astro@latest -- --template minimal
```
The letsbuilda website, at [letsbuilda.dev](https://letsbuilda.dev).

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!

## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```text
/
├── public/
├── src/
│ └── pages/
│ └── index.astro
└── package.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## 🔐 Auth0 configuration

Authentication uses the [`@auth0/auth0-spa-js`](https://github.com/auth0/auth0-spa-js)
SDK (Authorization Code + PKCE). Configuration comes from two **public,
non-secret** environment variables:

| Variable | Description |
| :----------------------- | :--------------------------- |
| `PUBLIC_AUTH0_DOMAIN` | Auth0 tenant domain |
| `PUBLIC_AUTH0_CLIENT_ID` | Auth0 SPA application client ID |

Copy `.env.example` to `.env` for local development, and set the same variables
in the Cloudflare build environment for deploys (Astro inlines `PUBLIC_*` values
at build time).

In the Auth0 application (type: **Single Page Application**), add both your local
(`http://localhost:4321`) and production (`https://letsbuilda.dev`) origins to
**Allowed Callback URLs**, **Allowed Logout URLs**, and **Allowed Web Origins**,
and enable **Refresh Token Rotation**.

## 👀 Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
See [CONTRIBUTING.md](CONTRIBUTING.md) to work on it.
7 changes: 2 additions & 5 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// @ts-check

import cloudflare from "@astrojs/cloudflare";
import react from "@astrojs/react";
import { defineConfig } from "astro/config";

// https://astro.build/config
// https://docs.astro.build/en/reference/configuration-reference/
export default defineConfig({
adapter: cloudflare(),
integrations: [react()],
site: "https://letsbuilda.dev",
});
17 changes: 9 additions & 8 deletions biome.json → biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.16/schema.json",
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"includes": ["**", "!!worker-configuration.d.ts"]
"ignoreUnknown": false
},
"formatter": {
"enabled": true,
Expand All @@ -17,18 +16,20 @@
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedImports": "off",
"noUnusedVariables": "off"
}
"preset": "recommended"
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
},
"html": {
"experimentalFullSupportEnabled": true,
"formatter": {
"indentScriptAndStyle": true
}
},
"assist": {
"enabled": true,
"actions": {
Expand Down
Loading
Loading