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

Write example app implementation #27

Open
cjslep opened this issue Oct 23, 2019 · 10 comments
Open

Write example app implementation #27

cjslep opened this issue Oct 23, 2019 · 10 comments
Assignees
Labels
feature request New request for novel functionality
Milestone

Comments

@cjslep
Copy link
Member

cjslep commented Oct 23, 2019

Already occurring, but now tracked in this issue:

@cjslep cjslep added the feature request New request for novel functionality label Oct 23, 2019
@cjslep cjslep added this to the v1.0.0 milestone Oct 23, 2019
@cjslep cjslep self-assigned this Oct 23, 2019
@ppwfx
Copy link

ppwfx commented Feb 1, 2020

Hey @cjslep,

what's the state of the example app? Is there anything that's blocking you?

Other than that, enjoy your weekend :)

@cjslep
Copy link
Member Author

cjslep commented Feb 5, 2020

Hi, I've written an update here: https://cjslep.com/c/blog/go-fed-2020

I am the blocker with not enough free time and too many things to focus on.

@cjslep
Copy link
Member Author

cjslep commented Nov 7, 2020

Per the recent major refactor the example application is now majorly broken. However, there's going to be numerous design-type issues that need to be addressed before the example app can be fixed.

@cjslep
Copy link
Member Author

cjslep commented Nov 29, 2020

I've been thinking of changing the example app to be a very minimal thin layer of an HTML renderer on top of the base apcore, so that folks can readily and easily use it as the basis for an actual application.

And I do mean minimal, was thinking of a cheeky name like "bland" for the example app (and go for a brutalist minimal CSS to go with it). Want to make it as straightforward to play with as possible.

@cjslep cjslep self-assigned this Dec 8, 2020
@cjslep
Copy link
Member Author

cjslep commented Dec 8, 2020

I'm taking this issue now -- I believe the library is of sufficient substance as to permit iterating on several different aspects while using a concrete exemplary use-case at hand. Note that a lot of the OAuth2 tasks are still available, and that's by design -- I believe there are some publicly available tools that can evaluate peer OAuth2 servers and aid in diagnosing their implementation. I believe that will be critical, because I am not entirely confident in the current state of the OAuth2 library I am using.

@cjslep
Copy link
Member Author

cjslep commented Dec 11, 2020

b9b817a makes the example application compile.

Though due to #46 that may change in the future.

This let me run the example configure, example init-db, and example init-admin actions and uncover issues within the software and fix ~9 issues.

Next may be an iteration on the app.Application interface before I attempt to keep fleshing out the remaining serving aspect of the example application, and from there it will be figuring out how to provide more features to the app.Application implementations.

@cjslep
Copy link
Member Author

cjslep commented Dec 13, 2020

I've iterated on the app.Application, so I'm back to hammering out any bugs with example serve.

I ran into a problem with using v1.7.4 of gorilla/mux where their Schema matching was completely broken and would never match, so I had to upgrade to v1.8.0.

I've also "re"-remembered an improper assumption I had buried in go-fed/activity: go-fed/activity#143

Which is not a problem for serving on a production server using https, only when attempting to serve with a -dev flag which uses http.

@cjslep
Copy link
Member Author

cjslep commented Dec 13, 2020

With the changes to go-fed/activity, I'm testing hitting some of the framework-provided endpoints. Here's the state from quick testing, as further work to do (these are all GET requests):

  • /user/{id} successfully returns the actor's JSON-LD payload
  • /user/{id}/inbox has a nil dereference issue
  • /user/{id}/outbox has a nil dereference issue
  • /user/{id}/followers incorrectly returns the actor's JSON-LD payload
  • /user/{id}/following incorrectly returns the actor's JSON-LD payload
  • /user/{id}/liked incorrectly returns the actor's JSON-LD payload
  • /actors/instance is not yet mapped
  • /actors/instance/inbox has a nil dereference issue
  • /actors/instance/outbox has a nil dereference issue

I believe the nil dereference issues are related to the incomplete OAuth2 work (see sibling issues like #38) and the rest are more than likely the mux pattern matchers needing some tweaking.

@cjslep
Copy link
Member Author

cjslep commented Dec 15, 2020

All of the above endpoints now successfully serve ActivityStreams data for GET http requests, their associated issues are resolved. Unfortunately, the POST side will only be easier to test once the rest of the example app is fleshed out.

Next up for the example application is ensuring the login and authentication aspects work correctly.

@cjslep
Copy link
Member Author

cjslep commented Dec 22, 2020

Status update: as of yesterday, I got the example app to successfully federate locally (over loopback). It can:

  • render latest public notes
  • when logged in, render latest public and visible-to-user notes
  • list actor public inbox/outbox/follower/following IRIs
  • create a note

Which isn't too much. It's going to be pretty bare bones, but these are the remaining larger points I'd like to hit:

  • A page to view Follow requests and, optionally, approve them
  • Checkbox to +CC followers when creating a note
  • Page to view preferences
  • A way to update preferences
  • Page to view personal policies (blocks)
  • A way to update personal policies (blocks)
  • Admin dashboard (resolutions, instance policies)
  • A way to update admin (instance policies, ban local user, ban federated note, ban local note)

There will be a lot of follow-on work to smoothen out some of the API pain points once the above is done.

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

No branches or pull requests

2 participants