How rohit-1301/pdf-merger works
The primary product is a GraphQL API skeleton for file management, sharing, authentication, and media processing. Its main workflow is a client request entering the HTTP or WebSocket gateway, using the assembled schema and registered resolvers, and returning a query, mutation, or subscription result. Most resolvers are mocks or TODOs, not a connected storage or media-processing backend. The repository also contains separate Python distributed-systems experiments; their relationships are shown only where sampled source supports them.
Main entry points: index.ts Resolver registry · schemaLoader.ts Schema assembly · replica_node.py Replica nodes · pdf_client.py PDF RPC client
Components 21
GraphQL gateway
- HTTP and WS server
src/index.ts - Schema assembly
src/graphql/schemaLoader.ts - GraphQL type definitions
src/graphql/schema - Resolver registry
src/graphql/resolvers/index.ts
API capabilities
- Authentication
src/graphql/resolvers/mutations - File and folder operations
src/graphql/resolvers/mutations - File and account queries
src/graphql/resolvers/queries - Sharing and permissions
src/graphql/resolvers/mutations - Media processing
src/graphql/resolvers/mutations - Progress subscriptions
src/graphql/resolvers/subscriptions - Event pub-sub
src/graphql/resolvers/pubsub.ts
Distributed experiments
- PDF RPC client
pdf_client.py - PDF service
pdf_server.py - Lamport clock
lamport_clock.py - Lock manager
lock_manager.py - Lock clients
worker.py - Request load balancer
dc_lab_exp6/load_balancer.py - Request workers
dc_lab_exp6/worker_server.py
Replication experiment
- Replica test client
dc_lab_exp7/replica_client.py - Replica nodes
dc_lab_exp7/replica_node.py
Other components
- API client
Connections 17
- API client → HTTP and WS server: sends requests
- HTTP and WS server → Schema assembly: serves schema
src/index.ts - Schema assembly → GraphQL type definitions: merges definitions
- Schema assembly → Resolver registry: uses resolvers
src/graphql/schemaLoader.ts - Resolver registry → Authentication: registers mutations
src/graphql/resolvers/index.ts - Resolver registry → File and folder operations: registers operations
src/graphql/resolvers/index.ts - Resolver registry → File and account queries: registers queries
src/graphql/resolvers/index.ts - Resolver registry → Sharing and permissions: registers mutations
src/graphql/resolvers/index.ts - Resolver registry → Media processing: registers mutations
src/graphql/resolvers/index.ts - Resolver registry → Progress subscriptions: registers subscriptions
src/graphql/resolvers/index.ts - Progress subscriptions → Event pub-sub: uses event source
src/graphql/resolvers/subscriptions/processingProgress.ts - PDF RPC client → Lamport clock: updates clock
pdf_client.py - PDF RPC client → PDF service: calls RPCs
- Lock clients → Lock manager: requests locks
worker.py - Request load balancer → Request workers: routes requests
- Replica test client → Replica nodes: reads and writes
dc_lab_exp7/replica_client.py - Replica nodes → Replica nodes: gossips updates
dc_lab_exp7/replica_node.py