```yaml execution_state: done: [] done_reviews: [] currently_doing: task_id: "TASK-000" execution_prompt: | PROJECT SETUP: --------------- 1. Create a new directory named "reposcope" (or a similar project name) for our application. 2. Initialize a new git repository in "reposcope". 3. Ensure you have Node.js (v16 or higher) and npm (v7 or higher) installed. 4. Navigate into the "reposcope" directory and run `npm init -y` to generate a basic package.json. DEPENDENCIES: ------------- - Core Dependencies (exact versions can be adjusted as needed): * "express": "^4.18.2" # For backend server * "cors": "^2.8.5" # For handling cross-origin requests * "octokit": "^2.0.0" # GitHub API interactions * "openai": "^3.2.1" # AI integration (optional usage) * "react": "^18.2.0" # Frontend framework * "react-dom": "^18.2.0" # Required for React - Dev Dependencies: * "typescript": "^4.9.5" # Type safety * "ts-node": "^10.9.1" # TypeScript execution * "nodemon": "^2.0.20" # Auto-reload for development * "eslint": "^8.30.0" # Linting * "jest": "^29.4.0" # Testing * "react-scripts": "^5.0.1" # Bundling and dev server for React - Peer or Optional Dependencies: * "redux" / "redux-toolkit": "^1.8.5" # For state management if needed * "dotenv": "^16.0.3" # Environment variables management CONFIGURATION FILES: -------------------- 1. package.json: - Scripts: * "dev:backend": "nodemon --watch ./src/server --exec ts-node ./src/server/index.ts" * "dev:frontend": "react-scripts start" * "build:frontend": "react-scripts build" * "test": "jest" * "lint": "eslint . --ext .ts,.tsx" - Add relevant dependencies and devDependencies as above. 2. tsconfig.json (placed at project root): { "compilerOptions": { "target": "ES2020", "module": "commonjs", "rootDir": "./src", "outDir": "./dist", "strict": true, "esModuleInterop": true }, "include": ["src/**/*"], "exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts"] } 3. .eslintrc.js or .eslintrc.json: - Extend recommended TypeScript and React linting rules. - Include a few custom rules as desired. 4. jest.config.js: - Configure Jest to look for test files in the "tests" or "src" directory. - Set up coverage thresholds if desired. 5. .env.example: - GITHUB_TOKEN="" - OPENAI_API_KEY="" - Other environment variables as needed. DEVELOPMENT ENVIRONMENT: ------------------------ - Node.js version: >=16 - npm version: >=7 - Recommended IDE: VSCode (with ESLint and Prettier plugins) - Docker (optional) for containerization if needed later BUILD & RUN INSTRUCTIONS: ------------------------- 1. Install dependencies: $ npm install 2. Start the backend in development mode: $ npm run dev:backend 3. In another terminal, start the frontend (React): $ npm run dev:frontend 4. Access the frontend at http://localhost:3000 (default React port). The backend will run on a separate port (commonly 4000 or 5000), configurable in your server setup. CONTEXT: -------- RepoScope 🔎 aims to provide an interactive, AI-ready analysis of GitHub repositories. Before any specific feature development begins (such as the RepositoryDataService, AIAnalysisService, etc.), we need a robust project skeleton. This ensures we have a consistent environment, configurations, and scripts to build, run, and test the codebase. TECHNICAL REQUIREMENTS: ----------------------- - TypeScript for both backend (Node.js) and frontend (React). - Strict linting and code quality checks to maintain a clean codebase. - Basic testing infrastructure (Jest) to cover upcoming features. - Containerization potential using Docker, if we want consistent dev/prod parity. - Project structure that separates backend (e.g., `src/server`) from frontend (e.g., `src/client`). - All environment-specific configuration must use .env files or environment variables. IMPLEMENTATION SPECIFICATIONS: ------------------------------ 1. Create `src/server` for backend code and `src/client` for React code. 2. Setup `index.ts` in `src/server` to initialize Express server. 3. For the frontend, use the React Scripts structure: - `src/client/index.tsx` as the main entry for React. 4. Integrate linting and test coverage: - ESLint should run on commit or as part of CI. - Jest tests should be placed in `__tests__` or adjacent `.test.ts/.spec.ts` files. QUALITY REQUIREMENTS: --------------------- - Code must pass ESLint checks (no major warnings). - Basic unit tests must run successfully (placeholder tests are fine at this stage). - Project must build without errors on both backend and frontend. EXPECTED OUTPUT: ---------------- - A fully initialized repository with: * package.json containing scripts and dependencies * TypeScript configurations * ESLint, Jest, and environment files * Basic Express server scaffold * Basic React application scaffold - The ability to run “npm run dev:backend” and “npm run dev:frontend” successfully. ACCEPTANCE CRITERIA: -------------------- - The repository can be cloned on a fresh environment, dependencies installed, and dev servers (backend & frontend) can be started without errors. - ESLint produces no error-level issues. - Jest is installed and can run a simple placeholder test successfully. - Proper separation of concerns between backend and frontend directories. pending_review: task_id: "TASK-000" review_prompt: | CONTEXT: -------- This review is for the initial project setup (TASK-000) which establishes our React + Node.js/Express + TypeScript environment, linting, testing, and standard build scripts. It ensures we have a stable foundation for all subsequent tasks. REVIEW CRITERIA: ---------------- 1. Code Quality & Linting: - Check if ESLint is configured properly. - Verify the directory structure is consistent with the plan. 2. Testing Setup: - Confirm Jest is installed and a basic test runs successfully. 3. Configuration Files: - Ensure TypeScript config, environment variables, and package scripts match the prompt. 4. Build & Run Verification: - Ensure "npm run dev:backend" and "npm run dev:frontend" spin up services without issues. 5. Documentation: - Confirm that README or inline docs mention how to install and run the project. EXPECTED REVIEW OUTPUT: ----------------------- - Approval Status: e.g. "APPROVED" or "REQUEST_CHANGES" - Code Quality Score (1-5) - Identified Issues: A bullet-point list of any errors or potential improvements - Suggestions for Improvement: A bullet-point list of recommendations - Final Verdict: Summarize whether the setup is ready to proceed. ACCEPTANCE CRITERIA: -------------------- - Linting passes with zero errors. - Basic test suite runs with no failures. - Directory structure and config files are properly set. - Dev servers run without crashes. ```