-
Notifications
You must be signed in to change notification settings - Fork 2
feat: scaffold missing code files for dashboard, core/client/shared, and auth template #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
weroperking
wants to merge
1
commit into
main
from
codex/understand-project-context-and-mission-fzrpvx
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # AGENTS.md — BetterBase Repository Operating Guide | ||
|
|
||
| ## Mission Context | ||
| This repository contains planning artifacts and the early implementation scaffold for **BetterBase**: | ||
| - An AI-native backend platform inspired by Supabase. | ||
| - Built with a **TypeScript-first** developer experience. | ||
| - Runtime and tooling emphasis: **Bun**, Turborepo, Drizzle, BetterAuth, Hono. | ||
|
|
||
| ## Assistant Identity / Model Context | ||
| - If asked which model is running, reply with the runtime-configured model identifier when available; otherwise provide a neutral capability-focused response. | ||
|
|
||
| ## Current Strategic Inputs | ||
| Primary planning docs to align with before implementation: | ||
| - `betterbase_blueprint.md` | ||
| - `betterbase_reuse_strategy.md` | ||
|
|
||
| ## Persistent Project Prompt (Apply to Every New Task) | ||
| Use and preserve the following project prompt context for future BetterBase implementation tasks: | ||
|
|
||
| PROJECT: BetterBase - AI-Native Backend Framework | ||
| STACK: Bun + TypeScript + Hono + Drizzle ORM + SQLite (local) / Postgres (production) | ||
|
|
||
| PHILOSOPHY: | ||
| - AI-first: Generate `.betterbase-context.json` for AI agents to read | ||
| - Docker-less: Use `bun:sqlite` for <100ms startup | ||
| - Zero lock-in: Users own their schemas | ||
| - Type-safe: Strict TypeScript, Zod validation everywhere | ||
|
|
||
| BASE APP STRUCTURE: | ||
| - `/src/db` (`schema.ts`, `index.ts`) | ||
| - `/src/routes` (API endpoints) | ||
| - `/src/middleware` (auth, validation) | ||
| - `/src/lib` (utilities) | ||
| - `betterbase.config.ts` | ||
| - `drizzle.config.ts` | ||
|
|
||
| ## Engineering Defaults | ||
| 1. **Runtime:** Bun (prefer Bun commands and Bun workspaces). | ||
| 2. **Language:** TypeScript in strict mode. | ||
| 3. **Monorepo:** Turborepo with `apps/*` and `packages/*`. | ||
| 4. **Core stack direction:** | ||
| - API/server templates: Hono | ||
| - ORM/migrations: Drizzle | ||
| - Auth direction: BetterAuth | ||
| 5. **Approach:** Reuse Better-T-Stack patterns where strategic, build BetterBase-differentiating features from scratch. | ||
|
|
||
| ## Repository Structure Guidance | ||
| When scaffolding implementation, use: | ||
| - `betterbase/packages/cli` → canonical `bb` CLI implementation | ||
| - `betterbase/apps/cli` → legacy wrapper/stub (delegates to package CLI) | ||
| - `betterbase/apps/dashboard` → dashboard app | ||
| - `betterbase/packages/core` → backend/core engine | ||
| - `betterbase/packages/client` → `@betterbase/client` | ||
| - `betterbase/packages/shared` → shared utilities/types | ||
| - `betterbase/templates/base` → base starter template | ||
| - `betterbase/templates/auth` → auth starter template | ||
|
|
||
| ## Workflow Rules for Agents | ||
| 1. Read this file and planning docs before major code generation. | ||
| 2. Keep changes incremental and commit in logical units. | ||
| 3. Prefer small, composable files and clear package boundaries. | ||
| 4. Avoid introducing lock-in assumptions that conflict with BetterBase goals. | ||
| 5. When uncertain, bias toward the blueprint and reuse strategy docs. | ||
| 6. Ensure new templates follow the persistent project prompt above. | ||
|
|
||
| ## Quality & Validation | ||
| - Run lightweight checks whenever possible (format/lint/typecheck when available). | ||
| - Keep generated scaffolding runnable with Bun commands. | ||
|
|
||
| ## Documentation Expectations | ||
| - Update docs when structure or commands change. | ||
| - Keep command examples Bun-first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| node_modules | ||
| .bun | ||
| .turbo | ||
| dist | ||
| .next | ||
|
|
||
| .vscode/ | ||
| .idea/ | ||
|
|
||
| .env | ||
| .env.* | ||
| .env.local | ||
| .env.test | ||
| !.env.example | ||
|
|
||
| *.log | ||
| npm-debug.log | ||
| yarn-error.log | ||
| pnpm-debug.log | ||
|
|
||
| coverage/ | ||
| .cache/ | ||
| .parcel-cache/ | ||
|
|
||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # BetterBase Monorepo | ||
|
|
||
| Initial BetterBase monorepo scaffold with a concrete base template. | ||
|
|
||
| ## Structure | ||
|
|
||
| - `apps/cli` — legacy CLI wrapper/stub | ||
| - `apps/dashboard` — dashboard/studio app | ||
| - `packages/cli` — canonical `@betterbase/cli` implementation | ||
| - `packages/core` — core backend engine | ||
| - `packages/client` — SDK (`@betterbase/client`) | ||
| - `packages/shared` — shared utilities/types | ||
| - `templates/base` — Bun + TypeScript + Hono + Drizzle starter template | ||
| - `templates/auth` — auth template placeholder | ||
|
|
||
| ## Tooling Direction | ||
|
|
||
| - Runtime/package manager: **Bun** | ||
| - Workspace orchestration: **Turborepo** | ||
| - Language: **TypeScript** | ||
|
|
||
| ## Base Template Commands | ||
|
|
||
| From `templates/base`: | ||
|
|
||
| - `bun run dev` | ||
| - `bun run db:generate` | ||
| - `bun run db:push` | ||
| - `bun run typecheck` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # @betterbase/cli-legacy | ||
|
|
||
| This package is a legacy wrapper placeholder. | ||
|
|
||
| - Canonical CLI implementation: `betterbase/packages/cli` (`@betterbase/cli`) | ||
| - This package exists only for backwards compatibility and forwards execution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "name": "@betterbase/cli-legacy", | ||
| "version": "0.0.0", | ||
| "private": true, | ||
| "type": "module", | ||
| "bin": { | ||
| "bb-legacy": "./dist/index.js" | ||
| }, | ||
| "scripts": { | ||
| "build": "bun build ./src/index.ts --outfile ./dist/index.js --target bun", | ||
| "dev": "bun run src/index.ts", | ||
| "typecheck": "tsc -p tsconfig.json --noEmit" | ||
| }, | ||
| "dependencies": { | ||
| "@betterbase/cli": "workspace:*" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "^5.9.3" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/usr/bin/env bun | ||
|
|
||
| /** | ||
| * Legacy bb wrapper entrypoint. | ||
| * | ||
| * Forwards execution to the canonical CLI implementation in packages/cli. | ||
| */ | ||
| export async function runLegacyCli(): Promise<void> { | ||
| const { runCli } = await import('@betterbase/cli'); | ||
| await runCli(process.argv); | ||
| } | ||
|
|
||
| if (import.meta.main) { | ||
| (async () => { | ||
| await runLegacyCli(); | ||
| })().catch((error) => { | ||
| const message = error instanceof Error ? error.message : String(error); | ||
| console.error(message); | ||
| process.exitCode = 1; | ||
| }); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "outDir": "dist", | ||
| "rootDir": ".", | ||
| "types": ["bun"] | ||
| }, | ||
| "include": ["src", "test"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Dashboard App (Scaffold) | ||
|
|
||
| Initial dashboard app scaffold for BetterBase. | ||
|
|
||
| ## Included | ||
|
|
||
| - `src/index.ts` placeholder entry | ||
| - `package.json` with Bun scripts | ||
| - `tsconfig.json` strict TypeScript setup | ||
|
|
||
| ## Planned Features (Optional) | ||
|
|
||
| - [ ] Table browser and editor | ||
| - [ ] API explorer / request runner | ||
| - [ ] Auth and session management views | ||
| - [ ] Project settings and environment controls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "name": "@betterbase/dashboard", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
| "type": "module", | ||
| "scripts": { | ||
| "build": "echo 'dashboard: no build step yet'", | ||
| "dev": "bun run src/index.ts", | ||
| "typecheck": "tsc -p tsconfig.json --noEmit" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| console.log('BetterBase Dashboard scaffold initialized.'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "types": ["bun"], | ||
| "outDir": "dist" | ||
| }, | ||
| "include": ["src/**/*.ts"] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auth template is no longer just a "placeholder".
The PR adds a concrete auth template with Hono routes, middleware, and Drizzle schema. Update this line to reflect that.
Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents