A React (Next.js) donut delivery app. This app uses BuiltOn and their JavaScript SDK in order to manage app data such as:
- Users (
โ๏ธ with Firebase Auth) - Products (donuts in this case ๐ฉ)
- Discount coupons
- Orders
- Payments (
โ๏ธ with Stripe)
This works with my delivery-manager application that allows employees/admins to view orders, change order status, refunds, etc.
๐บ If you use VS Code, use the CodeTour extension to get install instructions in the IDE. Just open and the project in VS Code and start the tour!
Otherwise, follow these instructions to set up the project:
-
Create a free BuiltOn account
-
Create a Google Firebase project and link it in to your BuiltOn dashboard.
-
Configure Firebase Auth to accept Google logins & guest accounts
-
Clone this repo and
npm install
-
Configure the app's enviromnent variables with your API keys:
- If you want to deploy (or develop with) to ZEIT/Now:
- For local development, add a
.env.build
file (use.env.build.sample
as reference) - Add now secrets based off the @ definitions in
now.json
- Begin developing with
now dev
(ornpx now dev
if you don't have now installed globally)
- For local development, add a
- If you just want to build locally (or deploy elseware):
- Add your API keys
next.config.js
instead of theprocess.env
definitions - Start developing with
npm run dev
- Add your API keys
- Configuring the ZIP Codes that quality for delivery is a bit tricky:
- Use this tool by zipcodeapi.com to generate a JSON list of cities and zip codes with delivery
- Upload the JSON file to your project directory (
public/zip-codes.json
is .gitignored) or use a service like JSONbin to host it. Make sure it is set to "๐ Public" (example) - Set the proper URL of the file with the
ZIP_CODES_JSON
environment variable
- If you want to deploy (or develop with) to ZEIT/Now:
-
Add some products in the BuiltOn Dashboard to make things more interesting ๐
โน Disclaimer: I do consulting work for BuiltOn and needed to make a delivery app for my friend's donut shop. I figured making it open source would be a fun way to show BuiltOn's capabilities! ๐