Skip to content

AWS Amplify: What is the best infrastracutre approach for this web app?

0

I have an idea to create a web app in React. This app will have two modes: "edit" and "view." Only admins can edit the page, while everyone else can view it.

In "edit" mode, admins can customize how the page looks and save these changes to a database. There will be only two admins at any given time and possibly around 100 viewers.

However, I want to sell this web app to hundreds of clients, each with their own page that admins can edit. What’s the best approach for building an app like this? How can I ensure that viewers access the correct page?

asked 2 years ago249 views

2 Answers
2

AWS Amplify is an excellent choice for building and deploying your React web app with the requirements you've described. Here's an approach to consider:

  1. Frontend Development: Use Amplify's React library to build your web application. This will provide you with tools and components to easily implement authentication, data management, and hosting.

  2. Authentication: Implement user authentication using Amplify's built-in authentication feature. This will allow you to manage admin and viewer roles effectively. You can use Amazon Cognito as the backend service for user management and authentication.

  3. Data Storage and Management: Utilize Amplify DataStore, which is backed by Amazon DynamoDB. This will allow you to:

  • Store page customizations for each client
  • Implement real-time synchronization between admins and viewers
  • Enable offline capabilities for admins to work on edits even without an internet connection
  1. Access Control: Implement fine-grained access control using Amplify's authorization rules. You can set up rules at the model or field level to ensure that only admins can edit, while viewers have read-only access.

  2. Multi-tenant Architecture: To support hundreds of clients with their own pages:

  • Use a multi-tenant data model where each client has a unique identifier
  • Store page data and customizations with this identifier as a key
  • Implement routing in your React app to direct users to the correct page based on the client identifier
  1. Scalability: Amplify is built on AWS serverless technologies, allowing your app to automatically scale as your client base grows. You'll only pay for the resources you use, making it cost-effective as you start and grow your business.

  2. Deployment and Hosting: Use Amplify's built-in hosting service to deploy and host your React app. This provides a global content delivery network (CDN) for fast access worldwide.

By leveraging AWS Amplify's features, you can create a scalable, secure, and efficient web app that meets your requirements. The platform's integration with various AWS services will help you manage authentication, data storage, and access control without having to build these components from scratch.

Sources
Full Stack Development - Web and Mobile Apps - AWS Amplify
AWS Amplify | Extensible Web & Mobile Apps | Amazon Web Services
Conclusion - Amplify DataStore: Use Cases and Implementation

answered 2 years ago

EXPERT

reviewed 2 years ago

2

Hi,

What you describe looks to me like a multi-tenant application (with a single admin in your use case).

So, I'd suggest you to follow the best practices of multi-tenant applications with Amplify

See:

Best,

Didier

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.