Urbit Developers
  • Lightning Tutorials

    • Introduction
    • Build a Groups App
    • Build a Chat App
    • Build a Voting App
    • Core Curriculum

      • Hoon School

        • Introduction
        • 1. Hoon Syntax
        • 2. Azimuth (Urbit ID)
        • 3. Gates (Functions)
        • 4. Molds (Types)
        • 5. Cores
        • 6. Trees and Addressing
        • 7. Libraries
        • 8. Testing Code
        • 9. Text Processing I
        • 10. Cores and Doors
        • 11. Data Structures
        • 12. Type Checking
        • 13. Conditional Logic
        • 14. Subject-Oriented Programming
        • 15. Text Processing II
        • 16. Functional Programming
        • 17. Text Processing III
        • 18. Generic and Variant Cores
        • 19. Mathematics
        • App School I

          • Introduction
          • 1. Arvo
          • 2. The Agent Core
          • 3. Imports and Aliases
          • 4. Lifecycle
          • 5. Cards
          • 6. Pokes
          • 7. Structures and Marks
          • 8. Subscriptions
          • 9. Vanes
          • 10. Scries
          • 11. Failure
          • 12. Next Steps
          • Appendix: Types
          • App School II (Full-Stack)

            • Introduction
            • 1. Types
            • 2. Agent
            • 3. JSON
            • 4. Marks
            • 5. Eyre
            • 6. React app setup
            • 7. React app logic
            • 8. Desk and glob
            • 9. Summary
          • Environment Setup
          • Additional Guides

            • Hoon Workbook

              • Competitive Programming
              • ABC Blocks
              • Gleichniszahlenreihe
              • Rhonda Numbers
              • Roman Numerals
              • Solitaire Cipher
              • Luhn Number
              • Water Towers
              • App Workbook

                • Building a CLI App
                • Debugging Wrapper
                • Host a Website
                • Serving a JS Game
                • Ship Monitoring
                • Styled Text
                • Threads

                  • Fundamentals
                  • Bind
                  • Input
                  • Output
                  • Summary
                • Aqua Tests
                • Remote Scry
                • Command-Line Apps
                • HTTP API
                • Eyre noun channels
                • JSON
                • Generators
                • Parsing Text
                • Sail (HTML)
                • Udon (Markdown-esque)
                • Software Distribution
                • Strings
                • Unit Tests
                • Vases
                Urbit Developers
                • Lightning Tutorials

                  • Introduction
                  • Build a Groups App
                  • Build a Chat App
                  • Build a Voting App
                  • Core Curriculum

                    • Hoon School

                      • Introduction
                      • 1. Hoon Syntax
                      • 2. Azimuth (Urbit ID)
                      • 3. Gates (Functions)
                      • 4. Molds (Types)
                      • 5. Cores
                      • 6. Trees and Addressing
                      • 7. Libraries
                      • 8. Testing Code
                      • 9. Text Processing I
                      • 10. Cores and Doors
                      • 11. Data Structures
                      • 12. Type Checking
                      • 13. Conditional Logic
                      • 14. Subject-Oriented Programming
                      • 15. Text Processing II
                      • 16. Functional Programming
                      • 17. Text Processing III
                      • 18. Generic and Variant Cores
                      • 19. Mathematics
                      • App School I

                        • Introduction
                        • 1. Arvo
                        • 2. The Agent Core
                        • 3. Imports and Aliases
                        • 4. Lifecycle
                        • 5. Cards
                        • 6. Pokes
                        • 7. Structures and Marks
                        • 8. Subscriptions
                        • 9. Vanes
                        • 10. Scries
                        • 11. Failure
                        • 12. Next Steps
                        • Appendix: Types
                        • App School II (Full-Stack)

                          • Introduction
                          • 1. Types
                          • 2. Agent
                          • 3. JSON
                          • 4. Marks
                          • 5. Eyre
                          • 6. React app setup
                          • 7. React app logic
                          • 8. Desk and glob
                          • 9. Summary
                        • Environment Setup
                        • Additional Guides

                          • Hoon Workbook

                            • Competitive Programming
                            • ABC Blocks
                            • Gleichniszahlenreihe
                            • Rhonda Numbers
                            • Roman Numerals
                            • Solitaire Cipher
                            • Luhn Number
                            • Water Towers
                            • App Workbook

                              • Building a CLI App
                              • Debugging Wrapper
                              • Host a Website
                              • Serving a JS Game
                              • Ship Monitoring
                              • Styled Text
                              • Threads

                                • Fundamentals
                                • Bind
                                • Input
                                • Output
                                • Summary
                              • Aqua Tests
                              • Remote Scry
                              • Command-Line Apps
                              • HTTP API
                              • Eyre noun channels
                              • JSON
                              • Generators
                              • Parsing Text
                              • Sail (HTML)
                              • Udon (Markdown-esque)
                              • Software Distribution
                              • Strings
                              • Unit Tests
                              • Vases
                              Guides/Core Curriculum/App School II (Full-Stack)

                              9. Summary

                              That's it! We've built our agent and React front-end, put together a desk and published it. We hope this walkthrough has helped you see how all the pieces for together for building and distributing an app in Urbit.

                              The reference material for each section of this walkthrough is listed below, the source code for our app is available here, and it can be installed from ~pocwet/journal.

                              In this guide we've built a separate React app for the front-end, but Hoon also has a native domain-specific language for composing HTML structures called Sail. Sail allows you to compose a front-end inside a Gall agent and serve it directly. See the Sail guide for details.

                              Along with @urbit/http-api, there's also the @urbit/api NPM package, which contains a large number of helpful functions for dealing with Hoon data types and interacting with a number of agents - particularly those used by the Groups app. Its source code is available here.

                              Reference material

                              Here is the reference material for each section of this walkthrough.

                              Types

                              • App School /sur section - This section of App School covers writing a /sur structure library for an agent.

                              • Ordered map functions in zuse.hoon - This section of zuse.hoon contains all the functions for working with mops, and is well commented.

                              Agent

                              • App School I - App School I covers all aspects of writing Gall agents in detail.

                              • Ordered map functions in zuse.hoon - This section of zuse.hoon contains all the functions for working with mops, and is well commented.

                              • /lib/agentio.hoon - The agentio library in the %base desk contains a large number of useful functions which making writing Gall agents easier.

                              JSON

                              • The JSON Guide - The stand-alone JSON guide covers JSON encoding/decoding in great detail.

                              • The Zuse Reference - The zuse.hoon reference documents all JSON-related functions in detail.

                              • ++enjs:format reference - This section of the zuse.hoon documentation covers all JSON encoding functions.

                              • ++dejs:format reference - This section of the zuse.hoon documentation covers all JSON decoding functions.

                              • Eyre Overview - This section of the Eyre vane documentation goes over the basic features of the Eyre vane.

                              Marks

                              • The Marks section of the Clay documentation - This section of the Clay vane documentation covers mark files comprehensively.

                              • The mark file section of the Gall Guide - This part of App School goes through the basics of mark files.

                              • The JSON Guide - This also covers writing mark files to convert to/from JSON.

                              Eyre

                              • The Eyre vane documentation - This section of the vane docs covers all aspects of Eyre.

                              • Eyre External API Reference - This section of the Eyre documentation contains reference material for Eyre's external API.

                              • The Eyre Guide - This section of the Eyre documentation walks through using Eyre's external API at a low level (using curl).

                              React App Setup and Logic

                              • HTTP API Guide - Reference documentation for @urbit/http-api.

                              • React app source code - The source code for the Journal app UI.

                              • @urbit/http-api source code - The source code for the @urbit/http-api NPM package.

                              Desk and Glob

                              • App publishing/distribution docs - Documentation covering third party desk composition, publishing and distribution.

                              • Glob documentation - Comprehensive documentation of handling front-end files.

                              • Desk publishing guide - A step-by-step guide to creating and publishing a desk.

                              <-

                              8. Desk and glob

                              Edit this page on GitHub

                              Last modified August 30, 2023