{"id":28672657,"url":"https://github.com/joelp03/tweeter-backend","last_synced_at":"2025-10-23T23:41:17.272Z","repository":{"id":62213846,"uuid":"558875509","full_name":"Joelp03/Tweeter-backend","owner":"Joelp03","description":"twiiter-clone Domain driver desing","archived":false,"fork":false,"pushed_at":"2023-06-25T00:28:41.000Z","size":1476,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-13T19:10:10.712Z","etag":null,"topics":["ddd-example","devchallenges","exressjs","hexagonal-architecture","jwt-authentication","mern-stack","mongodb","mongoose","nodejs","ts","typescript"],"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/Joelp03.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":"2022-10-28T13:53:53.000Z","updated_at":"2025-06-01T10:06:02.000Z","dependencies_parsed_at":"2025-03-07T02:33:09.721Z","dependency_job_id":"34602237-4c75-4e66-80ec-1828fdec5bfb","html_url":"https://github.com/Joelp03/Tweeter-backend","commit_stats":null,"previous_names":["joelp03/tweeter-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Joelp03/Tweeter-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joelp03%2FTweeter-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joelp03%2FTweeter-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joelp03%2FTweeter-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joelp03%2FTweeter-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Joelp03","download_url":"https://codeload.github.com/Joelp03/Tweeter-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joelp03%2FTweeter-backend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259763077,"owners_count":22907408,"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":["ddd-example","devchallenges","exressjs","hexagonal-architecture","jwt-authentication","mern-stack","mongodb","mongoose","nodejs","ts","typescript"],"created_at":"2025-06-13T19:10:01.463Z","updated_at":"2025-10-13T00:03:59.488Z","avatar_url":"https://github.com/Joelp03.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Tweeter\nThis project is of  [DevChallenge-Twitter-Clone](https://devchallenges.io/challenges/rleoQc34THclWx1cFFKH)\n\n\n*NOTE: This repository is an example to explain 'how to implement DDD architecture on a Typescritps web application'. If you will to use this as a reference, add your implementation of authentication and security before deploying to the real world!!*\n\n\n\n## Tech Stack\n\n* [Express](https://expressjs.com/)\n* [Mongoose](https://mongoosejs.com/)\n* [Mongodb](https://www.mongodb.com/)\n* [Inversify](https://inversify.io//)\n* [Docker](https://www.docker.com/)\n\n## Code Architecture\n\nDirectory structure based on Domain driver design \n\n```tree\n.\n├── src\n│   ├── user \n│   │   ├── application\n│   │   ├── domain\n│   │   └── infrastructure\n│   ├── tweet\n│   │   ├── application\n│   │   ├── domain\n│   │   └── infrastructure\n│   ├── reply\n│   │   ├── application\n│   │   ├── domain\n│   │   └── infrastructure\n│   └── shared\n│       ├── application\n│       ├── domain\n│       └── infrastructure\n├── app.ts\n├── containers.ts\n├── index.ts\n├── types.ts\n└── test\n```\n\n### Model \n\nTo represent an User Model \n\n```ts\n\nexport class UserModel {\n\n    constructor(\n        public readonly id: UuidVO,\n        public username: UsernameVO,\n        public email: EmailVO,\n        public password: PasswordVO,\n    ) { }\n    \n}\n\n```\n\n### Value Object\n\nTo represent a Value Object `UuidVO`.\n\n```ts\nexport class UuidVO extends ValueObject\u003cstring\u003e {\n\n\n    public assertIsValid(value: string): void {\n        if (!validate(value)) {\n            throw new VOFormatException(UuidVO.name, value)\n        }\n    }\n\n    public equals(valueObject: UuidVO) {\n        return this.value === valueObject.value\n    }\n}\n```\n## Getting Started :rocket:\n\n1. Clone the repository: \n``` bash\ngit clone https://github.com/Joeldev1021/Tweeter-backend.git \n```\n2. Install dependencies ⛏️\n``` bash\nnpm install\n```\n3. Environments .env :\n``` bash\nPORT=3500\nJWT_SECRET_KEY='YOU_SECRET_KEY'\nMONGODB_HOSTNAME='localhost'\nMONGODB_PORT='27017'\nMONGODB_USER='root'\nMONGODB_PASSWORD='root'\nMONGODB_DATABASE_NAME='name'\nMONGODB_URI=mongodb://root:root@localhost:27017/name?authSource=admin\n\n```\n\n4. Docker componse:\n\n``` bash\nnpm run docker:up \nnpm run docker:down\n```\n5. Run Backend 🔥 :\n``` bash\nnpm run dev \n```\n\n\n\n##### The application should have these functions\n\n   * User story: I can see my profile or others' profile\n\n   * User story: When I am on a profile, I can see Tweets and Retweets. I can also filter by Tweets, Tweets and replies, Media and Likes\n\n   * User story: When I am on a profile, I can see followers and following\n\n   * User story: When I am on a profile, I can see follow or unfollow the user\n\n   * User story: I can navigate between Home, Explore and Bookmarks\n\n   * User story: I can navigate to My Profile, Group Chat (optional), Setting/Authentication App.\n\n   * User story: When I am on Home, I can post a new Tweet\n\n   * User story: When I post a new Tweet, I can choose to upload an image and set the Tweet to be public or only-follower\n\n   * User story: When I am on Home, I can see Tweets of people who I follow\n\n   * User story: I can Comment, Retweet, Like or Save a Tweet\n\n   * User story: I can Comment with image and I can like a comment\n\n   * User story: I can see the posted time of the Comments and Tweets\n\n   * User story: When I am on Home, I can see the most popular hashtags and people I should follow (it's up to you how to implement this)\n\n   * User story: When I am on Explore, I can see the Top, Latest Tweet, or Tweet with Media. I can also choose to see the most popular people\n\n   * User story: When I am on Bookmarks, I can see the Saved Tweet\n\n   * User story(optional): I can search for a group\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelp03%2Ftweeter-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelp03%2Ftweeter-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelp03%2Ftweeter-backend/lists"}