You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.0 KiB

  1. # Teacup
  2. ## Routes
  3. ### /
  4. Teacup is a simple app for tracking what you are drinking.
  5. You can post what you're drinking to your own site, or you can post to an account provided by Teacup.
  6. ### /auth/start
  7. Discover IndieAuth + Micropub endpoints.
  8. #### Authorize
  9. If a Micropub endpoint is found, show a message with a button to start the authorization flow.
  10. Also provide a button to create an account in case they don't want to use their own site.
  11. #### Create Account
  12. Show a message and provide a button to create an account.
  13. Starts authentication with indieauth.com using the authenication flow.
  14. ### /auth/callback
  15. Copy from Quill up to line 200.
  16. If a token endpoint is found, get an access token from it.
  17. If no token endpoint is found, verify the code with indieauth.com and create an account for the user.
  18. ### /new
  19. The signed-in view used to post new content.
  20. Show the list of drinks that can be posted.
  21. ### /post
  22. The form submits here. Saves the post in the database, then tries to make a micropub request if necessary. If the micropub request succeeds, updates the post with the canonical URL in the response.
  23. ### /{domain}
  24. Show feed of the user's recent posts. Posts include a link to the canonical URL if appropriate.
  25. ### /{domain}/{entry}
  26. Permalinks for individual entries.
  27. ### /signout
  28. Destroy session.
  29. ## Contributing
  30. By contributing to this project, you agree to irrevocably release your contributions under the same license as this project.
  31. ## Credits
  32. ## License
  33. Copyright 2013 by Aaron Parecki
  34. Licensed under the Apache License, Version 2.0 (the "License");
  35. you may not use this file except in compliance with the License.
  36. You may obtain a copy of the License at
  37. http://www.apache.org/licenses/LICENSE-2.0
  38. Unless required by applicable law or agreed to in writing, software
  39. distributed under the License is distributed on an "AS IS" BASIS,
  40. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  41. See the License for the specific language governing permissions and
  42. limitations under the License.