Testly AI is an AI-powered QA automation platform for GitHub repositories. It generates test cases from code context, runs them on cloud browsers, and delivers execution reports automatically.
- Overview
- Core Capabilities
- Demo Screenshots
- Technology Stack
- Architecture
- Project Layout
- API Surface
- Database
- Environment Variables
- Local Setup
- Queue and Email Operations
- Billing and Credits
- Testing
- Deployment Notes
- License
Testly AI is an end-to-end automation platform for QA teams and developers. It connects to GitHub repositories, analyzes code context, generates AI test cases, executes them through Browserbase + Playwright, and sends a rich execution report to the user.
The main workflow is:
- Authenticate with GitHub and connect repositories.
- Generate AI test cases from repo source code context.
- Run tests in a cloud browser and capture logs.
- Receive execution reports by email with PDF artifacts.
- OAuth-based GitHub connection.
- Repository discovery and selection.
- Targeted file analysis based on common Next.js/React structure.
- Gemini model generates structured test cases.
- Strict JSON schema enforcement with validation.
- Test routes and target files derived from repository context.
- Playwright execution on Browserbase.
- Script regeneration or cached execution mode.
- Live logs + session recording URL.
- Credit-based usage for generation and execution.
- Razorpay-powered checkout flow.
- Credits synchronized in workspace dashboard.
- Welcome and payment confirmation emails.
- Execution reports with PDF attachment.
- Batch run consolidation into a single report.
All screenshots are available under public/demo.
| Layer | Tech | Notes |
|---|---|---|
| Frontend | Next.js, React, Tailwind CSS, Radix UI | App Router UI + shared components |
| Backend | Next.js Route Handlers, Drizzle ORM | API routes and DB access |
| Database | Neon Postgres | Serverless Postgres |
| Auth | Clerk | User auth and sessions |
| AI | Google Gemini | Test case + script generation |
| Browser Automation | Playwright, Browserbase | Cloud execution and sessions |
| Messaging | RabbitMQ | Email event queue |
| Resend, pdf-lib | Transactional emails + PDF reports | |
| Payments | Razorpay | Credits purchase flow |
- Next.js App Router + TypeScript
- React 19
- Tailwind CSS + Radix UI
- Sonner for toasts
- Drizzle ORM with Neon Postgres
- Google Gemini (test generation + script generation)
- Browserbase + Playwright for cloud execution
- Clerk Authentication
- RabbitMQ (queue)
- Resend (email delivery)
- PDF generation via
pdf-lib
- Razorpay order creation and verification
- User connects GitHub and selects repos.
- API fetches repo tree and file context.
- Gemini generates test cases with strict JSON schema.
- Tests are executed in Browserbase sessions.
- Logs and results are persisted and emailed.
- Identity: Clerk
- Repository Intelligence: GitHub APIs
- Test Generation: Gemini
- Execution: Browserbase + Playwright
- Billing: Razorpay
- Notifications: RabbitMQ + Resend
app/
api/
generate-test-cases/ # AI test generation
test-cases/ # List, run, and settings APIs
github/ # OAuth + GitHub data
razorpay/ # Payment order + verification
user-repo/ # Repo storage + settings
users/ # User creation + credit sync
workspace/ # Main dashboard
components/
landing/ # Marketing site
custom/ # Workspace UI
ui/ # Shared UI primitives
context/ # React context providers
db/ # Drizzle schema + DB init
lib/ # Helpers (env, api, rate limit, etc.)
public/
demo/ # README screenshots
| Domain | Route Prefix | Purpose |
|---|---|---|
| Test Generation | /api/generate-test-cases |
Generate AI test cases |
| Test Execution | /api/test-cases/run |
Execute a test case |
| Test Case Management | /api/test-cases |
List test cases |
| Repo Management | /api/user-repo |
Save repos and settings |
| GitHub | /api/github/* |
OAuth + repo profile data |
| Payments | /api/razorpay/* |
Order + verification |
| Users | /api/users |
Create/load user and credits |
The schema is defined in db/schema.ts using Drizzle.
Main tables:
users- account and credit storagerepositories- connected repo metadata + settingstest_cases- AI test case payloads, scripts, and run metadata
Copy .env.example and fill the required keys:
cp .env.example .envRequired variables include:
DATABASE_URLNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYGITHUB_CLIENT_IDGITHUB_CLIENT_SECRETGEMINI_API_KEYBROWSERBASE_PROJECT_IDBROWSERBASE_API_KEYRZP_KEY_IDRZP_KEY_SECRETRABBITMQ_URLRESEND_API_KEYRESEND_FROM
git clone https://github.com/Aditya-KumarJha/Testlycd Testlynpm installcp .env.example .envnpx drizzle-kit pushnpm run devApp default: http://localhost:3000
RabbitMQ is used for email event processing:
USER_LOGIN-> welcome emailPAYMENT_CONFIRMED-> receipt emailTEST_RUN_COMPLETED-> execution report
In production, the consumer should run in a separate worker process.
- Each generated test case consumes credits.
- Each execution consumes credits based on priority.
- Credits update after generation and execution.
This project currently relies on runtime validations and QA runs. Add automated tests as the next step.
npm run dev # Start dev server
npm run build # Production build
npm run start # Start production server
npm run lint # Lint
npm run typecheck # Type check
npm run db:generate
npm run db:push # Same as: npx drizzle-kit push
npm run db:studio- Configure
.envsecrets in the hosting provider. - Run RabbitMQ consumer separately in production.
- Use a persistent rate limiter for multi-instance deployments.
MIT (see LICENSE).




