Files
publisher-dashboard/devenv.nix
RevIQ c1afc39062 Add utils package with Web Crypto password hashing
- Create @reviq/utils package with PBKDF2-SHA256 password hashing
  compatible with Cloudflare Workers (uses crypto.subtle)
- Update api-server and CLI to use new utils package for consistent
  password hashing format across the codebase
- Add pino logging to api-server for better request debugging
- Make login request tokens cryptographically secure base58 strings
  instead of database IDs
- Add migration to make login_requests.token non-nullable with unique
  constraint
- Fix RPCLink URL construction for client-side API calls
- Add db:codegen script to root package.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 18:12:33 +08:00

52 lines
1.3 KiB
Nix

{ pkgs, ... }:
{
packages = with pkgs; [
nixfmt-rfc-style
biome
git
dbmate
ast-grep
];
dotenv.enable = true;
languages.javascript = {
enable = true;
bun.enable = true;
};
services.postgres = {
enable = true;
initialDatabases = [
{ name = "reviq-dashboard"; }
{ name = "reviq-dashboard_test"; }
];
initialScript = ''
CREATE USER reviq WITH PASSWORD 'reviq' SUPERUSER;
GRANT ALL PRIVILEGES ON DATABASE "reviq-dashboard" TO reviq;
GRANT ALL PRIVILEGES ON DATABASE "reviq-dashboard_test" TO reviq;
'';
listen_addresses = "localhost";
};
processes = {
"dev-publisher-dashboard".exec = "bun run --cwd apps/publisher-dashboard dev";
"build-watch".exec = "bun run build:watch:packages";
"api-server".exec = "bun run --cwd apps/api-server dev";
};
env = {
DATABASE_URL = "postgres://reviq:reviq@localhost/reviq-dashboard?sslmode=disable";
TEST_DATABASE_URL = "postgres://reviq:reviq@localhost/reviq-dashboard_test?sslmode=disable";
};
scripts = {
"db-up".exec = "dbmate up";
"db-new".exec = "dbmate new \"$1\"";
"db-status".exec = "dbmate status";
"db-gen".exec = "bun run --cwd packages/db-schema generate";
"reviq".exec = "bun run --cwd apps/cli cli \"$@\"";
};
}