implement paywall (#161)

* implement core foundation

* inject deps

* fix incorrect migration

* tail migration

* use transaction for migration

* fix: inject deps for tests

* cleanup billing management for admin

* upgrade stripe sdk to v85

* set price env variables

* cleanup billing management

* allow multiple dev windows

* fix: settings scroll

* feat: show nice video thumbnail in listview

* feat: implement freemium restrictions

* remove unnecessary comments

* refactor

* docs

* format

* tweak network settings better hierarchy
This commit was merged in pull request #161.
This commit is contained in:
Arjun Patel
2026-04-14 15:18:32 -07:00
committed by GitHub
parent aff18d82db
commit 67826b92c0
44 changed files with 2197 additions and 153 deletions
+9 -8
View File
@@ -6,6 +6,7 @@ import (
"os"
"testing"
"github.com/flowy-live/llink/internal/billing"
"github.com/flowy-live/llink/internal/network"
"github.com/flowy-live/llink/internal/particle"
"github.com/flowy-live/llink/internal/testhelper"
@@ -33,7 +34,7 @@ func getStreamStatus(data json.RawMessage) string {
func TestParticleService_CreateAndGet(t *testing.T) {
ctx := context.Background()
networkSvc := network.NewService(dbPool, nil)
networkSvc := network.NewService(dbPool, nil, billing.Noop())
svc := particle.NewService(dbPool, networkSvc)
// Create a network first
@@ -72,7 +73,7 @@ func TestParticleService_CreateAndGet(t *testing.T) {
func TestParticleService_NestedParticles(t *testing.T) {
ctx := context.Background()
networkSvc := network.NewService(dbPool, nil)
networkSvc := network.NewService(dbPool, nil, billing.Noop())
svc := particle.NewService(dbPool, networkSvc)
// Create a network
@@ -118,7 +119,7 @@ func TestParticleService_NestedParticles(t *testing.T) {
func TestParticleService_CustomVisibility(t *testing.T) {
ctx := context.Background()
networkSvc := network.NewService(dbPool, nil)
networkSvc := network.NewService(dbPool, nil, billing.Noop())
svc := particle.NewService(dbPool, networkSvc)
// Create a network with a member
@@ -160,7 +161,7 @@ func TestParticleService_CustomVisibility(t *testing.T) {
func TestParticleService_UpdateAndDelete(t *testing.T) {
ctx := context.Background()
networkSvc := network.NewService(dbPool, nil)
networkSvc := network.NewService(dbPool, nil, billing.Noop())
svc := particle.NewService(dbPool, networkSvc)
// Create a network
@@ -198,7 +199,7 @@ func TestParticleService_UpdateAndDelete(t *testing.T) {
func TestParticleService_ListRootParticles(t *testing.T) {
ctx := context.Background()
networkSvc := network.NewService(dbPool, nil)
networkSvc := network.NewService(dbPool, nil, billing.Noop())
svc := particle.NewService(dbPool, networkSvc)
// Create a network
@@ -224,7 +225,7 @@ func TestParticleService_ListRootParticles(t *testing.T) {
func TestParticleService_OpenCloseStream(t *testing.T) {
ctx := context.Background()
networkSvc := network.NewService(dbPool, nil)
networkSvc := network.NewService(dbPool, nil, billing.Noop())
svc := particle.NewService(dbPool, networkSvc)
// Create a network
@@ -272,7 +273,7 @@ func TestParticleService_OpenCloseStream(t *testing.T) {
func TestParticleService_NotAStream(t *testing.T) {
ctx := context.Background()
networkSvc := network.NewService(dbPool, nil)
networkSvc := network.NewService(dbPool, nil, billing.Noop())
svc := particle.NewService(dbPool, networkSvc)
// Create a network
@@ -301,7 +302,7 @@ func TestParticleService_NotAStream(t *testing.T) {
func TestParticleService_AccessInheritance(t *testing.T) {
ctx := context.Background()
networkSvc := network.NewService(dbPool, nil)
networkSvc := network.NewService(dbPool, nil, billing.Noop())
svc := particle.NewService(dbPool, networkSvc)
// Create a network with members