Skip to content
Open
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
21 changes: 21 additions & 0 deletions .codelit-platform.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"schemaVersion": 2,
"product": {
"name": "medialit",
"slug": "medialit"
},
"cliVersion": "0.2.0",
"capabilities": [
"auth",
"mcp",
"observability",
"billing"
],
"managedFiles": {
".github/workflows/platform-conformance.yml": "586a69a3096553349aaf0d1ea36df25f32c4eeef8a713e8f71b7941c2fe4ff85"
},
"productOwnedGlobs": [
"apps/**",
"packages/**"
]
}
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Product-owned. Opens one grouped pull request when a CodeLit Platform
# release is published; all @codelitdev packages release under one version.
# The platform conformance workflow gates the pull request.
version: 2
updates:
- package-ecosystem: "bun"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-name: "@codelitdev/*"
groups:
codelit-platform:
patterns:
- "@codelitdev/*"
23 changes: 10 additions & 13 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,19 @@ jobs:
- name: Checkout and pull branch
run: git checkout "${GITHUB_REF:11}" && git pull

- name: Install pnpm
run: |
npm i pnpm@10.7.1 -g
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.1

- name: Install dependencies
run: pnpm install
run: bun install --frozen-lockfile

- name: Run lint
run: pnpm lint

- name: Run prettier
run: pnpm prettier
- name: Run lint
run: bun run lint

- name: Build dependencies
run: |
pnpm -r build
- name: Run prettier
run: bun run prettier

- name: Run test
run: pnpm test
run: bun run test
20 changes: 8 additions & 12 deletions .github/workflows/deploy-docs-to-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect package manager
id: detect-package-manager
run: |
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.1
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
Expand All @@ -65,14 +61,14 @@ jobs:
path: |
apps/docs/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lock') }}-
- name: Install dependencies
run: pnpm i --frozen-lockfile
run: bun install --frozen-lockfile
- name: Build with Next.js
run: pnpm --filter @medialit/docs build
run: bun --filter @medialit/docs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/platform-conformance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Platform conformance

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.1
# `platform-cli create` intentionally does not resolve dependencies.
# Bootstrap the product lockfile on its first run; all subsequent CI
# installs are immutable and use the frozen lockfile below.
- run: bun install
if: ${{ !hashFiles('bun.lock') }}
- run: bun install --frozen-lockfile
# Pinned to the CLI release that wrote this file. `sync` moves it.
- run: bunx @codelitdev/platform-cli@0.2.0 doctor
- run: bun run --filter "*/api" check:drift
# Fails when the API package has no `test:conformance` script.
- run: bun run --filter "*/api" test:conformance
11 changes: 6 additions & 5 deletions .github/workflows/publish-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.1

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

- name: Configure CI Git User
Expand All @@ -42,15 +43,15 @@ jobs:
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }}

- name: Install dependencies
run: pnpm install
run: bun install --frozen-lockfile

- name: Create and publish versions
id: changesets
uses: changesets/action@v1
with:
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm ci:publish
publish: bun run ci:publish
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ dist
.agent-skills/
.claude/
.agents/

# archives
db.archive
10 changes: 0 additions & 10 deletions .migrations/00000-media-by-apikey.js

This file was deleted.

48 changes: 0 additions & 48 deletions .migrations/00001-add-internal-apikey.js

This file was deleted.

38 changes: 0 additions & 38 deletions .migrations/00002-set-unique-id-to-apikeys.js

This file was deleted.

1 change: 0 additions & 1 deletion .migrations/00003-initialize-subscriptions.js

This file was deleted.

2 changes: 0 additions & 2 deletions .migrations/00004-drop-internal-apikey.js

This file was deleted.

4 changes: 0 additions & 4 deletions .migrations/00005-migrate-to-dual-bucket-architecture.js

This file was deleted.

28 changes: 0 additions & 28 deletions .migrations/00006-mark-first-apikeys-default.js

This file was deleted.

16 changes: 0 additions & 16 deletions .migrations/package.json

This file was deleted.

5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ node_modules
dist
**/.next
apps/docs/.source
apps/docs/out
apps/docs/out
apps/api/src/db/schema/billing.generated.ts
.codelit-platform.json
.github/workflows/platform-conformance.yml
7 changes: 5 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Dev Environment

- Use `pnpm` as the package manager
- This is a monorepo — use `pnpm --filter <package-name> <command>` for specific packages
- Use `bun` as the package manager (Bun 1.4.1)
- This is a monorepo — use `bun --filter <package-name> <command>` for specific packages
- The API owns product behavior. The web app is a thin client over the API
- Postgres is the database (`DATABASE_URL`). Do not add a second data store for the same records
- Local dependencies run from `docker compose -f docker-compose.local.yml up` (Postgres, MinIO, Mailpit). The API and web app run on the host. Do not run that file together with `docker-compose.yml`
Loading
Loading