Smart Parking application by Sirin Software
MIT License
Cloud and Web dashboard for real-time visualization of parking slots.
Cloud
CI/CD
Web app
Mobile app
# Install Amplify CLI globally
npm install -g @aws-amplify/cli
amplify configure
# Install project and dependencies
git clone https://github.com/sonufrienko/smart-parking
cd smart-parking
npm i
# Create a AWS CloudFormation stack
amplify init
# Update the cloud resources (deployment)
amplify push
# Build and publish both the backend and the front end
# Upload React app to the S3 hosting bucket
amplify publish
Generate aws-exports.js
amplify init
# ? Do you want to use an existing environment? **Yes**
# ? Choose the environment you would like to use: **dev**
Branches
master
- Production branch (protected). Used by Amplify Console for Continuous Deployment.dev
- Development branch.Mocking and Testing
export AWS_REGION=us-west-2
# Execute local Lambda function
amplify mock function listSlots
# Start GraphQL server
amplify mock api
Request to change parking slot status:
APPSYNC-API-URL
- AppSync URL, example: https://xxx.appsync-api.us-west-2.amazonaws.com/graphql
APPSYNC-API-KEY
- Authorization by API KeyPARKING-ID
- Parking ID (string)DEVICE-ID
- Device ID (number)SLOT-STATUS
- Free - 0, Used - 1 (number)curl \
-XPOST https://<APPSYNC-API-URL>/graphql \
-H "Content-Type:application/graphql" \
-H "x-api-key:<APPSYNC-API-KEY>" \
-d '{ "query": "mutation { updateSlot(input: { parkingID: \"<PARKING-ID>\" device: <DEVICE-ID> slotStatus: <SLOT-STATUS> }) { parkingID slotNumber slotStatus device }}" }'
npm start
Runs the app in the development mode.npm test
Launches the test runner in the interactive watch modenpm run build
Builds the app for production to the build
folder.npm run eject
This command will remove the single build dependency from your project.