Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
1cda0d7
feat(dashboard): add left rail with connect wallet and swap widget
paolomolo Nov 25, 2025
a75f5af
fix(dashboard): fix visual layout of swap widget in left rail
paolomolo Nov 25, 2025
734f014
feat(dashboard): implement twitter-like sticky scrolling for sidebars
paolomolo Nov 25, 2025
869431c
feat(layout): add multiple layout variants with easy switcher
paolomolo Dec 8, 2025
e0216e6
feat(layout): improve navigation and simplify layout system
paolomolo Dec 8, 2025
e156a43
refactor(layout): implement glass morphism and unified tab styling
paolomolo Dec 8, 2025
0c34f7f
fix(ui): improve post layout and swap widget behavior
paolomolo Dec 8, 2025
c1c9a85
feat(mini-apps): redesign DeFi as mini-apps with landing page
paolomolo Dec 9, 2025
5f9e72f
refactor(layout): move Connect Wallet card to left rail
paolomolo Dec 9, 2025
050d78a
refactor(dashboard): remove hero banner from homepage
paolomolo Dec 9, 2025
9711333
style: reduce border radius for cards and posts
paolomolo Dec 9, 2025
035c395
refactor: move footer section to left rail
paolomolo Dec 9, 2025
70a192b
refactor: use FeedList component in FeedWidget with compact styling
paolomolo Dec 9, 2025
dc9281a
refactor: scale down dashboard trend token list and improve layout
paolomolo Dec 9, 2025
366e6e3
refactor: improve dashboard layout and filter positioning
paolomolo Dec 9, 2025
e316574
feat: improve trends dashboard UI and icons
paolomolo Dec 9, 2025
b145d16
feat: improve trends dashboard and chart styling
paolomolo Dec 9, 2025
7e5f31f
feat(dashboard): convert table header to div with backdrop blur
paolomolo Dec 9, 2025
5ea5f40
fix(dashboard): convert header back to table header for proper alignment
paolomolo Dec 9, 2025
9151aba
fix(dashboard): remove gradient from Trends title and maintain letter…
paolomolo Dec 9, 2025
f88dbbb
feat(ui): make dashboard full width and add holders/price change columns
paolomolo Dec 14, 2025
f8f94cf
fix(ui): show crown on highest market cap token globally
paolomolo Dec 14, 2025
5a62e9a
feat(ui): make mini apps page full width with feed on right rail
paolomolo Dec 14, 2025
f75f508
feat(ui): make right rail width scale on larger screens
paolomolo Dec 14, 2025
e3ead89
feat(ui): wrap mini app pages in cards with feed on right rail
paolomolo Dec 15, 2025
fec5424
refactor(routes): change /defi routes to /apps
paolomolo Dec 15, 2025
43d009a
feat(routes): add comprehensive /defi to /apps redirects
paolomolo Dec 15, 2025
27882f6
Merge remote-tracking branch 'origin/develop' into feature/improved-l…
paolomolo Dec 15, 2025
bef006c
refactor(ui): remove wrapper card from mini-apps landing page
paolomolo Dec 15, 2025
b88fa4d
feat(ui): add browser window-style headers to mini-app pages
paolomolo Dec 15, 2025
f5123a9
feat(mini-apps): implement plugin system for community extensibility
paolomolo Dec 15, 2025
bb3d98a
feat: improve mini app layouts with responsive design and remove fixe…
paolomolo Dec 15, 2025
9341496
fix: fix bridge component loading issue
paolomolo Dec 15, 2025
73e534b
feat: implement iframe-like isolation for mini-apps
paolomolo Dec 15, 2025
728684f
feat: add fixed bottom liquid glass navigation bar
paolomolo Dec 15, 2025
e81ad9d
feat: improve wallet button in bottom navigation
paolomolo Dec 15, 2025
8a9c3a9
refactor: remove temporary layout switcher from Pool component
paolomolo Dec 15, 2025
1c7ae76
feat: show left rail on wide screens for mini-apps and hide logo header
paolomolo Dec 15, 2025
eba3eb4
fix: reduce gap between tab menu and wallet card in left rail
paolomolo Dec 15, 2025
f00b492
fix(ui): match create post item styling with feed items
paolomolo Dec 16, 2025
1dafefa
style(ui): make emoji, gif, and post buttons match feed item button s…
paolomolo Dec 16, 2025
644ef10
fix(mini-apps): ensure apps are shown on first navigation to mini app…
paolomolo Dec 16, 2025
a0fed46
style(ui): add border and padding to create post input field
paolomolo Dec 16, 2025
ea76e7d
fix(wallet): remove connect button hover background
paolomolo Dec 17, 2025
d5ccba3
fix(ui): make address pill green
paolomolo Dec 17, 2025
eecf20f
fix(ui): update colors to use neon-teal for addresses and chain names
paolomolo Dec 17, 2025
0350727
fix(chain-names): improve chain name loading performance and add debu…
paolomolo Dec 17, 2025
8cfeae6
style(trends): improve mobile layout and styling
paolomolo Dec 17, 2025
47b0ba5
fix(trends): fix scrolling and layout issues for dashboard trends and…
paolomolo Dec 18, 2025
bfa2c19
feat(mini-apps): add Suspense boundary for lazy-loaded mini-app compo…
paolomolo Dec 18, 2025
6e57161
perf(frontend): optimize polling intervals and add window focus refresh
paolomolo Dec 22, 2025
038d4fa
perf(feed): optimize network requests on initial load
paolomolo Dec 22, 2025
067f35d
perf(feed): disable refetchOnWindowFocus for social feed queries
paolomolo Dec 22, 2025
a3c7cdf
perf(feed): disable refetchOnWindowFocus for remaining queries
paolomolo Dec 22, 2025
78e76d5
perf(feed): remove expensive descendantCount query
paolomolo Dec 22, 2025
6674ac9
perf(feed): lazy-load tip summaries and reduce pagination aggressiveness
paolomolo Dec 22, 2025
1a8e407
perf(feed): prevent auto-pagination on initial load
paolomolo Dec 22, 2025
a6d217b
fix(feed): allow automatic loading of latest posts after trending
paolomolo Dec 22, 2025
b44d537
fix(feed): limit automatic transition to single fetch
paolomolo Dec 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 233 additions & 0 deletions docs/MINI_APPS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
# Mini-Apps Plugin System

