Commit Graph

181 Commits

Author SHA1 Message Date
9aad5fcb5f afasdfsad 2026-02-08 09:27:54 -05:00
c2e703d642 fdasfsdafsaf 2026-02-08 09:27:16 -05:00
0b52b92819 asdfasdf 2026-02-08 09:21:09 -05:00
ad1b2de806 Get base files closer to being bootstrappable 2026-02-08 09:19:27 -05:00
98f1f554c1 Fix add-user command 2026-02-08 08:04:59 -05:00
554f0e0044 . 2026-02-08 08:04:49 -05:00
530e3dccef Add todo item 2026-02-08 08:04:38 -05:00
91780b6dca Add formatted error pages for console and browser
Errors now show app frames highlighted with relative paths and library
frames collapsed, both in ANSI on the console and as a styled HTML page
in the browser. Process-level uncaughtException/unhandledRejection
handlers also use the formatter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 18:07:41 -05:00
a39ed37a03 Enable source maps for readable stack traces
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 17:05:18 -05:00
35165dcefe Wire up node_modules 2026-02-07 16:56:13 -05:00
dbd4e0a687 Add a note re necessary software 2026-02-07 16:55:54 -05:00
7b271da2b8 Fix some commands 2026-02-07 16:55:33 -05:00
940cef138e Suppress duplicate tar output in bootstrap and upgrade scripts
Verbose on the sending tar, quiet on the receiving tar, so the
file list prints once.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 10:13:22 -05:00
296e460326 Implement upgrade.sh for framework version upgrades
Removes old framework files (per current file-list), copies in new
ones from the target ref, and stages everything for the user to
review before committing. Also adds file-list to itself so it
gets upgraded too.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 10:10:09 -05:00
738e622fdc Add bootstrap and cached repository scripts
bootstrap.sh clones from a local mirror and extracts framework
files into the working directory. update-cached-repository.sh
maintains the mirror under ~/.cache/diachron/v1/repositories/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 09:36:20 -05:00
034b035a91 Cache downloaded binaries in ~/.cache/diachron/v1/binaries
Downloads Node.js and pnpm to a shared cache directory, then
copies into the project tree. Repeated project bootstraps skip
the network entirely if the cache is warm.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 09:12:21 -05:00
f352ae44e1 Outline what the first version of the upgrade script should do 2026-02-02 20:03:19 -05:00
341db4f821 Add dependency duplication check between app and framework
Adds check-deps.ts which ensures backend/package.json doesn't duplicate
any dependencies already provided by backend/diachron/package.json.
Integrated into backend/check.sh.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 19:47:05 -05:00
eabec3816b Add bootstrap.sh script
It's meant to be used to bootstrap new projects.  It could probably be curled
and piped through bash although this has not been tested yet.
2026-02-02 19:42:59 -05:00
b752eb5080 Make shfmt happier 2026-02-02 18:32:53 -05:00
1ed5aa4b33 Reorder some imports 2026-02-02 18:32:39 -05:00
4d1c30b874 Fix some stragglers 2026-02-02 18:31:03 -05:00
02edf259f0 Rename framework/ to diachron/ and update all references
Update paths in .gitignore, cmd, develop, mgmt, sync.sh, check.sh,
fixup.sh, CLAUDE.md, docs/new-project.md, and backend/*.sh scripts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 18:10:32 -05:00
db1f2151de Rename express/ to backend/ and update references
Update paths in sync.sh, master/main.go, and CLAUDE.md to reflect
the directory rename.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:54:44 -05:00
6e669d025a Move many files to diachron subdir 2026-02-02 17:22:08 -05:00
a1dbf71de4 Rename directory 2026-02-02 16:53:22 -05:00
0afc3efa5d Fix test script to work on macOS default bash
Replace globstar (bash 4.0+) with find for portability.
macOS ships with bash 3.2 which doesn't support globstar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 12:25:26 -05:00
6f2ca2c15d Tweak marketing blurb 2026-02-02 11:37:05 -05:00
6a41273835 Add macOS x86_64 platform support
Platform detection now happens in framework/platform, sourced by both
sync.sh and the node shim. Uses shasum on macOS, sha256sum on Linux.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 11:21:41 -05:00
33251d9b77 Add comprehensive test suite for express modules
Tests for:
- user.ts: User class, roles, permissions, status checks
- util.ts: loadFile utility
- handlers.ts: multiHandler
- types.ts: methodParser, requireAuth, requirePermission
- logging.ts: module structure
- database.ts: connectionConfig, raw queries, PostgresAuthStore
- auth/token.ts: generateToken, hashToken, parseAuthorizationHeader
- auth/password.ts: hashPassword, verifyPassword (scrypt)
- auth/types.ts: Zod parsers, Session class, tokenLifetimes
- auth/store.ts: InMemoryAuthStore
- auth/service.ts: AuthService (login, register, verify, reset)
- basic/*.ts: route structure tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 20:40:49 -06:00
408032c30d fmt 2026-01-25 18:21:01 -06:00
19959a0325 . 2026-01-25 18:20:57 -06:00
87c9d1be16 Update todo list 2026-01-25 18:19:32 -06:00
c2748bfcc6 Add test infrastructure for hydrators using node:test
- Add docker-compose.test.yml with isolated PostgreSQL on port 5433
- Add environment variable support for database connection config
- Add test setup utilities and initial user hydrator tests
- Add test and test:watch scripts to package.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:18:15 -06:00
2f5ef7c267 Add automatic restart for crashed worker processes
Workers are now monitored and automatically restarted when they crash.
The worker pool validates addresses before returning them to skip stale
entries from crashed workers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:55:43 -06:00
bcd71f2801 Add kysely-codegen command 2026-01-25 17:54:50 -06:00
82a8c03316 Pull in typeid-js 2026-01-25 17:26:09 -06:00
b8065ead79 Add develop db-url 2026-01-25 17:25:57 -06:00
811c446895 Pull in kysely-codegen 2026-01-25 12:28:44 -06:00
5a8c0028d7 Add user_credentials migration 2026-01-25 12:14:34 -06:00
f7e6e56aca Merge branch 'experiments' 2026-01-25 12:12:35 -06:00
cd19a32be5 Add more todo items 2026-01-25 12:12:15 -06:00
478305bc4f Update /home template 2026-01-25 12:12:02 -06:00
421628d49e Add various doc updates
They are still very far from complete.
2026-01-25 12:11:34 -06:00
4f37a72d7b Clean commands up 2026-01-24 16:54:54 -06:00
e30bf5d96d Fix regexp in fixup.sh 2026-01-24 16:39:13 -06:00
8704c4a8d5 Separate framework and app migrations
Also add a new develop command: clear-db.
2026-01-24 16:38:33 -06:00
579a19669e Match user and session schema changes 2026-01-24 15:48:22 -06:00
474420ac1e Add development command to reset the database and rerun migrations 2026-01-24 15:13:34 -06:00
960f78a1ad Update initial tables 2026-01-24 15:13:30 -06:00