- Add bootstrap command with direct DB access for initial setup - Implement auth login/logout/status CLI commands - Implement user create/confirm-email CLI commands - Implement org create/list/add-site CLI commands - Add admin.orgs.* and admin.users.* API endpoints - Add password hashing utility with scrypt - Add token hashing and authentication utility - Add superuser runtime checks for admin endpoints - Wrap multi-step operations in transactions - Fix config file permissions (0o600) for security - Remove token display from status command - Add return statements to void handlers - Add reviq CLI command to devenv Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
43 lines
989 B
Nix
43 lines
989 B
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"; } ];
|
|
initialScript = ''
|
|
CREATE USER reviq WITH PASSWORD 'reviq' SUPERUSER;
|
|
GRANT ALL PRIVILEGES ON DATABASE "reviq-dashboard" 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";
|
|
};
|
|
|
|
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 \"$@\"";
|
|
};
|
|
}
|