Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: nestjs user api and e2e tests (#256) #257

Merged

Conversation

dorukucak
Copy link
Member

@dorukucak dorukucak commented Oct 27, 2024

Fixed: #256

Description

Created nestjs server and implemented a user API that expose an /register endpoint.

Resolves: # (#256)


Changes Made

  • Changes in apps folder (specify the app and briefly describe the changes):

    • Web
    • Native
    • Api
  • Changes in packages folder (specify the package and briefly describe the changes):

    • Core

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update (changes)

Screenshots

Before After
"screenshot before" "screenshot after"

How Has This Been Tested?

  • Supertest Jest integration
  • Jest unit tests

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional Comments

(Optional) Add any additional comments or notes for reviewers here.

@dorukucak dorukucak requested a review from a team as a code owner October 27, 2024 14:18
@dorukucak dorukucak force-pushed the is-256_user-microservice-skeleton branch from e120558 to 3ebfef1 Compare October 27, 2024 22:47
apps/user/libs/utils/swagger.ts Show resolved Hide resolved
apps/user/src/user/user.service.ts Outdated Show resolved Hide resolved
@dadiorchen
Copy link
Collaborator

@dorukucak you finish it? Can you e2e test pass? Please add your command to run your e2e in the readme.md, then we can merge your code.

@dorukucak
Copy link
Member Author

Working on implementing keycloak. Couldn't find a keycloak endpoint to register user. Do we have that?

@dadiorchen
Copy link
Collaborator

@pierrelstan we need your help here

@pierrelstan
Copy link
Collaborator

pierrelstan commented Nov 2, 2024

@dorukucak I think these links could help find the register endpoint.:

and the implementation of the register API endpoint is in the web (nextjs) under the path src/app/api/auth/signup.

If you have any questions, feel free to let me know.

@dorukucak dorukucak force-pushed the is-256_user-microservice-skeleton branch from 8a2debc to 35cc540 Compare November 3, 2024 23:43
@dorukucak
Copy link
Member Author

Okay so, I had to create a Keycloak service account and give it manage-user privilages. Now we can succesfully create users using the /register endpoint. However, we need to handle API secrets before we can run tests on github workflow etc.

@dorukucak dorukucak force-pushed the is-256_user-microservice-skeleton branch from 35cc540 to f96c4e0 Compare November 4, 2024 00:04
@pierrelstan
Copy link
Collaborator

@dorukucak Could you kindly resolve the merge conflicts?

@dorukucak dorukucak force-pushed the is-256_user-microservice-skeleton branch from f96c4e0 to f77b21d Compare November 10, 2024 17:29
@dorukucak
Copy link
Member Author

resolved conflicts in yarn.lock

@dorukucak dorukucak force-pushed the is-256_user-microservice-skeleton branch 3 times, most recently from 06c1700 to d4421e8 Compare November 15, 2024 17:24
@dorukucak
Copy link
Member Author

This is ready

@dorukucak dorukucak force-pushed the is-256_user-microservice-skeleton branch from a4e2b48 to 1618cdd Compare November 27, 2024 19:26
@dorukucak
Copy link
Member Author

  • utilized cross-env package to set dev environment variables for now. we can change it in the future.
  • rebased on top of main

apps/user/package.json Outdated Show resolved Hide resolved
apps/user/package.json Show resolved Hide resolved
@dorukucak dorukucak force-pushed the is-256_user-microservice-skeleton branch from 1618cdd to db5f6de Compare November 28, 2024 15:08
@pierrelstan pierrelstan merged commit 6c92e41 into Greenstand:main Nov 29, 2024
2 checks passed
@dadiorchen
Copy link
Collaborator

  • utilized cross-env package to set dev environment variables for now. we can change it in the future.
  • rebased on top of main

Cross-env is a good practice, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create user microservice skeleton with nest.js and create the first e2e test for user registration.
3 participants