A modern, responsive analytics dashboard for visualizing community groups and events data from Google Sheets. Built with Next.js, TypeScript, and Tailwind CSS.
- KPI Cards: Total Groups, Members, Events, and RSVPs
- Dynamic Year Statistics: Automatically detects and displays stats for all available years (up to 20 years back)
- Year-over-Year Growth: Automatic YoY growth calculations between consecutive years
- Interactive Charts: Top groups by members and RSVPs with expandable views
- Data Tables: Sortable, paginated tables with flexible display options (10/25/50/All)
- Regional Filters: AMER, APAC, EMEA
- Group Selection: Multi-select with auto-selection on search
- Event Types: Physical, Online, Hybrid
- Smart Search: Search groups and cities with instant results
- Selected First: Selected groups automatically move to the top of filter lists
- Dynamic Year Detection: Automatically detects available "Events YYYY" sheets
- No Hardcoded Years: Handles any number of years from current year back to 20 years
- Responsive Design: Works seamlessly on desktop, tablet, and mobile
- Fast Performance: Optimized with React memoization and efficient filtering
- Type-Safe: Full TypeScript implementation
- Node.js 18+ installed
- Google Sheets with your Meetup data
- Google Cloud Project with Sheets API enabled
- Clone and Install
git clone https://github.com/sidagarwal04/community-lens.git
cd community-lens
npm install- Configure Environment
Create .env file:
cp example.env .envEdit .env with your configuration:
# Google Sheets API Key
NEXT_PUBLIC_GOOGLE_SHEETS_API_KEY=your_api_key_here
# Single Spreadsheet ID
NEXT_PUBLIC_SPREADSHEET_ID=your_spreadsheet_id_here
# Groups Sheet Tab Names by region
NEXT_PUBLIC_GROUPS_SHEETS="AMER Dashboard,EMEA Dashboard,APAC Dashboard"
# Summary Sheet Tab Name (optional)
NEXT_PUBLIC_SUMMARY_SHEET="Consolidated Dashboard"Note: Events sheets are automatically detected - no need to configure them!
- Run Development Server
npm run dev- Build for Production
npm run build
npm startThis dashboard works best with Google Sheets generated using the MeetupPro AppScript Sync tool:
The script automatically syncs your Meetup.com Pro Network data to Google Sheets with the correct structure and formatting that this dashboard expects.
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Sheets API
- Create credentials β API Key
- (Recommended) Restrict the API key to Google Sheets API only
Your spreadsheet should contain the following tabs:
- UG+Regions - Groups data with regions
- Events YYYY - Event data (e.g., Events 2024, Events 2025, Events 2026)
- The dashboard automatically detects all "Events YYYY" sheets
- Supports current year back to 20 years
UG+Regions Sheet (Groups):
Timestamp | User Group Name | Member Count | City | Region | Past RSVPs | Past Event Count | ...
Events YYYY Sheets:
Timestamp | Meetup Title | Meetup URL | Meetup Date | Meetup Group Name | Meetup City | RSVP Count | Meetup Type
Important:
- Meetup Type should be:
Physical,Online, orHybrid - Make your spreadsheet publicly accessible or share with API credentials
Spreadsheet ID:
From URL: https://docs.google.com/spreadsheets/d/[SPREADSHEET_ID]/edit
Make Sheet Public:
- Open your Google Sheet
- Click "Share" β "Anyone with the link can view"
- Click "Done"
- MeetupPro AppScript Sync - Google Apps Script to automatically sync Meetup.com Pro Network data to Google Sheets. Use this to generate the properly structured sheets for this dashboard.
community-lens/
βββ src/
β βββ app/
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Main dashboard (dynamic year handling)
β β βββ globals.css # Global styles
β β βββ robots.ts # SEO robots config
β βββ components/
β β βββ KPICard.tsx # Metric display cards
β β βββ ChartCard.tsx # Chart components with expand
β β βββ DataTable.tsx # Sortable/paginated tables
β β βββ FilterPanel.tsx # Multi-filter sidebar
β βββ lib/
β β βββ sheetsService.ts # Google Sheets API + dynamic year detection
β βββ types/
β βββ index.ts # TypeScript definitions
βββ public/
β βββ manifest.json # PWA manifest
β βββ icons/ # App icons
βββ .env # Environment configuration (create from example.env)
βββ example.env # Environment template
βββ package.json
βββ tsconfig.json
βββ tailwind.config.js
βββ next.config.js
The dashboard automatically:
- Fetches spreadsheet metadata to get all sheet names
- Identifies sheets matching "Events YYYY" pattern
- Fetches data from all available years (current year back to 20 years)
- Calculates statistics and YoY growth dynamically
- Renders year cards in descending order
No hardcoded years - Add a new "Events 2027" sheet and it will automatically appear!
- Auto-selection: Searching for a city/group auto-selects matching groups
- Selected First: Selected groups move to top of filter list in bold
- Regional Mapping: Multi-strategy matching (exact, city, fuzzy, partial)
- Dynamic Stats: All KPIs and charts update based on active filters
- Click expand icon on any chart to see full data
- Horizontal bar layout in expanded view
- ESC key or X button to close
- Shows all groups (not just top 10)
npm install -g vercel
vercelAdd environment variables in Vercel dashboard:
NEXT_PUBLIC_GOOGLE_SHEETS_API_KEYNEXT_PUBLIC_SPREADSHEET_ID
Supports any Next.js-compatible platform:
- Netlify
- AWS Amplify
- Google Cloud Run
- Azure Static Web Apps
- Railway
- Check browser console for error messages
- Verify API key is correct in `.env`
- Ensure sheets are public or properly shared
- Check spreadsheet ID in `.env` file
- Verify sheet tab names:
- Must have
UG+Regionstab - Must have at least one
Events YYYYtab
- Must have
- Column names must match expected format (case-insensitive)
- Check that events have proper year field extraction
- Verify sheet names follow "Events YYYY" pattern
- Look for console logs showing year detection
- Check event type values (should be Physical/Online/Hybrid)
- Clear browser cache and reload
- Check console for filtering errors
- Verify group names match between UG+Regions and Events sheets
- Test with "Clear All Filters" button
- Large datasets (1000+ groups): Consider pagination limits
- Slow initial load: Check network tab for API response times
- Memory issues: Refresh page to reset state
- Next.js 14 - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Recharts - Data visualization
- Lucide React - Icons
- date-fns - Date utilities
- Google Sheets API v4 - Data source
MIT License - see the LICENSE file for details.
Contributions welcome! Please open an issue first to discuss changes.
For issues or questions, please create an issue in the repository.
Version: 1.0.0
Last Updated: January 2026