uselotus / lotus Goto Github PK
View Code? Open in Web Editor NEWOpen Source Pricing & Packaging Infrastructure
Home Page: https://www.uselotus.io
License: MIT License
Open Source Pricing & Packaging Infrastructure
Home Page: https://www.uselotus.io
License: MIT License
Describe the bug
Need to create an active subscription if the subscription start_date is today.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Warning
These dependencies are deprecated:
Datasource | Name | Replacement PR? |
---|---|---|
npm | react-query |
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@dnd-kit/core
, @dnd-kit/utilities
)node
, @types/node
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)node
, @types/node
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@types/react
, @types/react-dom
, eslint-plugin-react-hooks
, react
, react-dom
)docker-compose.dev.yaml
redis 7-alpine
docker.redpanda.com/vectorized/redpanda v22.2.2
svix/svix-server v0.74
docker-compose.prod.yaml
svix/svix-server v0.74
docker.redpanda.com/vectorized/redpanda v22.2.2
redis 7-alpine
backend/Dockerfile
python 3.9-bullseye
frontend/Dockerfile
node 18.11.0-alpine
nginx 1.23-alpine
go/event-guidance/Dockerfile
golang 1.20-alpine
go/event-ingestion/Dockerfile
golang 1.20-alpine
proxy/Dockerfile
nginx 1.23-alpine
.github/workflows/cypress.yml
actions/checkout v3
redpanda-data/github-action v0.1.3
actions/setup-python v3
actions/cache v1
cypress-io/github-action v5
.github/workflows/events-e2e.yml
actions/checkout v3
.github/workflows/lint-and-format.yml
actions/checkout v3
actions/setup-node v2
actions/checkout v3
actions/setup-python v2
.github/workflows/public_api_tests.yml
actions/checkout v3
redpanda-data/github-action v0.1.3
actions/setup-python v3
actions/cache v3
anthonyvscode/newman-action v1
.github/workflows/pytest.yml
actions/checkout v3
redpanda-data/github-action v0.1.3
actions/setup-python v3
actions/cache v3
go/event-guidance/go.mod
go 1.20
github.com/posthog/posthog-go v0.0.0-20221221115252-24dfed35d71a@24dfed35d71a
github.com/twmb/franz-go v1.13.0
github.com/uselotus/lotus/go/pkg v0.0.0-20230314205529-90d8b0c18f00@90d8b0c18f00
github.com/lib/pq v1.10.7
go/event-ingestion/go.mod
go 1.19
github.com/labstack/echo/v4 v4.10.0
github.com/lib/pq v1.10.7
github.com/redis/go-redis/v9 v9.0.2
github.com/spf13/viper v1.15.0
github.com/twmb/franz-go v1.13.0
github.com/uselotus/lotus/go/pkg v0.0.0-20230314205529-90d8b0c18f00@90d8b0c18f00
go/pkg/types/go.mod
go 1.20
docs/package.json
mintlify ^1.1.11
frontend/package.json
@ant-design/plots 1.2.1
@ant-design/pro-components 1.1.16
@dnd-kit/core ^6.0.7
@dnd-kit/sortable ^7.0.2
@dnd-kit/utilities ^3.2.1
@nangohq/frontend ^0.8.7
@tanstack/react-query 4.3.9
@tremor/react ^1.0.7
@types/node 18.7.3
@types/react-syntax-highlighter ^15.5.6
@typescript-eslint/eslint-plugin ^5.48.2
@typescript-eslint/parser ^5.48.2
@vesselapi/react-vessel-link ^1.1.6
ace-builds ^1.14.0
antd 4.22.4
axios 0.27.2
babel-plugin-import 1.13.5
clsx ^1.2.1
cypress ^12.5.1
dayjs 1.11.5
depcheck ^1.4.3
eslint ^8.32.0
eslint-config-prettier ^8.6.0
eslint-plugin-import ^2.27.5
eslint-plugin-jsx-a11y ^6.7.1
eslint-plugin-react ^7.32.1
eslint-plugin-react-hooks ^4.6.0
framer-motion ^8.5.0
mintlify ^1.1.9
moment ^2.29.4
openapi-typescript ^6.1.1
posthog-js ^1.34.1
prettier ^2.8.3
prismjs ^1.29.0
react 18.2.0
react-ace ^10.1.0
react-dom 18.2.0
react-query 3.39.2
react-query-devtools 2.6.3
react-router-dom 6.3.0
react-spinners 0.13.4
react-syntax-highlighter ^15.5.0
react-toastify 9.0.8
sql-formatter ^12.0.5
universal-cookie 4.0.4
vite-tsconfig-paths 3.6.0
zustand ^4.1.3
@types/react 18.0.21
@types/react-dom 18.0.10
@vitejs/plugin-react 2.1.0
autoprefixer 10.4.8
eslint-config-airbnb ^19.0.4
less 4.1.3
less-loader 11.0.0
postcss 8.4.16
tailwindcss 3.1.8
typescript ^4.9.3
vite 3.0.9
vite-plugin-imp 2.2.0
gen/package.json
@types/node ^18.11.18
openapi-typescript ^6.0.1
ts-node ^10.9.1
typescript ^4.9.4
package.json
lodash ^4.17.21
react-content-loader ^6.2.0
@ant-design/icons ^5.0.1
@types/lodash ^4.14.191
backend/pyproject.toml
backend/pyproject.toml
python ~3.9
django ==4.0.5
django-cors-headers >=3.13.0,<3.14
django-cryptography >=1.1.0,<1.2
django-extensions >=3.2.0,<3.3
django-grappelli >=3.0.3,<3.4
django-loginas >=0.3.10,<0.4
django-model-utils >=4.2.0,<4.3
django-money >=3.0.0,<3.1
django-q >=1.3.9,<1.4
djangorestframework >=3.13.1,<3.14
djangorestframework-api-key >=2.2.0,<2.3
jsonfield >=3.1.0,<3.2
pre-commit >=2.20.0,<2.21
psycopg2 *
python-dateutil >=2.8.2,<2.9
python-dotenv >=0.20.0,<0.21
redis >=3.5.3,<4.0
sentry-sdk >=1.11.0
stripe >=4.0.2,<4.1
gunicorn *
whitenoise *
dj-database-url *
django-heroku *
django-celery-beat *
django-vite *
drf-spectacular *
faker *
django-redis *
posthog *
python-decouple *
celery *
model-bakery *
django-simple-history <3.1.1
django-rest-knox *
django-anymail *
numpy *
pytz *
django-activity-stream *
kafka-python *
cronitor *
svix *
pyjwt *
drf-standardized-errors *
boto3 *
reportlab *
jinja2 *
sqlparse *
ruff *
ruamel.yaml *
django-timezone-field *
braintree *
pycountry *
taxjar *
usaddress-scourgify *
psycopg2-binary *
platformdirs *
pytest-django *
locust *
django-silk *
pytest-cov *
black *
sqlalchemy *
ruff *
pylint *
Is your feature request related to a problem? Please describe.
We need to be able to enable extensibility and allow the community to contribute template metrics that are general enough for any project.
Describe the solution you'd like
A folder of jsons that define a billable metric that we can then call with an endpoint and see all templates in the frontend.
I do not suggest we actually store these "template" metrics in our database, instead let's just keep a folder of jsons that define them.
Is your feature request related to a problem? Please describe.
Not everyone wants to put in a username and password.
Describe the solution you'd like
Google + github Oauth2 support using a django library.
Is your feature request related to a problem? Please describe.
Loading pages and navigating between them isn't as fast as it could be.
Describe the solution you'd like
Dear,
after a look to the code, to my point of view providing a mix of Pipfile and pyproject.toml do not aims a gold standard.
Ideally, the build process have to generate a distributable archive such as a wheel.
The generated wheel is mount to the container and installed with help pip
Thus I would recommend to use poetry, which help a lot and ease this process
Best regards
Get Plans query (backend/api/views .. PlanViewSet, get_queryset method) was super slow originally despite some prefetching. Dug into the details of the nested relatiosn and managed to get it down from ~250 db hits and a response time of 1-1.5 second to ~180 db hits with a response time of 0.4-0.7 seconds. Would be good to dig into why it's making this many calls and try to bring it down further. Plans combine a bunch of different obejcts so we could reasonably end up needing ~20 queries but thats still an order of magnitude.
Is your feature request related to a problem? Please describe.
Some users want the ability to use paddle instead of stripe for payment processing and invoicing.
Describe the solution you'd like
Create an integration for Paddle the same way the Stripe integration is currently created. This needs to be able to
This should allow the next PSP integration to be much easier since these steps should be fairly reproducible and are already defined for Stripe in an extensible way in the backend.
The last bit of this will be creating a card in the frontend and connecting either via oauth or more easily (MVP) through a secret api key.
Currently, we have all the queries that power our metric aggregation stored in backend/metering_billing/aggregation
. Though they are functionally working, there are some things worth considering and possibly fixing:
If anyone wants to tackle one of these 4 / look into them and come up with a plan of action, might be a good idea to spin them out into their own issue.
Figure out how to give users the option to generate a webhook on invoice creation, both on the frontend and the backend.
As described in this summary of different types of authorization headers, API keys should either be transmitted in the query string or as a request header. as such: API-Key: abcdefgh123456789
. Currently, the API key is nested inside an authorization header with a different name: Authorization: Api-Key t55vwqtd.jrb6QAGHswOBrZX70Jfz2qItjbtzavbv
. This is preventing us from properly documenting the authoerization process when building the docs.
Hi everyone,
We are looking to use Lago for our membership system but we have an advanced setup and are trying to see if there is a workaround in Lotus. We are an E-Learning company and sell subjects with video teaching and other features. Right now our products have multiple layers and we would like to know if our layering is possible in this system.
We have a Subject(Main Product), for example, Math. In each Subject, we want to have different tier levels with certain features in each tier.
Now, we have curriculums (Sub Product) in that subject, and we want to be able to attach the tiers available for that curriculum. We can have multiple curriculums (books) that have all the tiers or some of the tiers.
Is this something possible or is there a workaround to it?
Currently, we're inconsistent with our use of backslaches, which has caused some pain when we go to the wrong address and get unexpected behavior. Some goals:
We need to be able to have metrics that don't "reset" over a subscription period.
We are having trouble waiting for the frontend to start in our GitHub Actions workflow in order to do Cypress testing. Here are the details:
We have a Django backend and a Vite/React frontend.
The backend is started successfully with pipenv run python manage.py runserver 0.0.0.0:8000 &.
We use curl to check if the backend is available with curl -IsS http://localhost:8000/api/healthcheck/ >/dev/null. This works fine and we can confirm that the backend is available.
We use yarn run dev --port 3000 & to start the frontend, and it runs successfully.
We tried using curl to check if the frontend is available with curl -s -o /dev/null -w "%{http_code}" http://localhost:3000. However, this always fails with curl: (7) Failed to connect to localhost port 3000
We also tried using the wait-on property of the Cypress GitHub Action to wait for http://localhost:3000/login to become available. However, this did not work and we got the following error:
The response we received from your web server was:
> 404: Not Found
We also tried setting --host 0.0.0.0 for yarn run dev --port 3000 &, but this didn't solve the issue.
We suspect that there might be a problem with the way we are starting the frontend or the way we are checking if it is available. We would appreciate any help or guidance on how to resolve this issue.
Relevant changes are in #493
Is your feature request related to a problem? Please describe.
Users want webhooks for these events:
Describe the solution you'd like
In the backend add this webhook functionality using our alerts framework and svix.
In the frontend simply add the checkbox in the create webhook url form.
Is your feature request related to a problem? Please describe.
Some users use Go for their backend but dont' want to use raw requests to access Lotus.
Describe the solution you'd like
A full SDK written in Go, similar to our python and typescript SDKs.
Proposed Integration with Suger.Io. This would only work with Lotus Cloud.
Describe the bug
Running dev and self-host on docker-compose doesn't work with our script. This is most likely an issue with our script or our docker not running on windows 64 correctly
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Docker compose should be running, including the backend container instead of erroring like below.
Screenshots
Desktop (please complete the following information):
Is your feature request related to a problem? Please describe.
The only response we get back if we input invalid tiers is the Tiers are not valid response. This can be confusing to debug or figure out what you did wrong.
Describe the solution you'd like
An message relevant to the type of validation issue, either ranges are not correct or units are not correct etc.
In addition, if the border around the relevant cell could become red, signaling the location of the error that would be an additional improvement.
We need to refactor our current prod backend Dockerfile, currently it reuses the build/dev stage for the prod stage, but this means if we include dev dependencies in the dev stage then the final image will be bloated
Describe the bug
Creating a non-superuser, doesn't then have the ability to login/authenticate.
something along these lines:
https://medium.com/@ryangordon210/build-a-python-ci-cd-system-code-quality-with-pylint-f6dea78461c6
Is your feature request related to a problem? Please describe.
A company needs to know when a certain limit has been reached of usage for a given plan. For instance when the seat limit is reached and the user needs to upgrade to a new plan to add more seats.
Describe the solution you'd like
Adding a max-amount field to the plan component.
Is your feature request related to a problem? Please describe.
I would like to support Lotus by implementing Uffizzi preview environments.
Disclaimer: I work on Uffizzi.
Uffizzi is a Open Source full stack previews engine and our platform is available completely free for Lotus (and all open source projects). This will provide maintainers with preview environments of every PR in the cloud, which enables faster iterations and reduces time to merge. You can see the open source repos which are currently using Uffizzi over here
Uffizzi is purpose-built for the task of previewing PRs and it integrates with your workflow to deploy preview environments in the background without any manual steps for maintainers or contributors.
We can go ahead and create an Initial PoC for you right away if you think there is value in this proposal.
Describe the bug
CSRF token verification fails when trying to login for the first time.
To Reproduce
Eventually, event ingestion is going to be the bottleneck of our system. We are going to need some sort of event streaming database, a way of asynchronously processing requests, maybe an endpoint written in a different language. We want to architect the system intentionally and thoughtfully before starting to build.
Is your feature request related to a problem? Please describe.
Need better linting and auto formatting for any push.
Describe the solution you'd like
Do this for all our backend folder
Install ruff as our linter and run it everytime we push to a branch that will merge to main similar to our tests.
+
Add a black autoformatter whenever anything is pushed to main as a pre-commit action.
Describe alternatives you've considered
Potentially pylint but I think we would rather go with the trendy option of ruff.
Is your feature request related to a problem? Please describe.
Customers want to pay through paypal/braintree not just through Stripe
Describe the solution you'd like
Add braintree to our payment processor integrations. Similar to Stripe's integration.
This needs to be able to
This should allow the next PSP integration to be much easier since these steps should be fairly reproducible and are already defined for Stripe in an extensible way in the backend.
The last bit of this will be creating a card in the frontend and connecting either via oauth or more easily (MVP) through a secret api key.
Utilize an ETL framework (Singer, Airbyte) to enable export of our tables including
Is your feature request related to a problem? Please describe.
Users need to be able to signup without already being given an account password.
Describe the solution you'd like
Registration and signup page for both cloud and self-hosted versions
Sentry Issue: PYTHON-DJANGO-CG
UniqueViolation: duplicate key value violates unique constraint "metering_billing_billing_organization_id_billing__09993474_uniq"
DETAIL: Key (organization_id, billing_plan_id)=(1, ) already exists.
File "django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
IntegrityError: duplicate key value violates unique constraint "metering_billing_billing_organization_id_billing__09993474_uniq"
DETAIL: Key (organization_id, billing_plan_id)=(1, ) already exists.
(21 additional frame(s) were not displayed)
...
File "django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
Is your feature request related to a problem? Please describe.
When creating a plan with many components, the components fill up the page rather than existing in a set heigh container that can be scrolled up and down to view.
Describe the solution you'd like
A scrollable container around the components.
Describe the bug
End date doesn't make sense to pass in to "api/subscriptions" post request.
Here is what needs to be fixed:
body for the post request should be:
customer -> customer_id
billing_plan -> plan_id
start_date -> start_date(optional) : on the backend if there is no start date passed in, then automatically make the start date now
end_date -> remove (backend should figure out what the end date is based on the plan)
Is your feature request related to a problem? Please describe.
If an organization doesn't want to use Stripe to Invoice, they should be able to use an invoice generated from Lotus. Right now we have all of the information in a JSON but no physical display.
Describe the solution you'd like
Generate a PDF invoice. I gave attached example styles below, the goal is minimal. This should be executed in the generate invoice function and the invoice should then be stored in S3 if in the cloud or locally otherwise. The url for the invoice pdf should be stored in the invoice table under invoice_pdf
The invoice needs to include the issue date, due date, organization name and address, currency, and invoice number
line items should be able to be grouped and should have dates, descriptions, quantities, and prices
Additional context
We will need to configure the S3 connection in new env variables so that self-hosted solutions can hook up their own S3 buckets with their own AWS accounts.
Is your feature request related to a problem? Please describe.
Our frontend tests don't run automatically in github actions.
Describe the solution you'd like
Update github actions to run our already defined cypress tests on push to a PR that merges into main.
In addition add an auto linter on push to origin.
Describe the bug
When running docker-compose up, the env variables for Postgres are all "lotus", however they are being hardcoded in the docker compose file and if you change these env variables the backend fails with this error:
To Reproduce
Change the env variables to anything besides lotus.
Expected behavior
Changing env variables for postgres before running docker-compose up should create a postgres image with those config variables instead of the hardcoded "lotus" variables.
Screenshots
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.