📋 Product Requirements Document (PRD)
1. Overview
Feature: Development Mode Scripts for PullShark AI
Priority: High
Status: Open
Owner: TBD
2. Problem Statement
Currently, PullShark AI can only be run using Docker Compose, which has several limitations for active development:
- Slow Iteration: Developers must rebuild Docker images for every code change, adding friction to the development cycle
- Resource Intensive: Running full Docker containers consumes more system resources than necessary during development
- Debugging Difficulty: Attaching debuggers and inspectors to containerized processes is more complex
- Hot Reload Absence: Changes to code require container restarts rather than instant hot module replacement
- Developer Onboarding: New contributors face a steeper learning curve when Docker is the only option
3. Goals & Success Metrics
Goals
- Enable developers to run the application locally without Docker
- Provide hot-reload capabilities for both frontend and backend
- Simplify debugging with direct access to Node.js processes
- Reduce development startup time from minutes to seconds
- Maintain parity with production environment configuration
Success Metrics
- Development environment starts in < 30 seconds
- Code changes reflect in < 3 seconds (hot reload)
- 100% feature parity between Docker and local development modes
- Zero configuration required for developers after initial setup
4. User Stories
As a backend developer,
I want to run the Express server locally with auto-restart on file changes,
So that I can iterate quickly without rebuilding Docker images.
As a frontend developer,
I want to run the Vite dev server with hot module replacement,
So that I can see my UI changes instantly in the browser.
As a full-stack developer,
I want to run both frontend and backend concurrently with a single command,
So that I can develop features that span the entire stack efficiently.
As a new contributor,
I want clear documentation on setting up the local development environment,
So that I can start contributing code within 15 minutes.
5. Technical Scope
5.1 Backend Development Scripts
Technology Stack:
- Node.js with TypeScript
- Express.js server
- Prisma ORM (PostgreSQL adapter)
- BullMQ + Redis for job queues
- MongoDB (Mongoose)
Required Scripts:
npm run dev - Start backend server with hot-reload using tsx/nodemon
npm run worker:dev - Start BullMQ worker with auto-restart
npm run db:migrate - Run Prisma migrations
npm run db:seed - Seed database with test data
npm run db:studio - Open Prisma Studio for database inspection
Dependencies to Add:
nodemon or tsx --watch for auto-restart
concurrently for running multiple processes
5.2 Frontend Development Scripts
Technology Stack:
- React 19
- Vite build tool
- Redux Toolkit for state management
- Tailwind CSS
Existing Scripts (Already Available):
npm run dev - Vite dev server with HMR ✅
npm run build - Production build ✅
npm run preview - Preview production build ✅
Status: Frontend scripts are already configured properly.
5.3 Root-Level Development Scripts
Required Scripts (in root package.json):
npm run dev - Start both frontend and backend concurrently
npm run dev:backend - Start only backend services
npm run dev:frontend - Start only frontend
npm run dev:worker - Start only the analysis worker
npm run setup - Install all dependencies and initialize databases
Implementation:
Create a root-level package.json with workspace configuration or use concurrently to orchestrate services.
6. Environment Configuration
6.1 Prerequisites Documentation
Create a DEVELOPMENT.md file documenting:
- Required software versions:
- Node.js (v18+)
- Redis (v7+)
- PostgreSQL (v14+)
- MongoDB (v6+)
- Installation instructions for each platform (macOS, Linux, Windows)
- Environment variable setup guide
6.2 Environment Files
- Provide
.env.example files for both backend and root
- Document all required environment variables
- Include sensible defaults for local development
7. Database Setup
7.1 PostgreSQL (Prisma)
- Scripts to create local database
- Automatic migration on first run
- Seed script with sample data
7.2 MongoDB
- Connection string configuration
- Optional: Local MongoDB setup guide or MongoDB Atlas free tier
7.3 Redis
- Local Redis server or Redis Cloud free tier
- Connection configuration
- Health check before starting services
8. Implementation Plan
Phase 1: Backend Scripts (Priority: High)
Phase 2: Root-Level Orchestration (Priority: High)
Phase 3: Documentation (Priority: Medium)
Phase 4: Developer Experience Enhancements (Priority: Low)
9. Acceptance Criteria
✅ Must Have:
🎯 Should Have:
🌟 Nice to Have:
10. Technical Considerations
10.1 Port Configuration
- Backend:
3000 (configurable via env)
- Frontend:
5173 (Vite default, configurable)
- Worker: No port (background process)
10.2 Cross-Platform Compatibility
- Scripts must work on macOS, Linux, and Windows
- Use cross-platform tools (
cross-env, concurrently)
- Document platform-specific quirks
10.3 Backward Compatibility
- Docker Compose workflow must remain fully functional
- No breaking changes to existing environment variables
- CI/CD pipelines should not be affected
11. Risks & Mitigations
| Risk |
Impact |
Mitigation |
| Database connection issues |
High |
Add connection health checks and clear error messages |
| Redis not running locally |
High |
Document Redis installation; provide fallback queue mechanism |
| Port conflicts |
Medium |
Make all ports configurable via environment variables |
| Platform-specific issues |
Medium |
Test on macOS, Linux, Windows; document known issues |
| Dependency version mismatches |
Low |
Lock versions in package.json; provide version checks |
12. Out of Scope
The following are explicitly NOT part of this feature:
- ❌ Replacing Docker Compose for production deployments
- ❌ Creating a GUI for managing development environment
- ❌ Auto-installation of system dependencies (PostgreSQL, Redis, etc.)
- ❌ Integration with other IDEs beyond VS Code
- ❌ Performance optimizations for Docker-based development
13. References
14. Timeline
Estimated Effort: 8-12 hours
Proposed Timeline:
- Phase 1 (Backend Scripts): 3-4 hours
- Phase 2 (Root Orchestration): 2-3 hours
- Phase 3 (Documentation): 2-3 hours
- Phase 4 (Enhancements): 1-2 hours
Target Completion: Within 1 sprint
15. Questions & Decisions Needed
Created by: @yb175
Last Updated: 2026-02-26
📋 Product Requirements Document (PRD)
1. Overview
Feature: Development Mode Scripts for PullShark AI
Priority: High
Status: Open
Owner: TBD
2. Problem Statement
Currently, PullShark AI can only be run using Docker Compose, which has several limitations for active development:
3. Goals & Success Metrics
Goals
Success Metrics
4. User Stories
As a backend developer,
I want to run the Express server locally with auto-restart on file changes,
So that I can iterate quickly without rebuilding Docker images.
As a frontend developer,
I want to run the Vite dev server with hot module replacement,
So that I can see my UI changes instantly in the browser.
As a full-stack developer,
I want to run both frontend and backend concurrently with a single command,
So that I can develop features that span the entire stack efficiently.
As a new contributor,
I want clear documentation on setting up the local development environment,
So that I can start contributing code within 15 minutes.
5. Technical Scope
5.1 Backend Development Scripts
Technology Stack:
Required Scripts:
npm run dev- Start backend server with hot-reload using tsx/nodemonnpm run worker:dev- Start BullMQ worker with auto-restartnpm run db:migrate- Run Prisma migrationsnpm run db:seed- Seed database with test datanpm run db:studio- Open Prisma Studio for database inspectionDependencies to Add:
nodemonortsx --watchfor auto-restartconcurrentlyfor running multiple processes5.2 Frontend Development Scripts
Technology Stack:
Existing Scripts (Already Available):
npm run dev- Vite dev server with HMR ✅npm run build- Production build ✅npm run preview- Preview production build ✅Status: Frontend scripts are already configured properly.
5.3 Root-Level Development Scripts
Required Scripts (in root package.json):
npm run dev- Start both frontend and backend concurrentlynpm run dev:backend- Start only backend servicesnpm run dev:frontend- Start only frontendnpm run dev:worker- Start only the analysis workernpm run setup- Install all dependencies and initialize databasesImplementation:
Create a root-level
package.jsonwith workspace configuration or useconcurrentlyto orchestrate services.6. Environment Configuration
6.1 Prerequisites Documentation
Create a
DEVELOPMENT.mdfile documenting:6.2 Environment Files
.env.examplefiles for both backend and root7. Database Setup
7.1 PostgreSQL (Prisma)
7.2 MongoDB
7.3 Redis
8. Implementation Plan
Phase 1: Backend Scripts (Priority: High)
tsxornodemonto backend devDependenciesbackend/package.jsonscripts:dev: Start server with hot-reloadworker:dev: Start worker with hot-reloaddb:migrate: Run Prisma migrationsdb:seed: Seed databasePhase 2: Root-Level Orchestration (Priority: High)
package.jsonwith workspacesconcurrentlydependencydev: Run frontend + backend + workerdev:backend: Backend onlydev:frontend: Frontend onlyPhase 3: Documentation (Priority: Medium)
DEVELOPMENT.mdwith:README.mdwith development section.env.examplefilesPhase 4: Developer Experience Enhancements (Priority: Low)
9. Acceptance Criteria
✅ Must Have:
npm run devand auto-restarts on file changesnpm run devwith HMRnpm run worker:devnpm run devfrom root) starts entire stackDEVELOPMENT.mdclearly documents setup process.env.example🎯 Should Have:
🌟 Nice to Have:
10. Technical Considerations
10.1 Port Configuration
3000(configurable via env)5173(Vite default, configurable)10.2 Cross-Platform Compatibility
cross-env,concurrently)10.3 Backward Compatibility
11. Risks & Mitigations
12. Out of Scope
The following are explicitly NOT part of this feature:
13. References
14. Timeline
Estimated Effort: 8-12 hours
Proposed Timeline:
Target Completion: Within 1 sprint
15. Questions & Decisions Needed
tsx --watchornodemonfor backend hot-reload?Created by: @yb175
Last Updated: 2026-02-26