{"id":26468642,"url":"https://github.com/mthszr/forum-api","last_synced_at":"2026-04-29T20:10:02.405Z","repository":{"id":281222705,"uuid":"944594445","full_name":"mthszr/forum-api","owner":"mthszr","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-16T19:28:26.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T19:35:23.542Z","etag":null,"topics":["backend","node"],"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/mthszr.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}},"created_at":"2025-03-07T16:14:22.000Z","updated_at":"2025-03-16T19:28:30.000Z","dependencies_parsed_at":"2025-03-09T15:40:56.211Z","dependency_job_id":null,"html_url":"https://github.com/mthszr/forum-api","commit_stats":null,"previous_names":["mthszr/api_ddd","mthszr/forum-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mthszr%2Fforum-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mthszr%2Fforum-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mthszr%2Fforum-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mthszr%2Fforum-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mthszr","download_url":"https://codeload.github.com/mthszr/forum-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244460247,"owners_count":20456301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["backend","node"],"created_at":"2025-03-19T16:14:45.934Z","updated_at":"2026-04-29T20:10:02.400Z","avatar_url":"https://github.com/mthszr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 🚀 Project Overview\n\nThis project is a forum API that allows users to create questions, provide answers, and engage in discussions through comments. It follows clean architecture principles and uses domain-driven design to organize business logic.\n\n## 🔧 Getting Started\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/mthszr/forum-api.git\n\n# Navigate to project directory\ncd forum-api\n\n# Install dependencies\nnpm install\n```\n\n### Testing\n\n```bash\n# Run all tests\nnpm test\n\n# Run tests in watch mode\nnpm run test:watch\n```\n\n\n## ✨ Features\n\n- **Questions**: Create, edit, delete, and fetch questions\n- **Answers**: Answer questions, select best answers\n- **Comments**: Comment on questions and answers\n- **Attachments**: Add attachments to questions and answers\n- **Notifications**: Receive notifications for important events\n\n\n## 🏗️ Architecture\n\nThe project is structured following DDD principles:\n\n```bash\nsrc/\n├── core/           # Core functionality, shared across domains\n│   ├── entities/   # Base entity classes\n│   ├── errors/     # Error handling\n│   ├── events/     # Domain events\n│   ├── repositories/\n│   └── types/      # Shared type definitions\n├── domain/\n    ├── forum/      # Forum domain\n    │   ├── application/\n    │   │   ├── repositories/  # Repository interfaces\n    │   │   ├── use-cases/     # Application use cases\n    │   │   └── subscribers/   # Event subscribers\n    │   └── enterprise/\n    │       ├── entities/      # Domain entities\n    │       └── events/        # Domain-specific events\n    └── notification/          # Notification domain\n        ├── application/\n        └── enterprise/\n```\n\n## 🧩 Design Patterns Used\n\n- **Event-driven**: Uses domain events for cross-domain communication\n- **Error Handling**: Uses Either monad pattern for predictable error handling\n- **Value Objects**: Implements concepts like Slug as value objects\n- **Aggregates**: Uses aggregate roots (Question, Answer) to maintain consistency\n- **Domain Events**: Implements a pub/sub system with domain events\n- **Repository Pattern**: Abstracts data access behind repository interfaces\n- **Clean Architecture**: Separates concerns into layers (enterprise, application)\n\n## 🧠 What I Learned\n\nThroughout this project, I gained extensive experience with:\n\n- **Domain-Driven Design**: Applying DDD concepts including aggregates, entities, value objects, and domain events to model a complex problem domain\n- **Clean Architecture**: Implementing a layered architecture that separates concerns and makes the system more maintainable\n- **Test-Driven Development**: Writing tests first to guide the implementation and ensure code quality\n- **Advanced TypeScript**: Using TypeScript's type system for safer code, including generics, discriminated unions, and utility types\n- **Error Handling**: Implementing the Either monad pattern for predictable error handling without exceptions\n- **Event-Driven Architecture**: Using domain events for decoupled communication between different parts of the system\n- **In-Memory Repositories**: Creating in-memory implementations for testing and development\n- **Factory Patterns**: Implementing factory methods and patterns for creating complex objects\n- **Dependency Injection**: Applying DI principles to increase testability and reduce coupling\n- **Advanced OOP Principles**: Applying encapsulation, inheritance, and polymorphism effectively\n- **Repository Pattern**: Abstracting data access behind well-defined interfaces\n- **Unit Testing**: Writing comprehensive tests using Vitest\n- **Mocking and Spies**: Utilizing advanced testing techniques for verifying behavior\n\nThese skills have significantly improved my approach to building complex backend applications with clean, maintainable code.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmthszr%2Fforum-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmthszr%2Fforum-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmthszr%2Fforum-api/lists"}