jbccollins / destiny-loadout-builder

🎮 A tool for creating optimized loadouts in the video game Destiny 2

Home Page:https://www.destinyloadoutbuilder.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Getting Started

Create a your own Bungie third-party developer app

You will need to create your own app at https://www.bungie.net/en/Application. Create Bungie App Screenshot

We will add the credentials from this app into your local environment file in the next step

Configure the fields in your app to be just like this screenshot.

Make sure you have set the OAuth Client Type dropdown, Scope checkboxs and Origin Header text field to match exactly with what is in the screenshot.

The Website text field can just point to your fork of the repo. It doesn't really matter. Bungie App Setup Screenshot

Create your local environment file

Create a file named .env.local in the root directory and add these keys. Check the screenshot above to see where these keys come from.

NEXT_PUBLIC_BNET_API_KEY=whatever
NEXT_PUBLIC_BNET_OAUTH_CLIENT_ID=whatever
BNET_OAUTH_CLIENT_SECRET=whatever

Get a DIM API Key (Optional)

If you want to locally develop any feature that touches the DIM loadouts integration you will need a DIM API Key. You can get a DIM API Key that will work for localhost by following these instructions.

Add that key to .env.local like so:

NEXT_PUBLIC_DIM_API_KEY=whatever

Installation

Install the required npm packages. From the root directory run:

npm i

Get local SSL working

The Bungie API requires that your app run using https due to some OAuth stuff. To make https work locally we hack up a local ssl certificate.

Mac Instructions

Run these commands from the root directory (source):

brew install mkcert
mkcert -install
mkcert localhost
Windows Instructions

Follow the instructions here to install mkcert. After installing it, run the following commands in the project repo:

mkcert -install
mkcert localhost

Run the app!

From the root directory run

npm run dev

If on windows, open two powershell terminals and run each command in one terminal:

npx local-ssl-proxy --source 4001 --target 3001 --cert localhost.pem --key localhost-key.pem
npx next dev -p 3001

Open http://localhost:4001 in your browser to see the result.

You can start editing any file and see your changes automatically propagate to the browser.

In chrome you may need to enable this flag: chrome://flags/#allow-insecure-localhost

Deploy on Vercel

Just push to master. It will deploy automatically here.

Attribution

Contributions

View the list of contributors to this project here

Many thanks to the folks behind these projects:

About

🎮 A tool for creating optimized loadouts in the video game Destiny 2

https://www.destinyloadoutbuilder.com


Languages

Language:TypeScript 99.7%Language:CSS 0.2%Language:JavaScript 0.0%