A customizable Next.js frontend for Hive blockchain communities, featuring snaps (short posts), blog posts, wallet integration, and multiple theme support.
π Live Demo: mycommunity-omega.vercel.app
- Snaps Feed - Twitter-like short posts with media support
- Blog Posts - Long-form content with markdown support
- Multiple Tabs - Filter by community, all posts, or following
- Wallet Integration - View balances, tokens, and transaction history
- Hive Post Previews - Rich preview cards for shared Hive posts
- Theme System - 8 pre-built themes (HiveBR, Nounish, Cannabis, MengΓ£o, Bluesky, Hacker, Forest, Windows95)
- Hive Authentication - Login via Keychain, HiveAuth, Ledger, or PeakVault
- Responsive Design - Mobile-first with full desktop support
- Quick Start
- Deploy to Vercel (No Coding Required)
- Environment Variables
- Customization Guide
- Project Structure
- Contributing
- Node.js 18+ installed
- pnpm, npm, or yarn package manager
- A Hive blockchain account
-
Clone the repository
git clone https://github.com/bgrana75/mycommunity.git cd mycommunity -
Install dependencies
pnpm install # or npm install # or yarn install
-
Set up environment variables
cp .env.local.example .env.local
Edit
.env.localwith your community settings (see Environment Variables) -
Run the development server
pnpm dev # or npm run dev # or yarn dev
-
Open your browser
Navigate to http://localhost:3000
Perfect for community managers who want to deploy without touching code!
- Go to github.com
- Click Sign up in the top right
- Follow the prompts to create your account
- Verify your email address
- Log in to GitHub with your account
- Visit this repository: github.com/bgrana75/mycommunity
- Click the Fork button in the top right corner
- Click Create fork (keep all default settings)
- Wait for GitHub to create your copy (this takes about 10 seconds)
- You now have your own copy at
github.com/YOUR-USERNAME/mycommunity
- Go to vercel.com
- Click Sign Up in the top right
- Choose Continue with GitHub
- Authorize Vercel to access your GitHub account
- Complete your profile (name, etc.)
- From your Vercel dashboard, click Add New Project
- Import your forked repository:
- You'll see a list of your GitHub repositories
- Find
mycommunityand click Import
- Configure your project:
- Project Name: Choose a name (e.g.,
my-hive-community) - Framework Preset: Next.js (should be auto-detected)
- Root Directory:
./(leave as default) - Environment Variables: Click Add and enter these (see detailed explanations below):
NEXT_PUBLIC_THEME=forest NEXT_PUBLIC_HIVE_COMMUNITY_TAG=hive-123456 NEXT_PUBLIC_HIVE_SEARCH_TAG=hive-123456 NEXT_PUBLIC_HIVE_USER=yourusername HIVE_POSTING_KEY=posting_private_key_here_ //used for uploading images
- Project Name: Choose a name (e.g.,
- Click Deploy
- Wait 2-3 minutes for the build to complete
- Your site is live! π
- Vercel will give you a URL like:
my-hive-community.vercel.app - You can add a custom domain later in Vercel settings
When you want to make changes:
-
Edit files on GitHub:
- Go to your forked repository on GitHub
- Navigate to the file you want to edit
- Click the pencil icon (Edit this file)
- Make your changes
- Click Commit changes
-
Automatic deployment:
- Vercel automatically detects changes
- Your site rebuilds in 2-3 minutes
- No need to do anything else!
Create a .env.local file in the root directory with these variables:
What it does: Sets the color scheme and styling of your site
Options: hivebr, nounish, cannabis, mengao, bluesky, hacker, forest, windows95
Example: NEXT_PUBLIC_THEME=hivebr
How to change: Just type one of the theme names above
What it does: Sets which Hive community's posts to show
Format: hive-XXXXXX (6 digits)
Example: NEXT_PUBLIC_HIVE_COMMUNITY_TAG=hive-173115
How to find:
- Go to your community on Hive (e.g., PeakD)
- Look at the URL:
peakd.com/c/hive-173115/created - Copy the
hive-XXXXXXpart
What it does: Tag used for searching/filtering posts
Format: Usually the same as your community tag
Example: NEXT_PUBLIC_HIVE_SEARCH_TAG=hive-173115
Note: Keep this the same as NEXT_PUBLIC_HIVE_COMMUNITY_TAG unless you have a specific reason
What it does: Your Hive username for posting (optional for read-only sites)
Example: NEXT_PUBLIC_HIVE_USER=yourusername
Note: Don't include the @ symbol
What it does: Shows post payouts in your preferred currency instead of HBD/USD
Options: Leave empty for HBD/USD, or use: BRL, EUR, GBP, JPY, AUD, CAD, CHF, CNY, INR
Example: NEXT_PUBLIC_DISPLAY_CURRENCY=BRL (for Brazilian Reals)
Default: Empty (displays as HBD/USD with $ symbol)
Note: Exchange rates are cached for 6 hours to minimize API calls. HBD is treated as $1 USD when no currency is specified.
What it does: needed for signing the image files to upload to hive.blog
Example: HIVE_POSTING_KEY=5JxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQ
Note: Most users don't need this - Keychain handles authentication
# Theme Selection
NEXT_PUBLIC_THEME=hivebr
# Community Settings
NEXT_PUBLIC_HIVE_COMMUNITY_TAG=hive-173115
NEXT_PUBLIC_HIVE_SEARCH_TAG=hive-173115
# Your Hive Username
NEXT_PUBLIC_HIVE_USER=yourusername
HIVE_POSTING_KEY=5Jxxxxxxxxxxxxxxxxxxxxxxxxxxx-
Via Environment Variable (Easiest):
- Update
NEXT_PUBLIC_THEMEin.env.local - Restart your dev server or redeploy
- Update
-
Creating a Custom Theme:
// Create: themes/myTheme.ts import { extendTheme } from '@chakra-ui/react'; export const myTheme = extendTheme({ colors: { background: '#your-color', text: '#your-color', primary: '#your-color', secondary: '#your-color', accent: '#your-color', muted: '#your-color', border: '#your-color', }, // ... more customization });
Then add it to
app/providers.tsx:import { myTheme } from '@/themes/myTheme' const themeMap = { // ... existing themes myTheme: myTheme, }
Update these in .env.local:
NEXT_PUBLIC_HIVE_COMMUNITY_TAG- Your community's tagNEXT_PUBLIC_HIVE_SEARCH_TAG- Same as above (usually)
The community avatar is automatically fetched from the Hive blockchain using your community tag. To change it, update your community's profile image on Hive.
mycommunity/
βββ app/ # Next.js 14 app directory
β βββ layout.tsx # Root layout with providers
β βββ page.tsx # Home page (snaps feed)
β βββ blog/ # Blog posts pages
β βββ compose/ # Create post page
β βββ [...slug]/ # Dynamic routes
βββ components/ # React components
β βββ homepage/ # Feed, snaps, composer
β βββ blog/ # Blog post components
β βββ profile/ # User profile pages
β βββ wallet/ # Wallet & transactions
β βββ layout/ # Header, sidebar, navigation
β βββ shared/ # Reusable components
βββ hooks/ # Custom React hooks
β βββ useSnaps.ts # Snaps feed logic
β βββ usePosts.ts # Blog posts logic
β βββ useHiveAccount.ts # Account data
βββ lib/ # Utility functions
β βββ hive/ # Hive blockchain integration
β βββ utils/ # Helper functions
βββ themes/ # Theme definitions
β βββ hivebr.ts
β βββ nounish.ts
β βββ ... (8 themes total)
βββ types/ # TypeScript type definitions
βββ public/ # Static assets
βββ .env.local # Environment configuration
Posts are automatically fetched from the Hive blockchain based on your NEXT_PUBLIC_HIVE_COMMUNITY_TAG. No manual updates needed!
- Go to your project in Vercel dashboard
- Click Settings β Domains
- Add your domain and follow DNS instructions
- Wait for DNS propagation (5-30 minutes)
Edit app/layout.tsx:
export const metadata = {
title: 'Your Community Name',
description: 'Your community description',
}Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Use TypeScript for new files
- Follow the existing code style
- Test your changes locally before submitting
- Update documentation if needed
- Framework: Next.js 14 (App Router)
- UI Library: Chakra UI
- Blockchain: Hive via @hiveio/dhive
- Authentication: Aioha (Keychain, HiveAuth, Ledger, PeakVault)
- Styling: Tailwind CSS
- Language: TypeScript
- Package Manager: pnpm (or npm/yarn)
- Check environment variables are set correctly in Vercel
- Verify your community tag exists on Hive
- Check Vercel build logs for errors
- Confirm
NEXT_PUBLIC_HIVE_COMMUNITY_TAGis correct - Check if your community has posts with that tag
- Try a different tab (All or Following)
- Verify theme name is spelled correctly in
.env.local - Check if theme exists in
themes/folder - Restart development server after changing .env
- You must be logged in via Keychain or another provider
- Check if you're following any users
- Try refreshing the page
This project is open source and available under the MIT License.
- Built on the Hive blockchain
- Community-driven development
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Hive: Contact @mengao
Made with β€οΈ for the Hive community