Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting started #438

Open
test2a opened this issue Feb 13, 2022 · 3 comments
Open

getting started #438

test2a opened this issue Feb 13, 2022 · 3 comments
Labels

Comments

@test2a
Copy link

test2a commented Feb 13, 2022

hi. call me completly clueless about this but i wanted to use fusio as a backend for my application(browser application). i have 2 major steps.

  1. user registration/login
  2. api proxy and gateway whereby browser extension sends api to my server which proxies to a third party server. the response is sent back to the user with our server doing rate limiting, api calls
  3. monetizing user registration and api calls being made.
    i have tried to get a hang of the documentation but i am perplexed.

i checked the cms demo but i dont understand how it works... my questions are these.

  1. is there a basic demo data that i can import into a server, change the monetization endpoints and get started? do i have to do everything from scratch.?
  2. i am having trouble with docker as well, the documentation says change docker-compose.yml and i did. the login is refusing citing cors
Source map error: Error: request failed with status 404
Resource URL: http://api.browser.website.in:8080/apps/fusio/dist/fusio.min.css
Source Map URL: bootstrap-theme.min.css.map

XHROPTIONShttp://api.fusio.cloud:8080/authorization/token
CORS Failed

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://api.fusio.cloud:8080/authorization/token. (Reason: CORS request did not succeed). Status code: (null).
2
XHRPOSThttp://api.fusio.cloud:8080/authorization/token

basically apioo/fusio-docker#12

anyways, i followed the steps and i have a new error

POSThttp://api.browser.website.in:8080/authorization/token
[[HTTP/1.1 401 Unauthorized 428ms]]()

any ideas? i am using docker so i don't think i should be facing this error but i am.

@chriskapp
Copy link
Member

Hi, no worries, so the CMS demo is basically more an example if you want to use Fusio as an API framework, but I would guess that this is not needed in your case since you only want to use basic features which are already available. Regarding the question about demo data, so in general if you install Fusio i.e. through docker everything should be available, in your case you would need to use the HTTP-Processor action to proxy an request to you internal API like described in s. https://docs.fusio-project.org/docs/bootstrap So we have no demo data but in our latest docker version we have also already included stripe as payment provider so you basically only need to create a "stripe" connection using you key/secret and then you can create a plan which can be purchased at the developer portal by 3rd party developers to access your internal API.

That being said we have just migrated all of our documentation to a new website which also contains a documentation page about the monetization setup s. https://docs.fusio-project.org/docs/use_cases/setup_monetization This also not perfect yet so feel free to provide some feedback where we can improve the documentation.

Regarding the docker login problem, I will respond then at the issue at the docker repo.

@test2a
Copy link
Author

test2a commented Feb 14, 2022

@chriskapp i managed to solve the docker issue so now i am logged into to fusio. i still have a bug that i am unable to download the "developer" in marketplace. "The server encountered an internal error and was unable to complete your request.". i don't know what to do with that so i am leaving it for now.

my question is this. the documentation is "only" explaining what a setting is, maybe that is helpful for people who understand it but i am unable to.

my problem was simple. build an api that registers and logs in users. i have checked the google groups and i found https://groups.google.com/g/fusio/c/LzJvCN88pvU/m/ClmfiyIcBAAJ

which mentions
to check consumer/register
https://demo.fusio-project.org/apps/documentation/#!/api/consumer/register
https://demo.fusio-project.org/system/export/spec-typeschema/*/consumer/register
i put this into a schema tab but now what?

how do i transform this schema into an api that allows to register a user? there are tabs like action,connection, event, routes. where do they play into this schema?

i suppose if we had simple demos of things that can start people with specific stuff, like lets say a simple account registration as well as a login one, then a registration+payment, or for a spa, how to set up a demo website.

i may not need all of these things but i am sure new users would appreciate it

@chriskapp
Copy link
Member

Hey @test2a, great that the login issue is solved. We have just recently migrated all our docs to the https://docs.fusio-project.org/ domain which should now contain all documentation regarding Fusio. We are also planing to create more videos explaining use cases of Fusio.

Regarding your specific problem, you basically need to install the developer app s.
https://demo.fusio-project.org/apps/developer/#!/

which then allows external developers to login and register. Then you can create a plan at the backend which then can be purchased at the developer app by external developers. For this you then also need to setup a payment provider like stripe. Through this a developer receives points which then can be spend on calling protected routes.

Besides the developer app you can of course also use the /consumer/register and /consumer/login endpoints to build your custom app. Regarding the tabs, our documentation basically has a page for every panel s.
https://docs.fusio-project.org/docs/backend/api/

which should explain each panel. But this is of course also still a work in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants