Project

General

Profile

Actions

Feature #3183

open

Make the basic app

Added by Gregory Magarshak 20 days ago.

Status:
New
Priority:
Urgent
Start date:
11/24/2025
Due date:
11/26/2025 (17 days late)
% Done:

0%

Estimated time:
10.00 h

Description

Overview

This week we are going to make an app at https://hebrews.app

In the future it will have many organizers (communities) and each community would have its own Calendars/calendar and events related to it. For now, we will just have one or two events.

It will have an event, that people should sign up and pay for. Refunds would only be in credits.

The event page will eventually have some beautiful photos rom past events, using Streams/image/album tool.

Most of these things already exist, it's just about assembling them.

The new stuff is about the payments. We will have dynamic pricing. We will eventually pay out to promoters ($5 per person they invited), we will pay expenses out of the account, and after all expenses, after event is over, can distribute the rest to the organizer.

Remember to use payment tokens, we already have almost everything wired up in Assets plugin. Just go through with debugger on local computer, and remember how it works.

App

Here is our Instagram account for the brand, take the logo from there: https://instagram.com/hebrews.app

Please use it for our app, and remember to size it correctly.

Repo is repo.qbix.com/Hebrews

Live is https://hebrews.app

Staging: https://qbixstaging.com/Hebrews (as usual, auto-updates from "develop" branch)

Page

We need to have a website where people can actually view our events and buy a reservation.

This is REAL. People will actually visit the page and buy, starting end of this week!

We want to make a simple site, but use the Calendars/event page. Let's improve it, to show pictures of past events (Streams/image/album).

Event is Hanukkah on December 17th, starting at 7:30 PM at Sugar Mouse, NYC.

Make it so that people can actually buy it. For now, use the stripe test accounts.

Invites will be going to this page, and people will buy. Those who invited them will be credited. I explain taht part below.

We should have two pages in the app this week:

/events: For now we will have basically two events: Hanukkah and Valentine's Day at same location.

/event/hanukkah: the Hanukkah event, people will buy. This is what we need, to start selling soon.
(eventId = "hanukkah", feel free to have installer add it manually for now)

Payments with Stripe

We already have the usual ./well-known/apple-developer-merchantid-domain-association file

Stripe test account (for your computer):

  • publishable key: pk_test_51PgXWMGQjH3X1hASvBJCc9amtEq0Kk6P4zIBSGEpwTO2cUZ4i9yl2uLChxji2VRpR71FjQqhmiMm6TMLyPsafoIi00F5q2n685
  • secret key: sk_test_51PgXWMGQjH3X1hASvaCLuOp9HzhNdJvUnw8Adp8ouObDORyOyezmOxM21nz92nOtoxKfLeV8Kkbl2WOUH5jAQOGt00wMzQUXgK

Live stripe account: I already put the publishable key and secret key (restricted to functions you need) on local/app.json in live server. The publishable key can be sent to clients.

Pricing (this is new)

Okay so the event stream should have pricing based on a few rules.

For now we will manually edit the attributes, later we will make a tool. I think in the future, prices should be achieved by relating some stream to pricing stream, but for now, we will have prices calculated from attributes directly.

1) There should be an Assets/price/start and
2) There should be an Assets/price/start and
2) Prices increases are in attribute "Assets/price/increase": [{"by": 2.00, "buyers" 7}, {"by": 3.00, "starting": "2012-03-04 00:01:05", ...}] can have
3) Price also

I guess buyers will subscribe to event as participants, with extra "going": "yes". The usual.

Hint: look at Assets_before_Streams_unrelateTo_Calendars_event and Assets_Credits::checkJoinPaid

Right now, you have this in Assets_credits_post and it's completely voluntary payment to start a chat... but later we will need to fix that. We will need to even return HTTP Code 402 (Payment Required) to clients

if ($toPublisherId && $toStreamName) {
        $reason = Q::ifset($req, 'reason', Assets::JOINED_PAID_STREAM);
        Assets_Credits::spend(null, $needCredits, $reason, $userId, @compact(
            "toPublisherId", "toStreamName", "items" 
        ));
    } elseif ($toUserId) {
        $reason = Q::ifset($req, 'reason', Assets::PAYMENT_TO_USER);
        Assets_Credits::transfer(null, $needCredits, $reason, $toUserId, $userId, @compact(
            "toPublisherId", "toStreamName", "items" 
        ));
    }

Onboarding

People can create an account by clicking Get Started (usual Users/status tool in dashboard)

Or they can click to buy, which will make them enter their stripe information.
Do you want to use Stripe webhook to register user?
Or do you want to have user create account and then pay with stripe? We already have second way I think.

Onboarding steps: it should include the name, icon, and Streams/basic (birthdate, gender, affiliation)

Three affiliations (it's in config, exported to client as Communities.affiliations)

"Religious", "Just Jewish", "Atheist"

Test that this onboarding works on various devices, including mobile. We will test it together when you are done.

QR Codes

Test that people can check into event with QR code, and users with role Calendars/admins can scan it. You can test this locally.

Back End

This should be a page / action with route "backend". People with Users/admins role should be able to access it.

Referral Links for Promoters... the promoters should be able to promote the event, and will earn credits.

For now, anyone can promote an event by inviting others! Simply clicking invite button in Streams/participants tool.

Everything already works. We now have Users_Referral table, and streams->subscribe() will actually When someone is invited, then we do invite->accept() which autosubscribes, and the subscribe sets the referral.

But now, in Assets plugin you can add hooks. If A refers B, then both A and B should get 5 credits. If they already were charged for a ticket with assets_charge, then they should get refunded $5 every time, instead of being given 5 credits.

This Assets_Charge::refund($amount) method should be calling Stripe API to issue a partial refund, and should save row assets_charge with a negative amount.

https://support.stripe.com/questions/partially-refund-a-customer

No data to display

Actions

Also available in: Atom PDF