Skip to content

A personal coding project aiming to become an exhaustive list of Made in USA clothing manufacturers. Built as a Single Page Application (SPA) using React and Bootstrap with a cloud MongoDB service and Leaflet for maps πŸ‡ΊπŸ‡Έ

License

Notifications You must be signed in to change notification settings

hdehal/made-in-usa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Get Started:

  1. Clone the repo:
git clone https://github.com/hdehal/made-in-usa.git
  1. Setup your "Stitch App" on MongoDB Stitch, create the database, etc.: https://docs.mongodb.com/stitch/procedures/create-stitch-app/

  2. Create an API key: (your app) > Users > Providers > API Key (On) && Users > Add https://stitch.mongodb.com

  3. Create a ".env" file in your root (made-in-usa) folder with:

REACT_APP_STITCH_API_KEY=<YOUR-API-KEY-HERE>

File Structure:

src/
β”œβ”€β”€ App.js
β”œβ”€β”€ index.css
β”œβ”€β”€ index.js
└── components/
    β”œβ”€β”€ about.js
    β”œβ”€β”€ add.js
    β”œβ”€β”€ addForm.js
    β”œβ”€β”€ displayAlerts.js
    β”œβ”€β”€ displayCount.js
    β”œβ”€β”€ displayTable.js
    β”œβ”€β”€ error.js
    β”œβ”€β”€ home.js
    β”œβ”€β”€ maps.js
    β”œβ”€β”€ navigation.js
    β”œβ”€β”€ scrollTop.js
    β”œβ”€β”€ stitchAuth.js
    β”œβ”€β”€ tableColumns.js
    └── twemoji.js

How to Deploy on GitHub Pages using Yarn and gh-pages:

Assuming you have an existing working GitHub repository, and your local code is checked-in.

  1. Run yarn add -D gh-pages to install gh-pages as a dev dependency

  2. Create CNAME file in the public/ folder)

Your CNAME file should look like this:
mywebsite.com
  1. Edit your package.json and add the following: If it's a GitHub repo:
"homepage": "https://<your_github_username>.github.io/st",

OR if it's a custom TLD/domain:

  "homepage": "https://yourwebsite.com",

AND add your build and deploy scripts -- this will deploy your build folder to a new branch it will automatically create for you called gh-pages:

"scripts": {
    "deploy": "yarn run build && gh-pages -d build",
}
  1. Add basename to your your routing:
  1. Commit your changes to your normal repo

  2. Create your username.github.io repo at https://pages.github.com

  3. Configuring a custom domain for your GitHub Pages site: https://help.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site

  4. Run yarn deploy -- it will prompt you for your Github username/password and automatically create and push your build files to a new branch gh-pages on your remote origin.

  5. You should shortly see your changes on either https://yourwebsite.com or https://your_github_username.github.io

About

A personal coding project aiming to become an exhaustive list of Made in USA clothing manufacturers. Built as a Single Page Application (SPA) using React and Bootstrap with a cloud MongoDB service and Leaflet for maps πŸ‡ΊπŸ‡Έ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published