Skip to content

Commit 69139f6

Browse files
committed
docs: refine README files for clarity and consistency across Deepcrawl components
1 parent 9dacf07 commit 69139f6

11 files changed

Lines changed: 437 additions & 96 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# 🕷️ Deepcrawl
1+
# Deepcrawl
22

3-
**World-class web scraping and crawling service** built with modern technologies for enterprise-grade performance and reliability.
3+
Web scraping and crawling service built with modern technologies for enterprise-grade performance and reliability.
44

55
[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org)
66
[![Cloudflare Workers](https://img.shields.io/badge/Cloudflare-Workers-orange.svg)](https://workers.cloudflare.com/)
@@ -32,7 +32,7 @@ Deepcrawl is a comprehensive monorepo featuring:
3232

3333
### 📦 **Shared Packages**
3434

35-
- **🛠️ TypeScript SDK** (`packages/sdks/js-ts/`) - Universal client library with world-class error handling
35+
- **🛠️ TypeScript SDK** (`packages/sdks/js-ts/`) - Universal client library with comprehensive error handling
3636
- **🗄️ Database Packages** - Dual setup with PostgreSQL (auth) and Cloudflare D1 (data preservation)
3737
- **🎨 UI Components** (`@deepcrawl/ui`) - shadcn/ui component library
3838
- **📋 Types & Contracts** - Shared TypeScript definitions and API contracts

apps/app/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 📊 Deepcrawl Dashboard
22

3-
**Modern management interface** for the Deepcrawl service built with Next.js 15 and cutting-edge web technologies.
3+
Management interface for the Deepcrawl service built with Next.js 15 and modern web technologies.
44

55
[![Next.js](https://img.shields.io/badge/Next.js-15-black.svg)](https://nextjs.org/)
66
[![React](https://img.shields.io/badge/React-19-blue.svg)](https://reactjs.org/)
@@ -37,19 +37,19 @@ pnpm check
3737
- 🌍 **Universal SDK Integration** - Built-in Deepcrawl TypeScript SDK
3838

3939
### **Technical Stack**
40-
-**Next.js 15** - Latest App Router with React 19
41-
- 📊 **TanStack Query** - Powerful server state management
42-
- 🎨 **shadcn/ui + Tailwind** - Beautiful, accessible component library
43-
- 🛠️ **Turbopack** - Ultra-fast development builds
44-
- 🔄 **React Hook Form** - Performant form handling
45-
- 🎨 **Framer Motion** - Smooth animations and transitions
40+
-**Next.js 15** - App Router with React 19
41+
- 📊 **TanStack Query** - Server state management
42+
- 🎨 **shadcn/ui + Tailwind** - Component library
43+
- 🛠️ **Turbopack** - Development builds
44+
- 🔄 **React Hook Form** - Form handling
45+
- 🎨 **Framer Motion** - Animations and transitions
4646

4747
### **Developer Experience**
48-
- 🔥 **Hot Module Replacement** - Instant feedback during development
48+
- 🔥 **Hot Module Replacement** - Fast feedback during development
4949
- 📋 **TypeScript-First** - Full type safety across the application
5050
- 🧩 **Component Documentation** - Fumadocs integration for component docs
5151
- 🎨 **Design System** - Consistent UI patterns and theming
52-
- 🛠️ **Development Tools** - Built-in debugging and development utilities
52+
- 🛠️ **Development Tools** - Debugging and development utilities
5353

5454
## 🎨 UI Development
5555

apps/workers/auth/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 🔐 Deepcrawl Auth Worker
22

3-
**Enterprise-grade authentication service** powered by Better Auth and Cloudflare Workers.
3+
Authentication service powered by Better Auth and Cloudflare Workers.
44

55
[![Better Auth](https://img.shields.io/badge/Better_Auth-1.3-green.svg)](https://better-auth.com/)
66
[![Cloudflare Workers](https://img.shields.io/badge/Cloudflare-Workers-orange.svg)](https://workers.cloudflare.com/)
@@ -32,29 +32,29 @@ pnpm preview
3232
## ⚡ Features
3333

3434
### **Authentication Methods**
35-
- 🔐 **OAuth Providers** - GitHub, Google with seamless integration
35+
- 🔐 **OAuth Providers** - GitHub, Google integration
3636
- 🔑 **Passkeys** - WebAuthn passwordless authentication
37-
-**Magic Links** - Secure email-based login
37+
-**Magic Links** - Email-based login
3838
- 📧 **Email Verification** - Account verification flow
39-
- 🔄 **Password Reset** - Secure password recovery
39+
- 🔄 **Password Reset** - Password recovery
4040

4141
### **Session Management**
4242
- 🏢 **Multi-Session Support** - Up to 2 concurrent sessions per user
4343
- 🍪 **Cross-Domain Cookies** - Works across `deepcrawl.dev` subdomains
4444
- 🔐 **API Key Authentication** - Primary method for API access
45-
- 🍪 **Cookie Fallback** - Seamless dashboard authentication
45+
- 🍪 **Cookie Fallback** - Dashboard authentication
4646
- 🛡️ **Secure Headers** - CSRF protection and security headers
4747

4848
### **Email System**
4949
- 📨 **Universal Email Support** - Works in both Workers and Next.js
50-
- 🎨 **Beautiful HTML Templates** - Professional email designs
51-
- 📧 **Resend Integration** - Reliable email delivery
50+
- 🎨 **HTML Templates** - Email designs
51+
- 📧 **Resend Integration** - Email delivery
5252
- 👥 **Organization Invitations** - Team invitation system
5353

54-
### **Advanced Features**
54+
### **Additional Features**
5555
- 🔗 **Service Bindings** - Communication with main Deepcrawl worker
5656
- 🌍 **Environment Aware** - Development and production configurations
57-
- 📊 **Rate Limiting** - Built-in protection against abuse
57+
- 📊 **Rate Limiting** - Protection against abuse
5858

5959
## 🔧 Configuration
6060

apps/workers/v0/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# 🕷️ Deepcrawl API Worker
1+
# Deepcrawl API Worker
22

3-
**High-performance web scraping and reading APIs** powered by Cloudflare Workers with enterprise-grade features.
3+
Web scraping and reading APIs powered by Cloudflare Workers with enterprise-grade features.
44

55
[![Cloudflare Workers](https://img.shields.io/badge/Cloudflare-Workers-orange.svg)](https://workers.cloudflare.com/)
66
[![Hono.js](https://img.shields.io/badge/Hono.js-Framework-blue.svg)](https://hono.dev/)
@@ -36,26 +36,26 @@ pnpm preview
3636

3737
### **Core Capabilities**
3838

39-
- 🌐 **Advanced Web Scraping** - Puppeteer + Cheerio for comprehensive content extraction
40-
- 🧹 **Content Sanitization** - Professional HTML cleaning and markdown conversion
41-
- 🔗 **Smart Link Processing** - Link extraction, normalization, and relationship mapping
42-
- 📊 **Rich Metadata** - Comprehensive page metadata extraction
43-
- 🤖 **AI Integration** - Cloudflare AI binding for intelligent content processing
39+
- 🌐 **Web Scraping** - Puppeteer + Cheerio for content extraction
40+
- 🧹 **Content Sanitization** - HTML cleaning and markdown conversion
41+
- 🔗 **Link Processing** - Link extraction, normalization, and relationship mapping
42+
- 📊 **Metadata Extraction** - Page metadata extraction
4443

4544
### **API Architecture**
4645

4746
- 🎯 **Dual API System** - Both oRPC (type-safe RPC) and OpenAPI/REST endpoints
48-
-**High Performance** - Smart placement and caching with Cloudflare KV
49-
- 🔐 **Robust Authentication** - API key and cookie-based auth with rate limiting
50-
- 📚 **Auto-Generated Docs** - OpenAPI documentation at `/docs`
47+
-**Performance** - Smart placement and caching with Cloudflare KV
48+
- 🔐 **Authentication** - API key and cookie-based auth with rate limiting
49+
- 📚 **Documentation** - OpenAPI documentation at `/docs`
5150

5251
### **Service Architecture**
5352

5453
- `ScrapeService` - Web scraping with Puppeteer and Cheerio
5554
- `HTMLCleaningService` - Content sanitization and processing
56-
- `MetadataService` - Extract comprehensive page metadata
55+
- `MetadataService` - Page metadata extraction
5756
- `LinkService` - Link extraction and normalization
58-
- `CacheService` - Intelligent caching with Cloudflare KV
57+
- `ActivityLoggerService` - Activity logging and tracking
58+
- Caching implemented via Cloudflare KV bindings
5959

6060
## 🌍 Production
6161

packages/auth/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Authentication package for Deepcrawl using Better Auth with email functionality
55
## Features
66

77
-**Multi-session support** - Users can be logged into multiple accounts simultaneously
8-
-**Email verification** - Beautiful HTML emails for email verification
9-
-**Password reset** - Secure password reset flow with styled emails
8+
-**Email verification** - HTML emails for email verification
9+
-**Password reset** - Password reset flow with styled emails
1010
-**Magic link authentication** - Passwordless login via email
1111
-**Organization invitations** - Team invitation emails
1212
-**Cross-domain cookies** - Works across deepcrawl.dev subdomains

packages/contracts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @deepcrawl/contracts
22

3-
**API contract definitions** for oRPC endpoints in the Deepcrawl ecosystem.
3+
API contract definitions for oRPC endpoints in the Deepcrawl ecosystem.
44

55
## Features
66

packages/db/db-auth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @deepcrawl/db-auth
22

3-
**Authentication database** package for Deepcrawl using PostgreSQL and Drizzle ORM.
3+
Authentication database package for Deepcrawl using PostgreSQL and Drizzle ORM.
44

55
## Features
66

packages/db/db-d1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @deepcrawl/db-d1
22

3-
**D1 database** package for Deepcrawl data preservation using Cloudflare D1 and Drizzle ORM.
3+
D1 database package for Deepcrawl data preservation using Cloudflare D1 and Drizzle ORM.
44

55
## Features
66

packages/sdks/js-ts/README.md

Lines changed: 48 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# 🕷️ Deepcrawl SDK
1+
# Deepcrawl SDK
22

3-
**World-class TypeScript SDK for the Deepcrawl API** - Professional web scraping and crawling with enterprise-grade error handling.
3+
TypeScript SDK for the Deepcrawl API - Web scraping and crawling with comprehensive error handling.
44

55
[![npm version](https://badge.fury.io/js/deepcrawl.svg)](https://www.npmjs.com/package/deepcrawl)
66
[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org)
77
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
88

99
## **Why Deepcrawl SDK?**
1010

11-
- 🏗️ **oRPC-Powered**: Built on industry-leading RPC framework for optimal performance
12-
- 🔒 **Type-Safe**: End-to-end TypeScript with intelligent error handling
11+
- 🏗️ **oRPC-Powered**: Built on oRPC framework for type-safe RPC
12+
- 🔒 **Type-Safe**: End-to-end TypeScript with error handling
1313
- 🖥️ **Server-Side Only**: Designed for Node.js, Cloudflare Workers, and Next.js Server Actions
1414
- 🪶 **Lightweight**: Minimal bundle size with tree-shaking support
15-
- 🛡️ **World-Class Error Handling**: Comprehensive, typed errors with actionable context
16-
- 🔄 **Smart Retry Logic**: Built-in exponential backoff for transient failures
17-
-**Connection Pooling**: Automatic HTTP connection reuse for optimal performance (Node.js)
15+
- 🛡️ **Error Handling**: Comprehensive, typed errors with context
16+
- 🔄 **Retry Logic**: Built-in exponential backoff for transient failures
17+
-**Connection Pooling**: Automatic HTTP connection reuse (Node.js)
1818

1919
## 📦 **Installation**
2020

@@ -54,7 +54,6 @@ const result = await deepcrawl.readUrl('https://example.com', {
5454
markdown: true, // Convert to markdown
5555
cleanedHtml: true, // Get sanitized HTML
5656
rawHtml: true, // Get original HTML
57-
screenshot: false, // Capture screenshot
5857
metricsOptions: { // Performance tracking
5958
enable: true
6059
}
@@ -67,7 +66,6 @@ interface ReadUrlResponse {
6766
markdown?: string;
6867
cleanedHtml?: string;
6968
rawHtml?: string;
70-
screenshot?: string;
7169
metadata?: {
7270
title?: string;
7371
description?: string;
@@ -141,38 +139,53 @@ interface ExtractLinksResponse {
141139
```
142140

143141
### **getManyLogs(options?)**
144-
Retrieve activity logs with type-safe filtering.
142+
Retrieve activity logs with paginated results and filtering by path, success status, and date range. Returns logs with full type safety through discriminated unions based on the endpoint path.
145143

146144
```typescript
147-
const logs = await deepcrawl.getManyLogs({
148-
userId: 'user123', // Filter by user
149-
url: 'https://example.com', // Filter by URL
150-
operation: 'getMarkdown', // Filter by operation
151-
status: 'success', // Filter by status
152-
limit: 50, // Pagination limit
153-
offset: 0 // Pagination offset
145+
const result = await deepcrawl.getManyLogs({
146+
limit: 50, // Max results (default: 20, max: 100)
147+
offset: 0, // Skip first N results (default: 0)
148+
path: 'read-getMarkdown', // Filter by endpoint path (optional)
149+
success: true, // Filter by success status (optional)
150+
startDate: '2025-01-01T00:00:00Z', // Filter from date (ISO 8601) (optional)
151+
endDate: '2025-12-31T23:59:59Z', // Filter to date (ISO 8601) (optional)
152+
orderBy: 'requestTimestamp', // Sort column (default: 'requestTimestamp')
153+
orderDir: 'desc' // Sort direction: 'asc' | 'desc' (default: 'desc')
154154
});
155155

156-
// Response type
157-
interface ActivityLog {
158-
id: string;
159-
userId: string;
160-
sessionId: string;
161-
url: string;
162-
operation: 'readUrl' | 'getMarkdown' | 'extractLinks';
163-
status: 'success' | 'error';
164-
errorType?: 'auth' | 'network' | 'read' | 'links' | 'unknown';
165-
errorMessage?: string;
166-
responseTime?: number;
167-
createdAt: string;
156+
// Response type with discriminated unions
157+
interface GetManyLogsResponse {
158+
logs: ActivityLogEntry[]; // Array of log entries with discriminated unions
159+
meta: {
160+
limit: number; // Effective limit applied
161+
offset: number; // Effective offset applied
162+
hasMore: boolean; // More logs available?
163+
nextOffset: number | null; // Next page offset (null if no more data)
164+
orderBy: string; // Column used for sorting
165+
orderDir: 'asc' | 'desc'; // Sort direction applied
166+
startDate?: string; // Normalized start date boundary
167+
endDate?: string; // Normalized end date boundary
168+
};
168169
}
170+
171+
// Each log entry uses discriminated union based on 'path' field:
172+
// - 'read-getMarkdown': response is string
173+
// - 'read-readUrl': response is ReadSuccessResponse | ReadErrorResponse
174+
// - 'links-getLinks': response is LinksSuccessResponse | LinksErrorResponse
175+
// - 'links-extractLinks': response is LinksSuccessResponse | LinksErrorResponse
169176
```
170177

171-
### **getOneLog(id)**
172-
Get a single activity log by ID.
178+
### **getOneLog(options)**
179+
180+
Get a single activity log entry by ID with full type safety through discriminated unions.
173181

174182
```typescript
175-
const log = await deepcrawl.getOneLog('log_abc123');
183+
const log = await deepcrawl.getOneLog({
184+
id: 'request-id-123' // Request ID (required)
185+
});
186+
187+
// Response is ActivityLogEntry with discriminated union
188+
// TypeScript automatically narrows types based on log.path
176189
```
177190

178191
## 🌟 **Real-World Usage Examples**
@@ -481,7 +494,7 @@ export function ActivityLogsClient() {
481494

482495
## 🛡️ **Error Handling Patterns**
483496

484-
Our SDK provides multiple patterns for different coding styles:
497+
The SDK provides multiple patterns for different coding styles:
485498

486499
### **Traditional Try/Catch**
487500
```typescript
@@ -573,7 +586,7 @@ const deepcrawl = new DeepcrawlApp({
573586

574587
### **Connection Pooling (Node.js Only)**
575588

576-
The SDK automatically uses HTTP connection pooling in Node.js environments for optimal performance:
589+
The SDK automatically uses HTTP connection pooling in Node.js environments:
577590

578591
```typescript
579592
// Automatic configuration (no action needed)
@@ -587,7 +600,7 @@ The SDK automatically uses HTTP connection pooling in Node.js environments for o
587600
```
588601

589602
Benefits:
590-
-**~40% faster** for concurrent requests
603+
-**Faster** for concurrent requests
591604
- 🔄 **Connection reuse** reduces handshake overhead
592605
- 🎯 **Auto-cleanup** of idle connections
593606
- 📊 **Optimized for batch operations**

0 commit comments

Comments
 (0)