Exploring Free Cryptographic Clearnet Self Hosted User Spaces.

Press F for fullscreen & S to see the speaker notes & esc for all slides overview

Disclaimer: no financial advice, no tax advice, no production code advice

Graphics Design: @NoGood

Good Morning

These slides are available on
https://slides.cypher.space

Pub Key

npub1equrmqway3qxw3dkssymusxkwgwrqypfgeqx0lx9pgjam7gnj4ysaqhkj6

Agenda

  1. Cypher.Space Scope
  2. Template Scope
  3. What is a Flatfile CMS
  4. How to get started
  5. Project Setup
  6. Some Code & Repo
  7. Project Layering
  8. Open Nostr Admin
  9. Open Finance
  10. Shop Order Process
  11. Next Steps
  12. Closing Remarks
  13. FAQ

Cypher.Space Scope

Create tools, templates and provide infrastructure for building pleb friendly webapplications based on bitcoin, lightning, nostr that can be hosted with no monthly costs, balancing non/custodial tradeoffs.

Development Stack

Webtech is the path with least gatekeepers even PWA's are currently on and under 🔥 (again).

JavaScript 🤮 the current landscape of API and free cloud (self) hosting opportunities

Cypher Template #1 Scope

A Free Bitcoin Only Wordpress & Shopify Alternative, Selfhost for free with Local/Nostr Admin Panel.

Compete with functionality provided by Shopify, Wordpress/woocommerce, Squarespace,...

What is a Flat File CMS ?

A type of Content Management System that stores content in simple files rather than in a database.

“ Labeling a Flat File CMS as "ancient technology" might be misleading, even though its foundational principle—storing data in simple, non-relational files—harks back to the early days of computing. The concept itself is indeed old, but the modern implementations of Flat File CMS are anything but outdated. They incorporate contemporary web development practices, design philosophies, and technologies, making them suitable for various modern use cases.” - Chat GPT-4

Pro's to a flat file setup ?

Simplicity, Performance, Portability, Security, Version Control

🙉 More Pleb Friendly

Con's to a flat file setup ?

scalability issues for very large websites or those with high concurrency demands, and the potential lack of dynamic features* that are easier to implement with a database-driven approach.

* Nostr Injection

🙈 Out of Pleb scope

Small History

Early Web Development (Early 1990s to Early 2000s)

Rise of Database-Driven CMS (Early to Mid-2000s)

Resurgence with Modern Web Dev Trends (2010s)

Jamstack and Headless CMS (Late 2010s to Present): The popularity of flat file systems has also been bolstered by the broader adoption of Jamstack architecture and headless CMS platforms. These approaches prioritize pre-rendered pages and microservices over traditional monolithic, database-driven architectures. While not all Jamstack or headless CMS solutions use flat files exclusively, the philosophy aligning with simplicity, performance, and security complements the flat file approach, maintaining its relevance in the web development ecosystem.

What is Nostr?

Notes and Other Stuff Transmitted by Relays

My own short bitcoin parallel:

you create a key pair just like a bitcoin wallet
Your public key is your Identity you can share with others
You use your private key to sign notes and other things and submit them to public relays or your own.
Nostr Clients: Amethyst, Damus, Primal, Coracle, Nostrudle, Nostur, Snort, ....

What are NIPS 🫣 ?

NIPs stand for Nostr Improvement Proposals. These are proposals made by members of the Nostr community that suggest improvements, modifications, or features to be added to the Nostr protocol. Similar to BIPs (Bitcoin Improvement Proposals) in the Bitcoin ecosystem or EIPs (Ethereum Improvement Proposals) in the Ethereum ecosystem, NIPs serve as a standardized way for individuals to propose and document enhancements to Nostr.

How to get started

Step 1: Install NodeJS LTS

Download from https://nodejs.org
minimim required version 18.0.0

Step 2: Install Cypher Template

Open a terminal or console on your local machine
You can test your NodeJS version by running: node -v
Install the template by running: npx create-cypher Or fork the github repository

DEMO TIME 🤞

Current Project Setup

  1. CLI ( initiation & integration )
  2. Template
  3. Local Admin UI
  4. Nostr Client

Some Code & Repo

/config/setup.json



						
						"version": "1.0.1 Beta",
						"name":"Cypher.Space",
						"tagline":"Bitcoin Standard First",

						...
						"logodarkimage":"logo-dark.png",
						"multilang":true,
						"defaultlanguage":"en",

						....
						"basecurrency":"btc",
						"testnet":"false",
						"btcadress":"bc1q5j9h5dfr6gctjc0tl9gaz02f0p0qs7ecdlcat8",
						"lnurl":"[email protected]",
						"albytoken":"MDQ3YZNJYJYTYMFLMI0ZODDHLTK0ODMTNTHJZTYYMZJLZDBH",
						"orderwebhook":"https://discord.com/api/webhooks/1210994387660705923/ndfQLtY2aEXIV7Cjui9Hna3_dXEN2m_IjRTLr8M-H0OQIAKZ9N8VqicoeAz-GB1kZaCG",
						"nostradmin":"npub1nkmta4dmsa7pj25762qxa6yqxvrhzn7ug0gz5frp9g7p3jdscnhsu049fn",
						"nostrrelay":"wss://relay.damus.io",



		

Normal Page

/content (examplepage.md)
route domainname.com/examplepage



			
---
title: 'Cypher - Sovereign Webstack Building Space'
layout: default
description: 'Building Bitcoin, Lightning & Nostr PWA frameworks to build faster & better.'

---

:Example

::ContainerProse
# Extra Markdown Content
::


Blog Page

