- Go 1.23+ installed
- Node.js 18+ and npm installed
- PostgreSQL 12+ running
# Using Docker (recommended)
docker run --name appvault-postgres `
-e POSTGRES_PASSWORD=postgres `
-e POSTGRES_DB=appvault `
-p 5432:5432 `
-d postgres:15-alpine
# Or use existing PostgreSQL instance# Set environment variables (or use .env file)
$env:SERVER_PORT="8888"
$env:DATABASE_URL="postgres://postgres:postgres@localhost:5432/appvault?sslmode=disable"
$env:JWT_SECRET="your-super-secret-jwt-key-change-in-production"# From project root
cd c:\Sources\GitHub\app-vault
# Run migrations (backend will auto-migrate on startup)# Terminal 1: Start the Go backend
cd c:\Sources\GitHub\app-vault
go run cmd/server/main.go
# Backend will start on http://localhost:8888
# Check health: http://localhost:8888/health# Terminal 2: Install npm packages
cd c:\Sources\GitHub\app-vault\web
npm install# Same terminal (Terminal 2)
npm run dev
# Frontend will start on http://localhost:5173
# Opens automatically in browser- Open browser to http://localhost:5173
- Click "Create Account"
- Register with email and password
- IMPORTANT: Save the generated secret key (shown only once!)
- Login with email, password, and secret key
- Start managing secrets! π
# Run with hot reload using air (install: go install github.com/cosmtrek/air@latest)
cd c:\Sources\GitHub\app-vault
air
# Or use go run
go run cmd/server/main.go
# Run tests
go test ./...
# Build binary
go build -o bin/app-vault.exe cmd/server/main.gocd c:\Sources\GitHub\app-vault\web
# Development server (hot reload)
npm run dev
# Type checking
npm run type-check
# Build for production
npm run build
# Preview production build
npm run previewapp-vault/
βββ cmd/server/main.go # Backend entry point
βββ internal/
β βββ api/ # HTTP handlers
β βββ crypto/ # Encryption service
β βββ db/ # Database layer
β βββ service/ # Business logic
β βββ ...
βββ migrations/ # SQL migrations
βββ web/ # Frontend application
β βββ src/
β β βββ api/ # API clients
β β βββ components/ # Vue components
β β βββ views/ # Pages
β β βββ stores/ # Pinia stores
β β βββ ...
β βββ package.json
β βββ vite.config.ts
βββ docker-compose.yml # Docker setup (optional)
# Start everything with Docker Compose
docker-compose up -d
# Backend: http://localhost:8888
# Frontend: Needs to be served separately or built and embeddedSERVER_PORT=8888
DATABASE_URL=postgres://postgres:postgres@localhost:5432/appvault?sslmode=disable
JWT_SECRET=your-super-secret-jwt-key
ARGON_MEMORY=65536
ARGON_ITERATIONS=3
ARGON_PARALLELISM=4
RATE_LIMIT_MAX=100
RATE_LIMIT_WINDOW_SECONDS=60
ENABLE_TLS=falseVITE_API_URL=http://localhost:8888/api/v1
VITE_APP_NAME=SecureVault
VITE_VERSION=2.1.0POST /api/v1/auth/register- Register new userPOST /api/v1/auth/login- Login with credentialsPOST /api/v1/auth/logout- Logout
POST /api/v1/secrets- Create secretGET /api/v1/secrets- List secrets (metadata only)GET /api/v1/secrets/:id- Get secret with valueGET /api/v1/secrets/by-name?name=X- Get by namePUT /api/v1/secrets/:id- Update secretDELETE /api/v1/secrets/:id- Delete secret
POST /api/v1/keys/rotate- Rotate vault keyGET /api/v1/keys/status- Get key status
GET /health- Health checkGET /metrics- Prometheus metrics
# Health check
Invoke-WebRequest http://localhost:8888/health
# Register user
$body = @{
email = "admin@example.com"
password = "SecurePassword123!"
} | ConvertTo-Json
Invoke-WebRequest -Method POST `
-Uri http://localhost:8888/api/v1/auth/register `
-ContentType "application/json" `
-Body $body
# Login
$body = @{
email = "admin@example.com"
password = "SecurePassword123!"
secretKey = "A3-XXXXXX-XXXXXX-XXXXX"
} | ConvertTo-Json
$response = Invoke-WebRequest -Method POST `
-Uri http://localhost:8888/api/v1/auth/login `
-ContentType "application/json" `
-Body $body
$token = ($response.Content | ConvertFrom-Json).token- Check PostgreSQL is running:
docker psor check service - Verify DATABASE_URL is correct
- Check port 8888 is not in use:
netstat -ano | findstr :8888
- Verify backend is running on http://localhost:8888
- Check CORS configuration in backend
- Inspect browser console for errors
- Check Vite proxy configuration in
vite.config.ts
- Run migrations: Backend auto-migrates on startup
- Check PostgreSQL logs
- Verify database exists:
psql -U postgres -c "\l"
# Clear Go module cache
go clean -modcache
# Clear npm cache
cd web
rm -rf node_modules package-lock.json
npm install- β Phase 1: Core secrets management (COMPLETE)
- π Phase 2: Service Principals endpoints (IN PROGRESS)
- β³ Phase 3: Key Rotation UI
- β³ Phase 4: Audit Logs UI
- β³ Phase 5: Advanced features (export/import, bulk ops)
- Backend API: http://localhost:8888
- Frontend UI: http://localhost:5173
- Health Check: http://localhost:8888/health
- Metrics: http://localhost:8888/metrics
- Secret Key: The A3-format secret key is generated ONCE during registration. Save it securely!
- Session Storage: Secret key is stored in sessionStorage and cleared when tab closes
- JWT Tokens: Valid for 24 hours, stored in localStorage
- Hot Reload: Both frontend and backend support hot reload in dev mode
- Database: Migrations run automatically on backend startup
- Check the logs: Backend stdout, Browser console
- Verify environment variables are set
- Ensure all services are running
- Check README.md for detailed documentation
Happy Coding! π