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 (
} /> } /> } /> } />
) } function HomePage({ showTerminal, setShowTerminal, terminalText, networkNodes, showConfirmation, setShowConfirmation }) { const navigate = useNavigate(); const handleConfirmRegistration = () => { setShowConfirmation(false); navigate('/register'); }; const handleCancelRegistration = () => { setShowConfirmation(false); }; return (
{/* Network Nodes Background */}
{networkNodes.map(node => ( ))}
{/* Terminal Overlay */} {showTerminal && (
MYCELIUM NETWORK TERMINAL
{terminalText}
)} {/* Registration Confirmation Dialog */} {showConfirmation && (
MYCELIUM NETWORK CONFIRMATION

{'>'} Do you want to register for the Mycelium Network?

{'>'} Registration is required to access the network.

)} {/* Hero Section */}
Mushroom MYCELIUM SOCIETY
The Digital Frontier. A Virtual Nation for the Digital Age.
{/* Manifesto Section */}

THE MANIFESTO

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.

{/* Core Pillars Section */}
CORE PILLARS

TECHNOLOGY

Decentralized P2P cloud infrastructure with end-to-end encryption, AI integration, unbreakable network and distributed trust layer.

GOVERNANCE

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.

ECONOMY

Sovereign web infrastructure with unbreakable websites, Personal AI Agents, Web3 integration, and marketplace for frictionless global trade.

{/* Blog Section Preview */}

THE FRONTIER JOURNAL

Insights and updates from our digital nation

2025-09-24 • Mycelium Society

Welcome to the Digital Frontier

An introduction to the Mycelium Society and our vision for a sovereign digital nation.

Read more →
2025-09-23 • Tech Team

The Technology Behind Mycelium Society

An exploration of the decentralized infrastructure powering our digital nation.

Read more →
{/* Call to Action */}

READY TO JOIN THE FRONTIER?

Join visionary entrepreneurs and creators building the next generation of digital infrastructure. Become a founding member of our sovereign digital nation.

{/* Footer */}
) } function RegistrationPage() { const [showRegistrationTerminal, setShowRegistrationTerminal] = useState(true) const [registrationSuccess, setRegistrationSuccess] = useState(false) const navigate = useNavigate() const handleRegister = (data) => { // In a real application, you would send this data to your backend // For demonstration purposes, we'll just simulate a successful registration console.log('Registration data:', data) setRegistrationSuccess(true) // In a real app, you might redirect the user or update the app state // For now, we'll just keep the terminal open to show the success message } const handleCloseTerminal = () => { setShowRegistrationTerminal(false) navigate('/') } return (
{/* Additional content could go here if needed */} {registrationSuccess && (

Registration Successful

Welcome to the Mycelium Network. Your digital identity has been created.

)}
) } export default App