codeflash-internal/js
Kevin Turcios 5dca735fc8
Upgrade Next.js 14 → 16, React 18 → 19, and dependencies (#2385)
## Summary
- Upgrade Next.js 14.2 → 16.1, React 18 → 19, React DOM 18 → 19
- Upgrade @sentry/nextjs 9 → 10, @auth0/nextjs-auth0 3 → 4, ESLint 8 → 9
- Migrate all async request APIs (cookies, params, searchParams are now
Promises)
- Migrate middleware.ts → proxy.ts (Next.js 16 convention)
- Rewrite ESLint config for flat config format
- New Auth0Client setup with backward-compatible AUTH0_DOMAIN derivation
- Turbopack browser-only resolveAlias for web-tree-sitter Node.js stubs

## Test plan
- [ ] `npm run build` passes
- [ ] `npm run lint` passes (0 errors, warnings only from React Compiler
rules)
- [ ] `npm run type-check` passes
- [ ] `npm run dev` starts successfully with Turbopack
- [ ] Auth login/logout flow works end-to-end
- [ ] Verify `AUTH0_DOMAIN` or `AUTH0_ISSUER_BASE_URL` env var is set in
deployment
2026-04-02 22:38:01 -05:00
..
cf-api make healthcheck public in cfapi 2026-03-29 09:09:48 +02:00
cf-webapp Upgrade Next.js 14 → 16, React 18 → 19, and dependencies (#2385) 2026-04-02 22:38:01 -05:00
common fix: display instrumented perf tests in observability timeline (#2381) 2026-02-08 03:21:57 -05:00
VSC-Extension feat: Add Line Profiler visualization to webapp (#2268) 2026-01-28 08:36:54 -08:00
CLAUDE.md docs: restructure CLAUDE.md files into modular rules 2026-02-14 19:36:21 -05:00
README.md fix for ignoring test files from deployment (#1521) 2025-05-09 14:53:28 -04:00

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

  1. Always build the common package after making changes
  2. Keep shared logic in the common package
  3. Use TypeScript for type safety
  4. Follow existing code structure
  5. Never commit sensitive data or build artifacts

Publishing common Package

# Publish common package to npm
cd common
npm run build
npm publish