Skip to content

Project-Hus/lifthus

Repository files navigation

lifthus

Lifthus is most intelligent cross-platform routine management service.

We also run a development server(branch "dev") for integrated development environment:

Lifthus Dev API Server(less)

.
├── Makefile                    <-- Make to automate build
├── README.md                   <-- This instructions file
├── services                    <-- Microservices
│   ├── lifthus-auth                <-- Auth service
│   └── post                        <-- Post service
└── template.yaml              <-- SAM template

Fully Automated Single Sign-On Feature

1. Before you visit any of our services, visit "SSO demo page" above.
and you're gonna see the page below. 
image
2. Now click the link and visit "Lifthus", and then come back immediately to SSO demo.
if you refresh the page, you're gonna see this page.
Which means that your sessions are established and that they are connected to each other.
image
3. Go to Lifthus, and sign in. you will see this, when you come back and refresh.
Which means that you signed in to two different domains at the same time.
image
4. Finally, try signing out from Lifthus. you will see the 2nd pic again.
Which means that you are signed out from two different domains at the same time.

Requirements

Setup process

Installing dependencies & building the target

  1. "swag init" at lifthus-auth
  2. "npm install" at lifthus-auth
  3. "make build" at lifthus

Local development

Invoking function locally through local API Gateway

sam local start-api

If the previous command ran successfully you should now be able to hit the following local endpoint to invoke your function http://localhost:3000/

Running in native language runtime

# lifthus-auth
make go
# post
nest start

Packaging and deployment

Every build and packaging is done by SAM CLI but NestJS must be transpiled to JS before packaging. Currently this job is done by Makefile. We are migrating to esbuild transpiling which SAM supports natively.

To deploy your application for the first time, run the following in your shell:

sam deploy --guided

The command will package and deploy your application to AWS, with a series of prompts:

  • Stack Name: The name of the stack to deploy to CloudFormation. This should be unique to your account and region, and a good starting point would be something matching your project name.
  • AWS Region: The AWS region you want to deploy your app to.
  • Confirm changes before deploy: If set to yes, any change sets will be shown to you before execution for manual review. If set to no, the AWS SAM CLI will automatically deploy application changes.
  • Allow SAM CLI IAM role creation: Many AWS SAM templates, including this example, create AWS IAM roles required for the AWS Lambda function(s) included to access AWS services. By default, these are scoped down to minimum required permissions. To deploy an AWS CloudFormation stack which creates or modifies IAM roles, the CAPABILITY_IAM value for capabilities must be provided. If permission isn't provided through this prompt, to deploy this example you must explicitly pass --capabilities CAPABILITY_IAM to the sam deploy command.
  • Save arguments to samconfig.toml: If set to yes, your choices will be saved to a configuration file inside the project, so that in the future you can just re-run sam deploy without parameters to deploy changes to your application.

You can find your API Gateway Endpoint URL in the output values displayed after deployment.

Testing

No tests yet.

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages