A Turborepo-based monorepo housing the complete Arda fintech platform ecosystem.
Arda is a comprehensive fintech platform that connects institutional investors with loan originators, facilitating investment opportunities and secure document management through a suite of integrated applications.
This monorepo contains three main applications that work together to provide a complete investment platform experience:
Central authentication and company management portal - Port 3002
The gateway to the Arda ecosystem. Handles:
- Passwordless magic link authentication
- Company creation and management (originators & investors)
- Team member invitations and role-based access
- Routing users to appropriate applications with secure token handoff
Key Features:
- Magic link email authentication (15-minute expiration)
- Dual company types: Originator (deal creators) and Investor (deal reviewers)
- Seamless SSO across all Arda applications
- Invitation-based team member onboarding
Investor-originator matching and investment platform - Port 3000
Connects institutional investors with loan originators for investment opportunities. Features:
- AI-powered deal matching algorithm with scoring
- Investment portfolio lifecycle management
- Real-time market insights and analytics
- Secure payment processing with crypto wallet integration
- Deal status workflow (available → locked → due diligence → active → completed)
View Credit App Documentation →
Document negotiation and management platform - Port 3001
Structured document negotiation workflow between originators and investors. Features:
- Document version control and change tracking
- AI-powered change detection and risk assessment
- Multi-party collaboration with comments and status updates
- Role-based access control (Admin/Write/Read)
- KYB (Know Your Business) verification workflow
@repo/ui: Shared React component library@repo/eslint-config: ESLint configurations (base, Next.js, React)@repo/typescript-config: TypeScript configurations for all apps
- Frontend: React 18 + TypeScript
- Build Tool: Vite with SWC (fast compilation)
- UI Framework: shadcn/ui + Radix UI primitives
- Styling: Tailwind CSS with custom design tokens
- State Management: TanStack React Query
- Routing: React Router DOM v6
- Form Handling: React Hook Form + Zod validation
- Icons: Lucide React
- Monorepo: Turborepo v2.5.8
- Package Manager: pnpm v9.0.0
┌─────────────────────┐
│ Platform (3002) │
│ Authentication Hub │
└──────────┬──────────┘
│
┌──────────┴──────────┐
│ Magic Link Auth │
│ Company Setup │
│ JWT Token Issue │
└──────────┬──────────┘
│
┌────────────────┴────────────────┐
│ │
┌─────────▼─────────┐ ┌─────────▼─────────┐
│ Credit App (3000)│ │ IDR (3001) │
│ Deal Matching │ │ Document Mgmt │
│ Investments │ │ Negotiations │
└───────────────────┘ └───────────────────┘
- Node.js: >=18
- pnpm: v9.0.0 (package manager)
- Backend API: Separate backend repository running (required for all apps)
# Clone the repository
git clone <repository-url>
cd arda-platform
# Install dependencies for all workspaces
pnpm installEach application requires environment variables. Copy the example files:
# Platform app
cp apps/platform/.env.example apps/platform/.env
# Credit app
cp apps/credit-app/.env.example apps/credit-app/.env
# IDR app
cp apps/idr/.env.example apps/idr/.envUpdate the .env files with your configuration:
VITE_SERVER_URL: Backend API endpoint (empty string in production for relative paths)VITE_CHAT_AGENT_URL: Chat agent endpoint (empty string in production for relative paths)VITE_CREDIT_APP_URL: Credit App URL (for Platform redirects)VITE_IDR_URL: IDR URL (for Platform redirects)
📖 Important: See URL Configuration Guide for detailed information about our unified URL pattern, including:
- How empty URLs enable relative paths in production
- Vite proxy configuration for development and production
- Deployment configurations for Docker, Kubernetes, and cloud platforms
- Troubleshooting mixed content errors
# Start all apps in parallel
pnpm devThis will start:
- Platform on http://localhost:3002
- Credit App on http://localhost:3000
- IDR on http://localhost:3001
# Platform (authentication)
pnpm --filter=@arda/platform dev
# Credit App (investment platform)
pnpm --filter=@arda/credit-app dev
# IDR (document management)
pnpm --filter=@arda/idr devcd apps/platform
npm run dev# Build all applications
pnpm build
# Build specific app
pnpm --filter=@arda/credit-app build
turbo build --filter=@arda/credit-apppnpm dev # Run all apps
pnpm --filter=@arda/platform dev # Run specific app
turbo dev # Run all with Turbopnpm build # Build all
turbo build --filter=@arda/credit-app # Build specificpnpm lint # Lint all
pnpm check-types # Type-check all
pnpm format # Format all filesturbo build # Build all with caching
turbo dev --filter=@arda/* # Run all apps only
turbo lint --filter=@repo/* # Lint packages only- User enters email at
http://localhost:3002/login - Receives magic link via email
- Clicks link to verify email
- Creates company profile or accepts invitation
- User selects Credit App or IDR based on needs
- Platform issues JWT token
- User is redirected with token to selected app
- Credit App: Browse deals, lock investments, manage portfolio
- IDR: Upload documents, review changes, negotiate terms
- Users can switch between apps
- Token is valid across all applications
- No re-authentication needed
arda-platform/
├── apps/
│ ├── platform/ # Authentication portal (React + Vite)
│ ├── credit-app/ # Investment platform (React + Vite)
│ └── idr/ # Document management (React + Vite)
├── packages/
│ ├── ui/ # Shared components
│ ├── eslint-config/ # Shared ESLint configs
│ └── typescript-config/ # Shared TS configs
├── package.json # Root package with workspace scripts
├── turbo.json # Turborepo pipeline config
├── pnpm-workspace.yaml # pnpm workspace config
└── CLAUDE.md # Developer guidance for AI assistants
- Platform (
/login) → User enters email - Backend → Sends magic link to email
- Platform (
/verify?token=xxx) → Validates token - Platform (
/onboarding) → Company setup - Platform → Issues JWT token
- Credit App/IDR → Receives token, validates with backend
- App → User is authenticated and can use features
- Creates and manages investment deals
- Uploads loan documentation to IDR
- Uses Credit App to attract investors
- Tracks active investments and payments
- Browses available deals on Credit App
- Reviews documents in IDR
- Locks deals for due diligence
- Manages investment portfolio
- Determine which app the feature belongs to
- Add types to
src/types/index.ts - Create API functions in
src/lib/api.ts - Build UI components in
src/components/ - Add routes if needed
- Use React Query for data fetching
- Use React Hook Form + Zod for forms
- TypeScript strict mode is disabled (be careful with types)
- Use Tailwind CSS for styling
- Follow shadcn/ui component patterns
- Use path alias
@/*for imports - Keep components small and focused
- Build outputs are cached automatically
- Dev servers run without caching
- Use filters to run tasks on specific apps
- Remote caching available via Vercel
Credit App includes Docker support:
cd apps/credit-app
# Build Docker image
npm run docker:build
# Run with Docker Compose
npm run docker:up
# View logs
npm run docker:logs
# Stop containers
npm run docker:downThis monorepo uses git subtrees for Credit App and IDR:
- Credit App and IDR were merged from separate repositories
- Platform was created directly in the monorepo
- Each app maintains independent git history
- Coordinate changes across apps when needed
If ports are in use:
- Platform: Change port in
apps/platform/vite.config.ts - Credit App: Change port in
apps/credit-app/vite.config.ts - IDR: Change port in
apps/idr/vite.config.ts
# Clear node_modules and reinstall
rm -rf node_modules apps/*/node_modules packages/*/node_modules
pnpm install# Clear Turbo cache
rm -rf .turbo apps/*/.turbo
turbo build --forceAll apps require the backend API to be running:
- Check
VITE_API_URLin.envfiles - Ensure backend is accessible
- Check CORS configuration on backend
- Create a feature branch
- Make your changes
- Run linting:
pnpm lint - Run type checking:
pnpm check-types - Test all affected apps
- Submit a pull request
[Your License Here]
For issues and questions:
- Platform App: See
apps/platform/README.md - Credit App: See
apps/credit-app/README.md - IDR: See
apps/idr/README.md - Developer Guide: See
CLAUDE.md