The Superhero platform includes a powerful plugin system that allows community developers to easily create and register their own mini-apps without forking the main repository.

## Overview

Mini-apps are self-contained applications that integrate seamlessly into the Superhero platform. They appear in the `/apps` directory and are automatically listed on the Mini-Apps landing page.

## Quick Start

### 1. Create Your Mini-App Component

Create a React component for your mini-app:

```tsx
// src/features/my-app/MyApp.tsx
import React from 'react';

export default function MyApp() {
return (
<div className="w-full pb-4 md:pb-6">
{/* Your app content */}
<h1>My Custom Mini-App</h1>
</div>
);
}
```

### 2. Register Your Mini-App

Create a plugin file and register your app:

```tsx
// src/features/my-app/plugin.ts
import { lazy } from 'react';
import { registerMiniApp } from '@/features/mini-apps';

registerMiniApp({
metadata: {
id: 'my-app',
name: 'My App',
description: 'A cool mini-app built by the community',
icon: '🚀',
path: '/apps/my-app',
category: 'utility',
gradient: 'from-purple-500 to-pink-500',
author: 'Your Name',
authorUrl: 'https://github.com/yourusername',
version: '1.0.0',
tags: ['utility', 'community'],
},
route: {
path: '/apps/my-app',
component: lazy(() => import('./MyApp')),
},
});
```

### 3. Import Your Plugin

Add your plugin import to the plugins file:

```tsx
// src/features/mini-apps/plugins.ts
import { registerBuiltInMiniApps } from './built-in';
import './my-app/plugin'; // Add this line
```

## Plugin Structure

### Metadata

The `metadata` object defines how your mini-app appears in the UI:

- **id**: Unique identifier (required)
- **name**: Display name (required)
- **description**: Short description shown on the landing page (required)
- **icon**: Emoji string or React component (required)
- **path**: Route path (required, should start with `/apps/`)
- **category**: One of `'trading' | 'bridge' | 'explore' | 'community' | 'utility'` (required)
- **gradient**: Tailwind gradient classes for icon background (required)
- **author**: Your name (optional)
- **authorUrl**: Your GitHub/profile URL (optional)
- **version**: Version string (optional)
- **tags**: Array of tags for filtering (optional)
- **requiresAuth**: Whether the app requires authentication (optional)

### Route Configuration

The `route` object defines how your app is routed:

- **path**: Route path pattern (required)
- **component**: Lazy-loaded React component (required)
- **layout**: Custom layout wrapper (optional, defaults to `SocialLayout`)
- **options**: Additional route options (optional)

## Examples

### Simple Utility App

```tsx
import { lazy } from 'react';
import { registerMiniApp } from '@/features/mini-apps';

registerMiniApp({
metadata: {
id: 'calculator',
name: 'Calculator',
description: 'A simple calculator tool',
icon: '🔢',
path: '/apps/calculator',
category: 'utility',
gradient: 'from-blue-500 to-cyan-500',
author: 'John Doe',
},
route: {
path: '/apps/calculator',
component: lazy(() => import('./Calculator')),
},
});
```

### App with Custom Layout

