GithubHelp home page GithubHelp logo

aceykt / leos-guitar-shop-nextjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seg-leonelsanches/leos-guitar-shop-nextjs

0.0 0.0 0.0 422 KB

Leo's Coolest Guitar Website in Next.js.

Home Page: http://leos-guitar-shop-nextjs.vercel.app

JavaScript 7.32% TypeScript 87.20% CSS 5.48%

leos-guitar-shop-nextjs's Introduction

Leo's Guitar Shop

This is a Next.js project bootstrapped with create-next-app.

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository

Motivation

Hilarity, I guess. This project simulates a Guitar Shop. Every login attempt with any email/password will log in a random user successfully.

This is used to validate Segment application onboarding using React/Next.js archetype.

Architecture

Integration with Segment

This app uses @segment/analytics-next to send events to Segment. The following events are tracked:

  • User Log In
  • User Sign Up
  • Visit to main page
  • Visit to guitar
  • Product Added to Cart
  • Product Added to Wishlist
  • Checkout
  • Completing Checkout

Running

Prerequisites

This is a Node.js application, so it requires Node.js to be installed locally.

After installing Node.js you'll need to install Yarn, the package manager for this project:

npm i -g yarn

Running locally

To test with Segment, make sure to create a .env.local file with the following:

NEXT_PUBLIC_SEGMENT_WRITE_KEY='your-write-key'

You can get your source's write key at Connections > Sources > Your source > Settings > API Keys.

Then run the app using:

yarn dev

Open http://localhost:3000 with your browser to see the result. The page auto-updates as you edit files.

Back-end simulated by mock API routes. The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Using Staging Environment

You'll need to set another environment variable:

NEXT_PUBLIC_SEGMENT_CDN='https://cdn.segment.build'

Deployment

The easiest way to deploy a Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out Next.js deployment documentation for more details.

This app is deployed at https://leos-guitar-shop-nextjs.vercel.app/

Google Tag Manager Testing

Make sure to set a NEXT_PUBLIC_GTM_ID environment variable with the value equal to you GTM ID. The sites does the rest, initializing the Google data layer.

leos-guitar-shop-nextjs's People

Contributors

seg-leonelsanches avatar aceykt 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.