Skip to content

Application Notes

Atrian Wagner edited this page Sep 14, 2023 · 6 revisions

Services

Banchan uses the following third-party services as part of its development and deployment:

  • GitHub - Code hosting, project management
  • Fly.io - Platform + database hosting and clustering (requires invite by email for access)
  • Amazon S3 - File/image uploads storage
  • Plausible - Web analytics
  • Netlify - Landing page hosting, beta signup email form collection
  • Stripe - Stripe Connect Express with Stripe Tax for payment processing and tax management
  • Sendgrid - Sending emails (both transactional and marketing)
  • Sentry.io - Logging and error logging (requires invite by email for access)
  • Google - OAuth login
  • Discord - OAuth login
  • Oban Web - Better observability into Oban queues.
  • Freshdesk - Support tickets

Services Wishlist

Stuff we don't use yet, but might be nice to afford in the future:

  • Ticketing system - Debating replacing Freshdesk, but there are other things more pressing right now.

Working with Stripe

Stripe has a number of credit card and account numbers for testing.

Of note:

  • 4000000000000077: Instantly succeeds a payment, bypassing the pending period (so the amount can be immediately paid out)
  • 4000000000000002: Card declined
  • 4242424242424242: US-based transaction that immediately succeeds but is subject to the payout waiting period (7 days for an account's first payout, even in test mode)

Environment Variables

There's a number of env vars you need to get set up to get up and running, depending on your needs/environment. See Environment Variables.

Details to Know

  • Phoenix templates are not in use due to incompatibilities with SurfaceUI.
  • router.ex to view all URLs and their routes
  • priv/repo/migrations/ and lib/banchan/ for database schema and migrations
  • lib/banchan/uploads/uploads.ex contains the upload configuration except for max file size, which is set in config/config.exs
  • lib/banchan/workers/thumbnailer.ex is where ImageMagick handles the images, which includes a memory usage limit to 128mb and two jobs at a time.
    • This limit is relevant when testing on non-local dev (dev.banchan.art) as the memory limit is low, which can cause a OOM killed event on that dev server.

Dependencies of Note

Automatically installed as part of the initial install of the repo, here are a few dependencies to be aware of that the project is built on: