tiki / .github

A special repository used to populate our GitHub org profile, as well as set default community health files.
3 stars 0 forks source link

CONTRIBUTORS.md #12

Closed mike-audi closed 5 months ago

mike-audi commented 1 year ago

Create a standard contributors file to be included in each repo

mike-audi commented 1 year ago

Per @timoguin's request: here are the basic instructions for getting started developing with TIKI for L0 services

  1. Install Docker
  2. Clone Project
  3. run docker compose up from project root

Note for l0-auth service, there is a 4th optional step: To test/debug one-time-password's via email requires a SendGrid API key. The contributor needs to open an issue with their email/alt form of contact to receive the key. Then run docker compose up -e SENDGRID_API_KEY=[KEY]

To debug the application run a remote JVM debug using the following CLI config: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000

see the screenshot for example, IntelliJ debug config

Screenshot 2022-12-27 at 3 18 06 PM
timoguin commented 1 year ago

Note for l0-auth service, there is a 4th optional step: To test/debug one-time-password's via email requires a SendGrid API key. The contributor needs to open an issue with their email/alt form of contact to receive the key. Then run docker compose up -e SENDGRID_API_KEY=[KEY]

This is a stickler. We definitely don't want contributors to have to do this. What would it take to get rid of this requirement?

Does Sendgrid's sandbox mode also require an API key (I'm assuming yes).

https://docs.sendgrid.com/for-developers/sending-email/sandbox-mode

If not, I'd like to see he we might be able to mock it out somehow.

To debug the application run a remote JVM debug using the following CLI config: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000

see the screenshot for example, IntelliJ debug config

Screenshot 2022-12-27 at 3 18 06 PM

Can we make this debug config shareable? I'm thinking about the way you can add project-level settings for other IDEs like Visual Studio or VS Code.

mike-audi commented 1 year ago

The service runs and works without the API Key, but if you want to work on the specific email-based OTP implementation, you'll need an API Key -even for their Sandbox. If we publicly share a Sandbox key, it'll get shut off sooner than later.

There is not a great alternative since all SMTP services will require similar, other than including a debug flag of sorts to return the OTP code via rest instead of email. I'm cautious about doing this because a slip-up could end up with that code in prod and big 'ol security risky.

Yes, I'll need to do some research on sharing debug configs, but there is definitely a way to do it.

timoguin commented 1 year ago

The service runs and works without the API Key, but if you want to work on the specific email-based OTP implementation, you'll need an API Key -even for their Sandbox. If we publicly share a Sandbox key, it'll get shut off sooner than later.

Oh yea we're definitely not doing that.

There is not a great alternative since all SMTP services will require similar, other than including a debug flag of sorts to return the OTP code via rest instead of email. I'm cautious about doing this because a slip-up could end up with that code in prod and big 'ol security risky.

I've only done a little bit of preliminary research, but my thought process was about whether or not we could run an emulator locally. For example, when running locally, direct it to a SMTP server running in Docker instead of Sendgrid's API.

localstack has a local version of AWS SES, but it's only in the Pro version, which presents the same problem: developers would need a license and access key.

Just something to be thinking about.

mike-audi commented 1 year ago

Good idea on adding a smtp docker container! Moving to a dedicated issue in l0-auth for this (https://github.com/tiki/l0-auth/issues/21)

mike-audi commented 1 year ago

@timoguin's request: here are the basic instructions for getting started developing with TIKI for

tiki-sdk-dart

  1. Install Dart requires version >=2.17.0 <3.0.0 at time of writing stable version is 2.18.6.
  2. Clone Project
  3. Run dart pub get from the root of the project

tiki-sdk-flutter

  1. Install Flutter requires dart version >=2.18.2 <3.0.0 and flutter version >=3.3.4 at time of writing stable versions are 2.18.6. & 3.3.10 note: to build for Android or iOS requires also installing Android Studio and/or XCode. Run flutter doctor to check your local dependencies
  2. Clone Project
  3. Run flutter pub get from the root of the project

tiki-sdk-android

  1. Install Android Studio or necessary plugins for Android supported IDEs.
  2. Clone Project
  3. Run ./gradlew clean build from the root of the project

-[Optional] Run unit tests from the root of the project ./gradlew test and see reports under /app/build/reports/tests/ -[Optional] Run integration tests from within the integration_tests/ folder with ./gradlew connectedAndroidTest and see reports under /app/build/reports/tests/ /integration_tests/build/reports/androidTests/. note: Requires a connected android device or emulator

tiki-sdk-ios

  1. Install Xcode
  2. Clone Project
  3. Open the cloned project folder in Xcode

-[Optional] Run integration tests by opening the integration_tests subproject in Xcode. Open Test Navigator and Run the IntegrationTests parent (right click or press run button in menu, not the scheme run button)

console & tiki.github.io

  1. Install Node.js and npm
  2. Clone Project
  3. Run npm install from the root of the project
  4. Run npm run dev from the root of the project and in a browser navigate to http://localhost:3000