Giter Site home page Giter Site logo

bhurghundii / aws-vite-react-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 32 KB

Another boilerplate for bootstrapping websites quickly using React and AWS!

Home Page: https://dev.d2fmnyru0w0m10.amplifyapp.com/

HTML 1.18% CSS 6.02% TypeScript 90.75% JavaScript 2.05%
aws react vite

aws-vite-react-boilerplate's Introduction

aws-vite-react-boilerplate

This is a boilerplate template used to bootstrap a full stack app using AWS. There is also a back-end component too. This uses Amplify

โœจ Features

  • ๐Ÿš€ React: Harness the power of React, a popular JavaScript library for building user interfaces, to create dynamic and interactive web applications.
  • โ˜๏ธ AWS: Leverage AWS services and infrastructure through AWS Amplify to build scalable and secure applications in the cloud.
  • ๐Ÿ’ช TypeScript: Written using TypeScript, enjoy improved code quality, type-safety and a better developer experience.
  • โšก๏ธ Vite: Utilize Vite, a fast and efficient build tool, to enhance development speed and optimize the performance of your application.
  • ๐Ÿ“ฆ Test Using Cypress and Jest: Deliver quality with boilerplate that includes some starter tests to get you started.
  • ๐ŸŽจ Material UI Integration: Material UI to soup you up all the front end components cause CSS is hard.

๐Ÿ› ๏ธ Setup and Usage

Follow the steps below to set up and use the aws-vite-react-boilerplate boilerplate:

  1. Clone this repository to your local machine.

  2. Install the dependencies using your preferred package manager (npm or Yarn).

# Using npm
npm install

# Using Yarn
yarn install
  1. Configure the AWS services by setting up the AWS Amplify CLI (See the docs for a full walkthrough.) Once the AWS Amplify CLI is installed, run
amplify init

โš ๏ธ When configuring Amplify, make sure your build folder is pointed towards dist

This will give you an amplify folder which is necessary to interact with AWS Amplify

  1. Set up Amplify Auth to allow your users to log in. This boilerplate was built using just the Username option, but this can be modified if you require more options such as social media providers.
amplify add auth
  1. Start the development server.
# Using npm`
npm run dev

# Using Yarn
yarn dev
  1. Open your browser to your running application to see the application running.

Deploying your frontend ๐Ÿšข

  1. Set up Amplify Hosting. This can be done by running the command:
amplify hosting add
  1. Deploy your frontend.
amplify publish
  1. If your app has multiple pages (like in this boilerplate), your users will get an Access Denied as they navigate through your app.

To fix this, go to the Amplify console where your project is maintained and go to Rewrites and redirects and add the following config:

Source address: /^[^.]+$|.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/> Target address: /index.html Type: 200 (Rewrite)

This should fix it!

Boilerplate Structure

โ”œโ”€โ”€ public/              # Public assets
โ”œโ”€โ”€ src/                 # Source code
โ”‚   โ”œโ”€โ”€ components/      # Reusable components
โ”‚   โ”œโ”€โ”€ pages/           # Application pages
โ”‚   โ”œโ”€โ”€ services/        # Backend services integration
โ”‚   โ”œโ”€โ”€ styles/          # CSS styles
โ”‚   โ”œโ”€โ”€ utils/           # Utility functions and helpers
โ”‚   โ””โ”€โ”€ App.js            # Application entry point
โ”œโ”€โ”€ .env                 # Environment variables
โ””โ”€โ”€ ...

Feel free to adapt the structure based on your project's needs.

๐Ÿค Contribution

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request. Together, we can make this project even better.

๐Ÿ“ License

This project is licensed under the MIT License.

Happy coding! If you have any questions or need assistance, feel free to reach out to our friendly community. Enjoy building awesome applications with this template! ๐Ÿ˜„๐Ÿš€

aws-vite-react-boilerplate's People

Contributors

bhurghundii avatar

Stargazers

 avatar  avatar Adam Detki avatar Kevin Peters avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.