fzuleta / sample-users-microservice

Sample user management using kotlin, vertx, aurelia.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample-User-Microservices

What is this?

Gif

This is a fully running client/server implementation for a user management tool (requires a user to login to load a dashboard), with dev goals for:

  1. Scalable
  2. Easy to deploy
  3. Same environment for Dev|Prod
  4. Concise

Flow

Technology:

  • Sever: Kotlin, Java, Jetty, Redis, Apache Shiro, AES encryption, Vert.X messaging (with ssl).
  • Client: Aurelia.io, Typescript. (mobile friendly css)

Features:

  • Login (with remember me)
  • Captchas
  • Google Analytics
  • Multi-Language (EN/ES), scalable to n amount of languages.
  • Registration
  • Confirm email
  • Forgot password
  • Two factor authentication (enable | disable | recovery codes)
  • Guest account
  • Client/Server ssl communication
  • Server microservices communication using ssl

To Run

  1. add to etc/hosts
    • 127.0.0.1 usermicroservice.com
  2. cd ./server
  3. ./gradlew build jar
  4. cd ..
  5. docker-compose up --build
  6. open: https://usermicroservice.com:8443
  7. in chrome accept private certificate.
  • You can always run with intelliJ by either running each module, or as a configuration.

Future Recomendations:

  • Implement apache kafka as an event store.
  • Implement each future microservice with it's own read-store.

when adding new microservices

update self.keystore in resources and add a new dns:XXXXXXXX and build and run again the docker images.

keytool -keystore self.keystore -alias localhost -validity 3650 -genkey -keyalg RSA -sigalg SHA256withRSA -ext san=dns:localhost,dns:usermicroservice.com,dns:apigateway,dns:members,dns:webserver,dns:contact

Disclaimer

All code provided in this git repository is experimental, and should not be used as-is in production.

  • Always change all passwords stored in the docker-compose.yml, or source code. this passwords are only for dev-testing.
  • create your own SSL certificates, ideally signed by a CA.
  • must not be used as-is in production
  • must not be used as-is in production
  • must not be used as-is in production
  • See the LICENSE file for more info

if you do use it in prod... well.. I told you not to. :)

About

Sample user management using kotlin, vertx, aurelia.io

License:Apache License 2.0


Languages

Language:Kotlin 49.0%Language:TypeScript 30.1%Language:HTML 11.9%Language:CSS 7.4%Language:JavaScript 1.1%Language:Shell 0.5%