/content/articles



			
			---
			title: "Cypher - Sovereign Webstack Building Space"
			layout: default
			description: "This is a more robust front matter blog post example setup"
			featured: true
			href: "/articles/advanced-post"
			article: "Advanced Post"
			imagelink: "/project/blog-img/advanced-post.jpg"
			date: "Jan 7, 2024"
			datetime: "2024-01-07"
			categorytitle: "Payment"
			authorname: "Cypher Space"
			authorrole: "Bitcoin Mass Adoption"
			authorhref: "https://coracle.social/npub1nkmta4dmsa7pj25762qxa6yqxvrhzn7ug0gz5frp9g7p3jdscnhsu049fn"
			authorimageUrl: "https://imgproxy.coracle.social/x/s:280:280/aHR0cHM6Ly9wZnAubm9zdHIuYnVpbGQvNmQ1NzA1MDNjMGI3NWJlNzU5NDYxYWQ0ODUwMzk4YTMzOGZkNTFkOGU2MzEzMTRjODczMWMwZDNlMWI0ZGViNy5wbmc="
			
			image:
			  src: 'https://cypher.space/project/blog-img/advanced-post.jpg'
			  alt: 'An image showcasing My Page.'
			  width: 1200
			  height: 630
			head:
			  meta:
				- name: 'keywords'
				  content: 'bitcoin, lightning, webapps'
				- name: 'robots'
				  content: 'index, follow'
				- name: 'author'
				  content: 'Cypher.space'
				- name: 'copyright'
				  content: '© 2024 cypher'
			
			---


FUNCTIONALITY LAYERING

Base layer -> Flat File

Second layer -> Nostr

Should be able to run on both or together

For the project scope the nostr admin should be simple and small and just to support a basic bitcoin shop in first place.

Open Nostr Admin (WIP)

🛒 Shop 🛍️

Add NIP-32 for labeling things in nostr #532
Nostr Market (LNBits) NIP-15, NIP-19, NIP-04, NIP-33

📰 Blog 🗞️

Long Form Content ( Blog Articles )

NIP-23

NIP-23 example

This NIP defines kind:30023 (a parameterized replaceable event) for long-form text content, generally referred to as "articles" or "blog posts". kind:30024 has the same structure as kind:30023 and is used to save long form drafts. "Social" clients that deal primarily with kind:1 notes should not be expected to implement this NIP.

Format

The .content of these events should be a string text in Markdown syntax. To maximize compatibility and readability between different clients and devices, any client that is creating long form notes: MUST NOT hard line-break paragraphs of text, such as arbitrary line breaks at 80 column boundaries. MUST NOT support adding HTML to Markdown.

Editability

These articles are meant to be editable, so they should make use of the parameterized replaceability feature and include a d tag with an identifier for the article. Clients should take care to only publish and read these events from relays that implement that. If they don't do that they should also take care to hide old versions of the same article they may receive.

Example Event



						
                     {
                        "kind": 30023,
                        "created_at": 1675642635,
                        "content": "Lorem [ipsum][nostr:nevent1qqst8cujky046negxgwwm5ynqwn53t8aqjr6afd8g59nfqwxpdhylpcpzamhxue69uhhyetvv9ujuetcv9khqmr99e3k7mg8arnc9] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\nRead more at nostr:naddr1qqzkjurnw4ksz9thwden5te0wfjkccte9ehx7um5wghx7un8qgs2d90kkcq3nk2jry62dyf50k0h36rhpdtd594my40w9pkal876jxgrqsqqqa28pccpzu.",
                        "tags": [
                          ["d", "lorem-ipsum"],
                          ["title", "Lorem Ipsum"],
                          ["published_at", "1296962229"],
                          ["t", "placeholder"],
                          ["e", "b3e392b11f5d4f28321cedd09303a748acfd0487aea5a7450b3481c60b6e4f87", "wss://relay.example.com"],
                          ["a", "30023:a695f6b60119d9521934a691347d9f78e8770b56da16bb255ee286ddf9fda919:ipsum", "wss://relay.nostr.org"]
                        ],
                        "pubkey": "...",
                        "id": "..."
                      }


		

"Self Hosting" / Deployment

Currently its easy to deploy to Cloudflare, Vercel, Google Cloud,...



                  npm run build 


   

Future maybe split over relays Chunkey Monkey / Bloom drive

Option in Nuxt to build to static files

Open Finance
(🏦👀 experimental 💰🌍)

Bitcoin is privacy for the individual and ( can be ) transparency for a company ( API )

Shop Order Process

Split and choose ( Order First or The Payment First ? )

Transaction ID that gets generated ClientSide matching both Order & Payment

Webhook ( Discord, Matrix, Telegram )

Stock Inventory not possible in flat file land*
*nostr dynamic part

The Expanse (Next Stuff)

My.cypher.space (Nostr Template)

NextJS version (Probably way more popular 😂)

Nostr for customer support

Closing Remarks

We need more individuals being able to stack sats, especially in emerging economies . A free template like this might help them setup shop, also not all shops have major sales 🫡

https://cypher.space

What do I have against databases ?

So first of … fun dev constraint, Second … Databases are hard and often cost money.. management is difficult…, so remember who your building for.

The choice of NuxtJS vs NextJs vs WhateverJS

💯 Community VueJS -> NuxtJS 🇪🇺 🇫🇷 (React = Facebook)
Newer JS Frameworks once seasoned might be an option in the future

Will this be turned into a company ?

No, it cannot be a for profit company cause the product essentially needs to stay free to remove the barrier to entry.
A support company around it might be possible but not the purpose (RMS)

Current custodial points / privacy ?

Current Friendlyness + Current landscape, always try to find non-custododial/centralised implementations, offloading responsibility