1. 👽Constellation Book🛸
  2. Journey of the Dream Weaver🔍
  3. Journey of the Dream Weaver
    ❱
    1. Future Has Come
    2. Things About Crypto Punks
    3. What is Blockchain?
    4. What is Ethereum?
    5. What Happened to My Privacy on the Internet?
    6. Bitcoin
  4. Overview of IC📡
  5. Internet Computer
  6. ICP = Web 3.0
  7. Core Protocol⭐
  8. Peer-to-peer Layer
  9. Consensus Layer
  10. Message Routing Layer
  11. Execution Layer
  12. Related Concepts
    ❱
    1. How to Pick the Number of Consensus Committee?
    2. How Does P2P Layer Reduce Malicious Attack?
  13. Chain Key Cryptography🪄
  14. Chain Key
  15. VETKeys
  16. Network Nervous System⚙️
  17. NNS
  18. DAO
  19. Economic Model
  20. Canister🧰
  21. Canister
  22. Motoko
  23. Deploy Your Canister
  24. XRC
  25. Blockchain Web Services🎯
  26. Random Number On Chain
  27. TEE
  28. Internet Identity🔑
  29. Internet Identity
  30. pid
  31. Cryptography in IC🔒
  32. Introduction to Basic Cryptography
  33. Secret Sharing
  34. Threshold BLS Signatures
  35. Hash Algorithm
  36. Developing DApp🌟
  37. Common dfx Commands
  38. Install Development Environment
  39. Getting Started with DApp
  40. Designing DApp
  41. Developing Proton
  42. User Module
  43. Post Module
  44. Feed Module
  45. Fetch Module
  46. Shared Types
  47. Completion!
  48. Glossary
  49. Contributors
  50. References

Book

img

Following the design in the previous article, let's gradually complete the code for Proton.

We can divide Proton into 4 modules.👇

img

Each module corresponds to different functionalities, flexibly combined.

1️⃣
User Module
Manage user relationships and user profiles
1️⃣
typse.mo
Define type aliases
2️⃣
digraph.mo
Directed graph
3️⃣
database.mo
Store user profiles
4️⃣
main.mo
Manage users



2️⃣
Post Module
Store all posts
1️⃣
rootPost.mo
Manage all Buckets
2️⃣
bucket.mo
Store posts



3️⃣
Feed Module
User's own cloud terminal
1️⃣
rootFeed.mo
Create Feed
2️⃣
database.mo
Store modules
3️⃣
feed.mo
User's cloud terminal



4️⃣
Fetch Module
Manage user relationships and user profiles
1️⃣
rootFetch.mo
Manage Fetch Canister
2️⃣
postFetch.mo
Notify posts
3️⃣
likeFetch.mo
Notify likes
4️⃣
commentFetch.mo
Notify comments

img

🫡

img