Files
url_tracker_tool/README_v2.md
Andrei 956f1aeadb feat(phase-0): setup Docker Compose with TypeScript monorepo structure
- Create monorepo structure with apps/ and packages/
- Add Docker Compose for api, web, db, redis, worker services
- Migrate existing Express.js logic to TypeScript with 100% backward compatibility
- Preserve all existing API endpoints (/api/track, /api/v1/track) with identical behavior
- Setup development environment with hot reload and proper networking
- Add comprehensive TypeScript configuration with path mapping
- Include production-ready Dockerfiles with multi-stage builds
- Maintain existing rate limiting (100 req/hour/IP) and response formats
- Add health checks and graceful shutdown handling
- Setup Turbo for efficient monorepo builds and development
2025-08-18 07:03:08 +00:00

2.6 KiB

Redirect Intelligence v2

A comprehensive URL redirect tracking and analysis platform built with Node.js, React, and PostgreSQL.

🚀 Quick Start

Prerequisites

  • Node.js 20+
  • Docker & Docker Compose
  • Git

Development Setup

  1. Clone and setup environment:

    git clone <your-repo-url>
    cd redirect-intelligence-v2
    cp .env.example .env
    
  2. Start development environment:

    npm run dev
    

    This will start all services:

  3. Access the application:

📋 Project Structure

├── apps/
│   ├── api/          # Express.js API server (TypeScript)
│   ├── web/          # React frontend (Chakra UI)
│   └── worker/       # BullMQ background worker
├── packages/
│   ├── database/     # Prisma schema & migrations
│   └── shared/       # Shared types & utilities
└── docker-compose.yml

🔄 Backward Compatibility

All existing API endpoints are preserved:

  • POST /api/track (legacy)
  • POST /api/v1/track
  • GET /api/v1/track

Rate limiting: 100 requests/hour per IP (unchanged)

🛠️ Development Commands

# Start all services
npm run dev

# Individual services
npm run dev:api
npm run dev:web

# Database operations
npm run db:migrate
npm run db:studio
npm run db:seed

# Build & test
npm run build
npm run test
npm run lint

📖 API Documentation

Visit http://localhost:3333/api/docs for interactive API documentation.

🔍 Current Status

Phase 0: Complete

  • Docker Compose setup
  • TypeScript migration
  • Monorepo structure
  • Backward compatibility preserved

Next: Phase 1 - PostgreSQL + Prisma + Authentication

🧪 Testing

Test the backward compatibility:

# Test legacy endpoint
curl -X POST http://localhost:3333/api/track \
  -H "Content-Type: application/json" \
  -d '{"url": "github.com"}'

# Test v1 endpoint
curl -X POST http://localhost:3333/api/v1/track \
  -H "Content-Type: application/json" \
  -d '{"url": "github.com", "method": "GET"}'

📚 Documentation

🤝 Contributing

See IMPLEMENTATION_PLAN.md for development phases and guidelines.