{"id":26256613,"url":"https://github.com/duquejo/nestjs-url-shortener-application","last_synced_at":"2026-04-22T18:32:12.540Z","repository":{"id":282150996,"uuid":"946299532","full_name":"duquejo/NestJS-URL-shortener-application","owner":"duquejo","description":"Design System Interview V1 (Book) practical hands-on use-case exercise.","archived":false,"fork":false,"pushed_at":"2025-03-28T04:36:10.000Z","size":424,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-28T06:11:08.930Z","etag":null,"topics":["cqrs","hexagonal-architecture","integration-testing","mysql","nestjs","redis","unittest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duquejo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-10T23:31:20.000Z","updated_at":"2025-03-28T04:38:12.000Z","dependencies_parsed_at":"2025-03-13T04:23:08.807Z","dependency_job_id":"0046a601-981a-4714-be3e-ced1fef6df45","html_url":"https://github.com/duquejo/NestJS-URL-shortener-application","commit_stats":null,"previous_names":["duquejo/nestjs-url-shortener-application"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/duquejo/NestJS-URL-shortener-application","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duquejo%2FNestJS-URL-shortener-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duquejo%2FNestJS-URL-shortener-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duquejo%2FNestJS-URL-shortener-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duquejo%2FNestJS-URL-shortener-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duquejo","download_url":"https://codeload.github.com/duquejo/NestJS-URL-shortener-application/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duquejo%2FNestJS-URL-shortener-application/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32149439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T17:06:48.269Z","status":"ssl_error","status_checked_at":"2026-04-22T17:06:19.037Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cqrs","hexagonal-architecture","integration-testing","mysql","nestjs","redis","unittest"],"created_at":"2025-03-13T20:18:40.986Z","updated_at":"2026-04-22T18:32:12.522Z","avatar_url":"https://github.com/duquejo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URL Shortener architectural-reliable POC\nDesign System Interview V1 (Book) practical hands-on use-case exercise.\n\nProposed architecture:\n![Architecture Diagram](./architecture-diagram.png)\n\n## Framework \u0026 Libraries\n__Main dependencies__\n- [Nest JS](https://github.com/nestjs/nest): framework TypeScript starter repository.\n  - @nestjs/cqrs: Provides CQRS Architecture pattern module.\n  - @nestjs/throttler: Provides retry and other resiliency strategies like Circuit breaker.\n  - @nestjs/typeorm \u0026 typeorm: Provides TypeORM capabilities, using diverse adapters like MySQL.\n  - class-transformer: Handles easily DTO/Class Entities transformation.\n  - class-validator: Enables DTO \u0026 Requests validation easily.\n- dotenv: Custom environment handling.\n- ioredis: Robust Redis client for Node.js.\n- joi: Provides a powerful type-safe schema validation.\n- mysql2: MySQL client for Node.js.\n- sqids: Small library for handling hash generation.\n\n__Development dependencies__\n- Jest: Preferred javascript testing library.\n- prettier: Format-ready code style rules \u0026 templates.\n- eslint \u0026 @eslint/eslintrc: Code quality library.\n- supertest: Assert-ready expressions for integration tests.\n- cross-env: simple windows/mac environment command platform support.\n- @commitlint/cli \u0026 @commitlint/config-conventional: Commitlint ready rules, enforcing best practice commit standards.\n- commitlint-config-gitmoji: Commitlint plugin for [visual commit-ready](https://gitmoji.dev/) guides.\n- husky: Enables hooks for commit-msg and pre-commit events, just for automation.\n\n## Project setup\n\n**Duplicate `.env.example` file and rename it as `.env.development` or the env that you need to configure.**\n\n**Fill all the mandatory environment variables:**\n\n```dotenv\nDATABASE_NAME='urls database name'\nDATABASE_HOST='urls database host'\nDATABASE_PORT='urls database port'\nDATABASE_USERNAME='urls database username'\nDATABASE_PASSWORD='urls database password'\nDATABASE_LOGGING_ENABLED='should the logging be enabled?'\n\nREDIS_HOST='redis cache host'\nREDIS_PORT='redis cache port'\n\nTHROTTLE_TTL='number of milliseconds that each request will last in storage'\nTHROTTLE_LIMIT='maximum number of requests within the TTL limit'\n\nURL_ENCODER_ALPHABET='encoder alphabet'\nURL_ENCODER_LENGTH='encoder url minimum length'\n\nPORT='application port'\n```\n\n**Pull \u0026 Mount docker dev-dependencies**: It will download the required MySQL \u0026 Redis architecture dependencies\n```bash\ndocker compose up -d\n```\n\n**Install application:**\n```bash\n$ yarn install\n```\n\n**Run TypeORM database migrations:**\n```bash\nyarn run migration:run\n```\n\n**Enable husky events**\n```bash\nyarn prepare\n```\n\n## Compile and run the project\n\n```bash\n# development\n$ yarn run start\n\n# watch mode\n$ yarn run start:dev\n\n# production mode\n$ yarn run start:prod\n```\n\n## Quality \u0026 formatting scripts\n```bash\n# linting\n$ yarn lint\n\n# format\n$ yarn format\n```\n\n## Migration commands\n```bash\n$ yarn migration:generate\n\n$ yarn migration:create\n\n$ yarn migration:run\n\n$ yarn migration:revert\n```\n\n## Run tests\n\n```bash\n# unit tests\n$ yarn test:unit\n\n# e2e tests\n$ yarn test:e2e\n\n# test coverage\n$ yarn test:coverage\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduquejo%2Fnestjs-url-shortener-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduquejo%2Fnestjs-url-shortener-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduquejo%2Fnestjs-url-shortener-application/lists"}