/amazon-next

🛒 a simple mock of a e-commerce application made with nextjs, firebase database and framer motion for page transitions

Primary LanguageJavaScriptMIT LicenseMIT

Amazon Next

E-Commerce Application made with NextJS (SSR Framework for ReactJS)

GitHub language count Made by Laura Beatris Stargazers

About the project   |    Installation   |    Deploy   


Product List

Product List


🚀 About the project

The goal of this project was to learn the fundamentals of NextJS and integrate with external services like the database feature provided by Firebase. The page transitions are made Framer Motion that provides a great api support to Server Side Rendering. Also, i choosed tailwind for styling the most part of the app because of the agility that utility classes are able provide.

🏃 Installation

  // 1 - Git Clone
  
  // 2 - If you're going to use firebase to provide product data, be sure do create a env with the service data. 
        
  // 3 - Installing the dependencies
  yarn install
  
  // 4 - Run the application in the development mode 
  yarn dev
  

🔨 Deploy

Zeit provides a easy way to deploy NextJS applications. You need to create a now.json file with the build configuration.

{
    "build": {
        "env": {
            "SITE_URL": "@site_url",
            "FIREBASE_API_KEY": "@firebase_api_key",
            "FIREBASE_APP_KEY": "@firebase_app_id",
            "FIREBASE_MEASUREMENT_ID": "@firebase_measurement_id",
            "FIREBASE_MESSAGE_SENDER_ID": "@firebase_message_sender_id"
        }
    }
}

To map environment variables, you need to create secrets with the commands provided by the Now CLI

now secrets add <secret-name> <secret-value>

And then use them as the values of the env variables that you want to map inside of the build configuration.


If you have some problem with the application, don't be afraid to contribute sending a issue/pull request, i'll be happy to help. 😃

Made with ♥ by Laura 👋 See my linkedin!