How dvin1211/cut_link works
Cut Link is a URL-shortening application with a React client and Django REST API. Users authenticate, create short links with generated or custom aliases, manage their links, and follow redirects; click counts are buffered and periodically persisted, with daily statistics stored as well. The README documents the multi-backend deployment and Redis, RabbitMQ, PostgreSQL, and Celery roles. Several endpoint and page implementations were not sampled, so their internal call wiring is shown only where supported by the tree or documentation.
Main entry points: services.py Link services · client.ts API transport · pages App pages · CabinetPage.tsx Link cabinet
Components 25
Web client
- Route shell
frontend/src/App.tsx - App pages
frontend/src/pages - Link cabinet
frontend/src/pages/CabinetPage.tsx - Create form
frontend/src/components/LinkCreateForm.tsx - Link list
frontend/src/components/LinksList.tsx - API transport
frontend/src/api/client.ts
Identity
- Auth state
frontend/src/auth/AuthContext.tsx - Auth client
frontend/src/api/auth.ts - User endpoints
backend/users/urls.py - User handlers
backend/users/views.py - User records
backend/users/models.py
Link lifecycle
- Link endpoints
backend/links/urls.py - Link handlers
backend/links/views.py - Link services
backend/links/services.py - Link records
backend/links/models.py - Redirect cache
backend/links/cache_utils.py
Click analytics
- Click buffer
backend/links/click_buffer.py - Flush task
backend/links/tasks.py - Task schedule
backend/config/settings.py
Other components
- Visitor
- Browser
- PostgreSQL
- Redis
- RabbitMQ
- Destination URL
Connections 28
- Visitor → Browser: uses
- Browser → Route shell: opens
- Route shell → App pages: routes
- App pages → Auth state: uses auth
- App pages → Link cabinet: shows
- Link cabinet → Create form: creates links
- Link cabinet → Link list: manages links
- Auth state → Auth client: calls
- Auth client → API transport: requests
- Create form → API transport: submits
- Link list → API transport: requests
- API transport → User endpoints: HTTP requests
- API transport → Link endpoints: HTTP requests
- User endpoints → User handlers: dispatches
- User handlers → User records: reads/writes
- Link endpoints → Link handlers: dispatches
- Link handlers → Link services: delegates
- Link services → Link records: reads/writes
- Link services → Redirect cache: caches/invalidates
- Redirect cache → Redis: reads/writes
- Link services → Click buffer: records/flushes
- Click buffer → Redis: buffers clicks
- Link services → Link records: persists counts
- Link records → PostgreSQL: stores
- Task schedule → Flush task: schedules
- Flush task → Link services: calls flush
- Task schedule → RabbitMQ: configures broker
- Browser → Destination URL: follows short link