Implementing the Realworld Medium Clone Specifications using TypeORM/Postgres and Hexagonal Architecture.
-
Add Clap Feature for Articles
- Database: Add a
clap
table with the following columns:id
,article_id
(foreign key),user_id
(foreign key), andcounter
, with a composite primary key onarticle_id
anduser_id
. - API to Clap an Article: Create an API endpoint that allows users to clap for an article. Each clap will increment the counter associated with the user and article.
- Get Articles API Update: Modify the existing "get articles" API to include the total clap count for each article, aggregating claps from all users.
- Database: Add a
- This project is using TypeORM along with PostgreSQL.
- Seeding.
- Config Service (@nestjs/config).
- Mailing (nodemailer).
- Internationalization/Translations (I18N) (nestjs-i18n).
- File uploads. Support local and Amazon S3 drivers.
- Swagger.
- Support E2E and unit tests.
- Docker.
- CI (Github Actions).
- Absolute Path in Imports: Enable absolute paths for module imports, improving project structure and readability by avoiding deep relative paths.
- Hygen Scripting for Resource Management:
- Template Automation: Use Hygen templates to automate repetitive code generation tasks, improving developer productivity and ensuring consistency across the project.
- Resource Generation: Quickly generate a resource, including unit test case structure and files, to maintain a consistent codebase.
- Versioning of Resources: Implement version control for resources, ensuring backward compatibility and smooth upgrades.
- Property Management: Add or modify properties for specific versions of a resource, making updates seamless and non-disruptive.
- Raw Query Management: Integrate raw queries into the specific version of a resource to handle complex database queries effectively.
- Article Module: Full CRUD functionality for article creation, with support for:
- Commenting: Users can comment on articles.
- Favorite/Unfavorite: Users can mark articles as favorites or remove them.
- Feed Functionality: Display articles on the feed that are favorited by the logged-in user.
- GenAI Integration: Integrated GenAI for automatic article title creation.
- User Module: Complete CRUD functionality including:
- Follow/Unfollow APIs: Allow users to follow and unfollow other users.
- Social Logins: Integration with Apple, Facebook, Google, and Twitter for user authentication.