qa-foundry
v0.2.7
Published
QA Foundry - AI-Powered QA Automation Platform. Record tests, generate with AI, run Playwright tests, review with HITL, track results.
Maintainers
Readme
QAFoundry Server
Express API server with MongoDB, Playwright test runner, Socket.IO, and AI services. Serves the built React SPA as static files.
Package: qa-foundry
CLI: qa-foundry
Quick Start
1. Install
npm install -g qa-foundry2. Setup (One-time)
qa-foundry setupInteractive wizard will configure:
- MongoDB connection
- JWT secrets
- Browser installation
- Database seeding with demo account
3. Start
qa-foundry startServer runs on http://localhost:3002 by default.
That's it! Your QAFoundry instance is ready to use.
Storage
Uploads, reports, screenshots, traces, videos, and recordings are written to the configured storagePath. Assets are served at /uploads/*.
Storage location:
- Dev default:
./uploads(relative to cwd) - Production: use an absolute path or persistent volume
{ "storagePath": "/var/qa-foundry/uploads" }CLI Reference
qa-foundry [command] [options]
Commands:
setup Interactive setup wizard
• Configure MongoDB & Authentication
• Setup Playwright Testing
• Verify Installation
• Seed Database (optional)
start Start the QAFoundry server
help Show help message
version Show version
Options:
--port <number> Server port (default: 3002)
--host <hostname> Server host (default: localhost)
--skip-seed Skip database seeding during setup
--help Show help message
--version Show version
Examples:
qa-foundry setup
qa-foundry start --port 3000 --host 0.0.0.0
qa-foundry help
qa-foundry versionAdvanced Configuration (Developers)
Resolution order: CLI flags > env vars > .env file > defaults
Environment Variables
| Setting | Env Var | Default | Description |
|---------|---------|---------|-------------|
| port | PORT | 3002 | HTTP port |
| mongoUri | MONGODB_URI | (required) | MongoDB connection |
| jwtSecret | JWT_SECRET | qa-foundry-development-access-secret | Access token secret override |
| jwtRefreshSecret | JWT_REFRESH_SECRET | qa-foundry-development-refresh-secret | Refresh token secret override |
| frontendUrl | FRONTEND_URL | http://localhost:3000 | CORS origin |
| storagePath | STORAGE_PATH | ./uploads | Upload directory |
| geminiApiKey | GEMINI_API_KEY | (optional) | Gemini API key |
| llmProvider | LLM_PROVIDER | gemini | gemini or ollama |
| encryptionKey | ENCRYPTION_KEY | (optional) | Encryption key |
Using Environment Variables
JWT environment variables are optional for both development and CLI startup.
When omitted (or empty), the server uses the static development defaults above.
No secret files are generated or read. JWT precedence for CLI startup is:
saved setup configuration (jwt_secret / jwtSecret and
jwt_refresh_secret / jwtRefreshSecret) > environment > server .env >
static defaults. There are no JWT CLI options. Direct npm run dev reads
environment / .env and defaults, not setup configuration.
Warning: Defaults are public and unsuitable for production or shared deployments. Override both with private secrets before exposing the server. Startup warns when either override is missing. Changing a secret invalidates tokens signed with it. Existing generated secret files from earlier versions are no longer used.
Set overrides in your QA Foundry home directory's config.json:
{
"jwtSecret": "<private-access-secret>",
"jwtRefreshSecret": "<private-refresh-secret>"
}Start with custom configuration:
MONGODB_URI=mongodb://... \
JWT_SECRET=your-secret \
JWT_REFRESH_SECRET=your-refresh-secret \
qa-foundry start --port 3000 --host 0.0.0.0Frontend Assets
The server serves the React SPA from the built dist/frontend/ directory (created during the build process). Ensure the frontend is built before deploying.
Seeding the Database
After running qa-foundry setup, the database is pre-seeded with a demo account.
Demo Credentials:
- Email:
[email protected] - Password:
Admin@123
Includes sample org, projects, test suites, and test cases ready to explore.
Managing organization members
Admins can invite, update, and remove members in their own organization, but only superadmins can assign the superadmin role or manage superadmin accounts. Superadmins can manage other superadmins and assign that role. Users cannot change their own role or active status, delete their own account, or reset their own password through member management; use profile settings for a personal password change.
To manually reseed:
# From workspace root:
npm run seed
# Or directly:
MONGODB_URI=mongodb://127.0.0.1:27017/qa-foundry node packages/qaforge-server/src/seed.js