Skip to content

thalperi/exopost

Repository files navigation

Exopost - Decentralized Social Media Platform

A decentralized, open-source platform for social media, news publication, private messaging, and email. Built on Peergos and IPFS, Exopost empowers users to create and share locally-produced, AI-assisted multimedia content with complete ownership and control over their data.

🌟 Features

Core Features (Stage 1: MVP)

  • Self-Sovereign Identity: Your identity is controlled by your cryptographic keypair
  • Decentralized Storage: All content stored on IPFS through Peergos
  • Account Management: Local account persistence with secure switching
  • User Profiles: Customizable profiles with avatars and display names
  • Social Graph: Follow/unfollow system with privacy controls

Planned Features

  • AI-Assisted Content Creation: Integrate AI agents for research and content generation
  • Content Aggregation: Curate and synthesize information from diverse sources
  • Multilingual Support: Automatic content translation and localization
  • Advanced Analytics: Insights into content performance and audience engagement

🏗️ Architecture

  • Frontend: Nuxt 3 with TypeScript
  • Styling: CSS Grid-first approach with custom design system
  • Backend: Peergos (Java 24) for decentralized storage and identity
  • Network: IPFS for distributed content delivery
  • Package Manager: npm (official)

🚀 Development Setup

Prerequisites

  • Node.js 18+
  • npm
  • Git

Web Development

  1. Clone the repository

    git clone https://github.com/thalperi/exopost.git
    cd exopost
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env
    # Edit .env with your configuration
  4. Start development server

    npm run dev
  5. Open your browser Navigate to http://localhost:3000

Mobile Development 📱

Exopost supports mobile deployment through Capacitor for native Android and iOS apps.

Prerequisites

  • Android Studio (for Android development)
  • Xcode (for iOS development, macOS only)

Mobile Setup

  1. Generate static files

    npm run generate
  2. Sync with mobile platforms

    npx cap sync
  3. Run on mobile device/emulator

    # Android
    npm run android:dev
    
    # iOS
    npm run ios:dev

Building Mobile Apps

# Build Android APK
npm run android:build

# Build iOS app
npm run ios:build

Build for Production

# Generate static files
npm run generate

# Build for server deployment
npm run build

# Preview production build
npm run preview

📁 Project Structure

exopost/
├── assets/css/           # Global styles and CSS variables
├── components/           # Vue components
│   ├── AppLogo.vue
│   ├── AppNavigation.vue
│   ├── AppUserMenu.vue
│   ├── AppSidebar.vue
│   ├── AppFooter.vue
│   ├── UserAvatar.vue
│   └── Icon.vue
├── composables/          # Reusable logic
│   ├── useAuth.ts        # Authentication management
│   └── usePeergos.ts     # Peergos API client
├── layouts/              # Page layouts
├── middleware/           # Route middleware
├── pages/                # File-based routing
│   └── index.vue         # Home page
├── plugins/              # Nuxt plugins
├── public/               # Static assets
├── server/               # Server-side code
├── stores/               # State management
├── types/                # TypeScript definitions
│   └── peergos.ts        # Peergos type definitions
├── utils/                # Utility functions
├── app.vue               # Root component
├── nuxt.config.ts        # Nuxt configuration
└── package.json          # Dependencies and scripts

🎨 Design System

CSS Grid Priority

Following the project's development principles, layouts prioritize CSS Grid over Flexbox:

/* Primary layout approach */
.layout {
  display: grid;
  grid-template-areas: "header" "main" "footer";
  grid-template-rows: auto 1fr auto;
}

/* Flexbox only when grid is not suitable */
.flex-when-needed {
  display: flex;
  align-items: center;
}

Color System

  • Primary: #2563eb (Blue)
  • Secondary: #7c3aed (Purple)
  • Accent: #f59e0b (Amber)
  • Success: #10b981 (Green)
  • Error: #ef4444 (Red)

Typography

  • Base Font: System font stack for optimal performance
  • Headings: Semibold to bold weights
  • Body: Regular weight with 1.6 line height

🔐 Authentication System

Exopost implements self-sovereign identity through Peergos:

Key Features

  • Keypair-based Authentication: No passwords, only cryptographic keys
  • Local Account Persistence: Accounts saved securely on device
  • Account Switching: One-click switching between multiple accounts
  • White-labeled Experience: Peergos functionality under Exopost branding

Usage Example

const { signIn, signUp, signOut, currentUser } = useAuth()

// Sign in with username and password (generates keypair)
await signIn({ username: 'alice', password: 'secure-password' })

// Access current user
console.log(currentUser.value?.username)

// Sign out
await signOut()

🌐 Peergos Integration

Network Status

Monitor connection and peer information:

const { networkStatus, isConnected, storageQuota } = usePeergos()

// Check connection status
console.log(isConnected.value) // true/false
console.log(networkStatus.value.peers) // number of connected peers

File Operations

const { uploadFile, downloadFile, listFiles } = usePeergos()

// Upload a file
await uploadFile(file, '/documents/my-file.pdf')

// List directory contents
const files = await listFiles('/documents')

🧪 Development Principles

TypeScript Strictness

  • Strict mode enabled in tsconfig.json
  • No implicit any types allowed
  • Comprehensive type definitions for all APIs

CSS Guidelines

  • CSS Grid prioritized over Flexbox
  • No !important unless explicitly approved
  • Custom properties for consistent theming
  • Mobile-first responsive design

Code Quality

  • ESLint configuration for consistency
  • Prettier for code formatting
  • Type checking in CI/CD pipeline

🚀 Deployment

Web Deployment

Static Site Generation

npm run generate

Generates a static site that can be deployed to any web server or CDN.

Server-Side Rendering

npm run build
npm run preview

Builds for server deployment with SSR capabilities.

Mobile Deployment

Exopost uses Capacitor for native mobile app deployment with full Peergos compatibility.

Mobile Architecture

  • Hybrid App: Web app wrapped in native container
  • Single Codebase: Same code runs on web, Android, and iOS
  • Peergos Integration: HTTP-based API works perfectly in mobile WebView
  • Native Features: Access device capabilities through Capacitor plugins

Mobile Build Process

# Complete mobile build
npm run mobile:build

# Open in native IDEs
npx cap open android    # Android Studio
npx cap open ios        # Xcode

Distribution

  • Android: Build APK/AAB through Android Studio
  • iOS: Build IPA through Xcode
  • Web: Deploy static files to any hosting

Environment Configuration

Set these environment variables for production:

PEERGOS_API_URL=https://your-peergos-instance.com
NUXT_PUBLIC_APP_VERSION=1.0.0

📚 Documentation

🤝 Contributing

Exopost is open source and welcomes contributions!

Getting Started

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes following the development principles
  4. Add tests for new functionality
  5. Submit a pull request

Development Guidelines

  • Follow TypeScript strict mode
  • Prioritize CSS Grid in layouts
  • Write comprehensive tests
  • Update documentation for new features
  • Ensure mobile responsiveness

Code Style

  • Use Prettier for formatting
  • Follow ESLint configuration
  • Write descriptive commit messages
  • Add JSDoc comments for public APIs

📄 License

This project is released under the Unlicense license, dedicating it to the public domain. You are free to use, modify, and distribute this software for any purpose without restriction.

🙏 Acknowledgments

  • Peergos - For the decentralized storage foundation
  • IPFS - For distributed file system technology
  • Nuxt.js - For the excellent Vue.js framework
  • Vue.js - For the reactive UI framework

📞 Support


Built with ❤️ for a decentralized future.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published