import { useState, useEffect } from 'react'
import { motion } from 'framer-motion'
import { BrowserRouter as Router, Routes, Route, Link, useNavigate } from 'react-router-dom'
import './App.css'
import { Button } from './components/ui/button'
import BlogPage from './blog/BlogPage'
import BlogPost from './blog/BlogPost'
import mushroomImage from './assets/mushroom.png'
import RegistrationTerminal from './components/RegistrationTerminal'
function App() {
const [showTerminal, setShowTerminal] = useState(false)
const [networkNodes, setNetworkNodes] = useState([])
const [showConfirmation, setShowConfirmation] = useState(false)
// Terminal typing effect
const [terminalText, setTerminalText] = useState('')
const terminalCommands = [
'> connecting to mycelium network...',
'> establishing secure p2p connection...',
'> welcome to the digital frontier',
]
useEffect(() => {
let typingTimer
if (showTerminal) {
// Reset terminal text when opening
setTerminalText('')
let index = 0
let charIndex = 0
let isDeleting = false
const type = () => {
if (index < terminalCommands.length) {
if (!isDeleting && charIndex <= terminalCommands[index].length) {
setTerminalText(terminalCommands[index].substring(0, charIndex))
charIndex++
typingTimer = setTimeout(type, 20)
} else if (isDeleting && charIndex >= 0) {
setTerminalText(terminalCommands[index].substring(0, charIndex))
charIndex--
typingTimer = setTimeout(type, 10)
} else {
isDeleting = !isDeleting
if (!isDeleting) {
index++
typingTimer = setTimeout(type, 500)
} else {
typingTimer = setTimeout(type, 300)
}
}
} else {
// After the last prompt, show the confirmation dialog
setTerminalText('> mycelial network patterns')
setTimeout(() => {
setShowTerminal(false)
setShowConfirmation(true)
}, 1000)
}
}
// Start the typing effect
typingTimer = setTimeout(type, 30)
// Clean up the timer when component unmounts or showTerminal changes
return () => clearTimeout(typingTimer)
} else {
// Reset terminal state when closing
setTerminalText('')
}
}, [showTerminal])
// Generate network nodes
useEffect(() => {
const generateNodes = () => {
const nodes = []
const nodeCount = 15
for (let i = 0; i < nodeCount; i++) {
nodes.push({
id: i,
x: Math.random() * 100,
y: Math.random() * 100,
size: Math.random() * 20 + 10,
pulseSpeed: Math.random() * 2 + 1
})
}
setNetworkNodes(nodes)
}
generateNodes()
}, [])
return (
{'>'} Do you want to register for the Mycelium Network?
{'>'} Registration is required to access the network.
We are not just a network — we are a virtual nation for the digital age, where each member operates as their own sovereign entity within a recognized legal framework.
By combining resilient peer-to-peer infrastructure with cooperative governance, we enable individuals to thrive as entrepreneurs, creators, and collaborators while strengthening the global digital economy.
Building the future together, legally and transparently.
Decentralized P2P cloud infrastructure with end-to-end encryption, AI integration, unbreakable network and distributed trust layer.
Every member operates as their own legal entity with a flat 5% tax rate in our digital free zone. With integrated legal dispute resolution also for AI agents.
Sovereign web infrastructure with unbreakable websites, Personal AI Agents, Web3 integration, and marketplace for frictionless global trade.
Insights and updates from our digital nation
An introduction to the Mycelium Society and our vision for a sovereign digital nation.
Read more →An exploration of the decentralized infrastructure powering our digital nation.
Read more →Join visionary entrepreneurs and creators building the next generation of digital infrastructure. Become a founding member of our sovereign digital nation.
Welcome to the Mycelium Network. Your digital identity has been created.