Skip to content

Flutter + Nest.js AWS Lambda + mongoDB (Mongoose) tool for getting user feedback

License

Notifications You must be signed in to change notification settings

AlexeyPerov/FireShift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter + Nest.js AWS Lambda + mongoDB (Mongoose) basic functionality tool for getting user feedback

This is an example of a MEFN application (MongoDB + Flutter + Nest.js). Admin part uses Flutter with BLoC. API uses Nest.js & AWS Lambda + mongoDB (Mongoose).

It implements functionality to exchange messages with users of your applications. For example, to provide user support and/or collect feedback in the early stages of development.

Project

.
├── fireshift             # Flutter admin app
├── clients               # Examples of how to use API within your client apps
├── shift-serverless-api  # Lambda backend API
├── LICENSE
└── README.md
List of chats Single Chat
image image

Setup

Flutter

Flutter client and admin apps designed for Web but can be run on other platforms as well.
See official instructions on how to run them.

Setup Mongo database

Any Mongo hosting is fine but for ease of use you can set up the MongoDB Atlas Free Tier.

Nest.js AWS Lambda Setup

Setup pre-requisites:

Run

AWS credentials

  • Create a user with the AWS IAM service and get its access key and secret access key
  • Create .aws/credentials file
mkdir .aws
cd .aws
touch credentials
open .
  • Paste
[default]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_ACCESS_KEY

Install dependencies

  • Install serverless dependencies
npm install --save aws-serverless-express
npm install --save aws-lambda
npm install --save-dev serverless-plugin-typescript
npm install --save-dev serverless-plugin-optimize
npm install --save-dev serverless-offline plugin
npm install --save-dev serverless
  • Install mongoose & dotenv dependencies
npm install --save mongoose
npm install --save dotenv
  • Create .env file
# DB URI
MONGO_URI="mongodb+srv://[login]:[password]@[url]/[dbname]?retryWrites=true&w=majority"
  • Set "Incremental" to false in tsconfig.json

Run

  • local
sls offline start
  • deploy
sls deploy -v
  • remove
serverless remove