Local Development
This is the fastest way to run SecureVault locally with the current repository layout.
Repository layout
- Repository root:
securevault/ - Main application:
secure-vault/ - Public docs site source:
docs/
Quick start
Install app dependencies.
powershellcd secure-vault npm installCreate
secure-vault/.env.localfrom the checked-insecure-vault/.env.examplefile.Set the minimum required values.
iniDATABASE_HOST=127.0.0.1 DATABASE_PORT=3307 DATABASE_NAME=SecureVault DATABASE_USER=securevault DATABASE_PASSWORD=securevault MASTER_ENCRYPTION_KEY=<64-char hex key> R2_ACCOUNT_ID=<r2-account-id> R2_ACCESS_KEY_ID=<r2-access-key> R2_SECRET_ACCESS_KEY=<r2-secret> R2_BUCKET_NAME=<r2-bucket> NEXT_PUBLIC_APP_URL=http://127.0.0.1:3000 REDIS_URL=redis://127.0.0.1:6379 SEMANTIC_INDEXING_ENABLED=true SEMANTIC_INDEXING_EXECUTION_MODE=inline SEMANTIC_INDEXING_PROVIDER=google GEMINI_API_KEY=<gemini-api-key> GEMINI_EMBEDDING_MODEL=gemini-embedding-2-previewLeave
DATABASE_SSL_MODEempty for the default local Compose MariaDB flow. When you connect to a managed MariaDB instance that requires TLS, setDATABASE_SSL_MODE=verify-fulland provideDATABASE_SSL_CAif your provider uses a custom CA bundle.Generate a master key if needed.
powershellnode -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Start MariaDB and Redis.
powershellnpm run dev:servicesApply the checked-in migrations.
powershellnpx drizzle-kit migrateStart the app.
powershellnpm run dev
Helpful local notes
- Real upload, preview, and download flows need valid
R2_*credentials. - For local runs without Redis-backed coordination, set
DISABLE_REDIS=true. - The documented local default keeps semantic indexing enabled with
SEMANTIC_INDEXING_EXECUTION_MODE=inline. - For local semantic indexing without an external Gemini key, use
SEMANTIC_INDEXING_PROVIDER=fake. - If
RESEND_API_KEYis unset, OTP and email flows log locally instead of sending real email. - Signup is intentionally auto-verified right now for hackathon velocity; a fuller production rollout would gate activation behind a Resend-backed email verification flow or equivalent.
Docs workflow
The documentation site has its own root-level package setup.
powershell
npm install
npm run docs:devUse npm run docs:build before merging documentation changes to confirm the GitHub Pages build output still succeeds.