### **PR Type** - Bug fix ___ ### **Description** - Exclude new '*.test.ts' pattern in tsconfig. - Prevent test files from compiling. - Ensure deployment ignores test files. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>tsconfig.json`</strong><dd><code>Update exclusion array for test files</code> </dd></summary> <hr> `js/cf-api/tsconfig.json` <li>Added "*.test.ts" to exclusion list.<br> <li> Refined test file exclusion patterns. </details> </td> <td><a href=""></a></td> </tr> </table></td></tr><tr><td><strong>Additional files</strong></td><td><table> <tr> <td><strong>tsconfig.json</strong></td> <td><a href="https://github.com/codeflash-ai/codeflash-internal/pull/1521/files#diff-3532a852c82c88daeed6b57a35cd52c4a2589c909edc756613d67e280ab9b23e">+1/-1</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details>
1.9 KiB
1.9 KiB
CodeFlash AI
Overview
CodeFlash AI is a JavaScript/TypeScript monorepo that provides a scalable and modular architecture for web applications, focusing on efficient code sharing and robust development practices.
Project Structure
js/
├── common/ # Shared code and database schema
├── cf-api/ # Backend API service
└── cf-webapp/ # Next.js web application
Prerequisites
- Node.js (v18+ recommended)
- npm (v9+)
- Prisma CLI
Setup
1. Clone the Repository
git clone https://github.com/your-org/codeflash-ai.git
cd codeflash-ai/js
2. Install Dependencies
# Install root and project dependencies
npm install
cd common && npm install
cd ../cf-api && npm install
cd ../cf-webapp && npm install
3. Database Configuration
# Generate Prisma client and run migrations
cd common
npx prisma generate
npx prisma migrate dev
Development Workflow
Start Development Servers
# Start API server
cd cf-api
For local development, developers would use `npm run dev`
For production (Azure), the system would use `npm run start`
# Start web application
cd cf-webapp
npm run dev
Build Common Package
cd common
npm run build
Key Components
Common Package (@codeflash-ai/common)
- Shared TypeScript utilities
- Prisma database schema
- Reusable functions across projects
Installation in Other Projects
npm install @codeflash-ai/common
Usage Example
import { createOrUpdateUser } from "@codeflash-ai/common"
Best Practices
- Always build the common package after making changes
- Keep shared logic in the
commonpackage - Use TypeScript for type safety
- Follow existing code structure
- Never commit sensitive data or build artifacts
Publishing common Package
# Publish common package to npm
cd common
npm run build
npm publish