Skip to content

ujaRHR/quickcut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickCut

A feature-rich URL shortener with secure user authentication, advanced analytics, and time-to-live functionality. QuickCut is more than just a simple link shortener. It provides a comprehensive API to create, manage, and track their shortened URLs. With secure user accounts, detailed real-time analytics, and the ability to set expiration times, QuickCut gives you complete control over your links.

🔗 Short Code Generation Flow

graph TD
    A[Request to generate Short Code] --> B{Generate Short Code}
    B --> C[Get Next Sequence Counter Name]
    C --> D[MongoDB Counter Collection]
    D -- Increments seq by 1 --> E{Return Unique Sequence Value}
    E --> F[Scramble Value using Multiplier and Total Codes]
    F --> G[Encode Base62]
    G --> H[Pad with a to Code Length]
    H --> I[Return Final Short Code]
    I --> J[New Short URL Created]

    style A fill:#D9E8F5,stroke:#336699,stroke-width:2px
    style B fill:#C3E6CB,stroke:#28A745,stroke-width:2px
    style C fill:#FFE0B2,stroke:#FF9800,stroke-width:2px
    style D fill:#FFFDE7,stroke:#FFEB3B,stroke-width:2px
    style E fill:#E1F5FE,stroke:#2196F3,stroke-width:2px
    style F fill:#F0F4C3,stroke:#8BC34A,stroke-width:2px
    style G fill:#E3F2FD,stroke:#90CAF9,stroke-width:2px
    style H fill:#E8F5E9,stroke:#4CAF50,stroke-width:2px
    style I fill:#DCEDC8,stroke:#689F38,stroke-width:2px
    style J fill:#BBDEFB,stroke:#42A5F5,stroke-width:2px
Loading

Prerequisites

  • Node.js: The runtime environment for the backend.
  • pnpm: A package manager for installing dependencies.
  • MongoDB: The database used to store application data. A local instance or a cloud service, such as MongoDB Atlas, will work.

Technologies

  • Frontend: None yet, use any modern JavaScript framework.
  • Backend: Node.js with Koa.js
  • Database: MongoDB for storing link and user data.
  • Authentication: JSON Web Tokens (JWT) for secure user sessions.

Contributing

QuickCut is an open-source project. Contributions are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature (git checkout -b feature/NewFeature).
  3. Commit your changes (git commit -m 'Add some NewFeature').
  4. Push to the branch (git push origin feature/NewFeature).
  5. Then, Open a Pull Request.