```tsx
import { lazy } from 'react';
import { registerMiniApp } from '@/features/mini-apps';
import CustomLayout from './CustomLayout';

registerMiniApp({
metadata: {
id: 'custom-app',
name: 'Custom App',
description: 'An app with custom layout',
icon: '⭐',
path: '/apps/custom',
category: 'community',
gradient: 'from-purple-500 to-pink-500',
},
route: {
path: '/apps/custom',
component: lazy(() => import('./CustomApp')),
layout: CustomLayout,
},
});
```

### App with Initialization

```tsx
import { lazy } from 'react';
import { registerMiniApp } from '@/features/mini-apps';

registerMiniApp({
metadata: {
id: 'analytics',
name: 'Analytics',
description: 'Token analytics dashboard',
icon: '📊',
path: '/apps/analytics',
category: 'explore',
gradient: 'from-green-500 to-teal-500',
},
route: {
path: '/apps/analytics',
component: lazy(() => import('./Analytics')),
},
initialize: () => {
// Initialize analytics tracking, etc.
console.log('Analytics app initialized');
},
cleanup: () => {
// Cleanup when app is unregistered
console.log('Analytics app cleaned up');
},
});
```

## Best Practices

1. **Use lazy loading**: Always use `lazy()` for your component imports to enable code splitting
2. **Follow naming conventions**: Use kebab-case for IDs and paths
3. **Provide good descriptions**: Help users understand what your app does
4. **Use appropriate categories**: Choose the category that best fits your app
5. **Add tags**: Tags help users discover your app
6. **Test your routes**: Make sure your route paths don't conflict with existing routes
7. **Handle errors gracefully**: Use error boundaries and proper error handling

## Integration Points

### Using Platform Features

Your mini-app can access platform features through hooks and context:

```tsx
import { useAeSdk } from '@/hooks';
import { useToast } from '@/components/ToastProvider';

export default function MyApp() {
const { activeAccount, sdk } = useAeSdk();
const toast = useToast();

// Use platform features
}
```

### Styling

Use Tailwind CSS classes and follow the platform's design system:

```tsx
<div className="overflow-hidden rounded-xl border border-white/10 bg-white/[0.02] backdrop-blur-xl p-6">
{/* Your content */}
</div>
```

## Community Guidelines

1. **Be respectful**: Don't create apps that harm users or violate terms of service
2. **Open source**: Consider open-sourcing your mini-app for the community
3. **Documentation**: Provide clear documentation for your app
4. **Testing**: Test your app thoroughly before registering
5. **Updates**: Keep your app updated and maintain compatibility

## Questions?

Join our developer community:
- GitHub: https://github.com/superhero-com/superhero
- Discord: [Link to Discord]
- Documentation: [Link to docs]



9 changes: 6 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,23 @@
var theme = saved || (prefersDark ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme', theme);
document.documentElement.classList.add('preload');
// Set immediate baseline colors to avoid initial black flash
// Set immediate baseline colors to avoid initial flash
if (theme === 'dark') {
document.documentElement.style.backgroundColor = '#0a0a0f';
document.documentElement.style.color = '#f8fafc';
document.body.style.backgroundColor = '#0a0a0f';
} else {
document.documentElement.style.backgroundColor = '#fafafa';
document.documentElement.style.color = '#1e293b';
document.body.style.backgroundColor = '#fafafa';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Body style set before body exists in DOM

The inline script in <head> attempts to set document.body.style.backgroundColor (lines 23 and 27), but document.body doesn't exist yet because the body tag hasn't been parsed. This silently fails (caught by try-catch). Additionally, the <body> tag at line 35 hardcodes background-color: #0a0a0f (dark theme color), which means light theme users may briefly see a dark background before the load handler clears it at line 76. The body background styling logic is ineffective.

Additional Locations (1)

Fix in Cursor Fix in Web

}
} catch (e) {}
})();
</script>
<title>Superhero.com – The All‑in‑One Social + Crypto App</title>
<link rel="icon" type="image/svg+xml" href="/src/svg/favicon.svg" />
</head>
<body>
<body style="background-color: #0a0a0f;">
<div id="root"></div>
<script>
// Synchronous runtime configuration injected at container start via envsubst
Expand Down Expand Up @@ -63,14 +65,15 @@
BONDING_CURVE_18_DECIMALS_ADDRESS: '$BONDING_CURVE_18_DECIMALS_ADDRESS',
};
</script>
<script type="module" src="/src/main.tsx"></script>
<script type="module" src="/src/bootstrap.ts"></script>
<script>
// Re-enable transitions after first paint
window.addEventListener('load', function () {
requestAnimationFrame(function () {
document.documentElement.classList.remove('preload');
document.documentElement.style.backgroundColor = '';
document.documentElement.style.color = '';
document.body.style.backgroundColor = '';
});
});
</script>
Expand Down
Loading