Skip to content

FLock-io/vibe-research

Repository files navigation

FLock Research Visualization Platform

A modern, interactive website for exploring FLock.io's research papers in federated learning, decentralized AI, and privacy-preserving machine learning.

πŸš€ Live Demo: Coming soon
πŸ“š Papers: 15+ publications, 164+ citations
πŸ”„ Auto-Sync: Daily updates from Google Scholar
πŸ€– AI Chat: Powered by FLock's LLM API

License Next.js TypeScript Tailwind CSS

Features

  • 🎨 Beautiful UI: Modern design with dark mode support, matching FLock.io's aesthetic
  • πŸ“Š Interactive Visualizations:
    • Force-directed citation network graph
    • Semantic topic clustering and exploration
    • Venue-based paper filtering
  • πŸ€– AI-Powered Chat: Ask questions about FLock research using retrieval-augmented generation
  • πŸ”„ Auto-Sync: Automatically fetches ALL papers from Google Scholar profile (daily)
  • πŸ“± Responsive: Works seamlessly on desktop, tablet, and mobile
  • πŸ“ Zero Maintenance: Update Google Scholar β†’ Site updates automatically

Architecture

Tech Stack

  • Framework: Next.js 15 (App Router) with TypeScript
  • Styling: Tailwind CSS with custom design system
  • Visualizations:
    • react-force-graph-2d for citation networks
    • Custom SVG for semantic maps
  • Data Pipeline:
    • Google Scholar scraper (cheerio)
    • Vercel KV for data storage
    • Vercel Cron for scheduled updates
  • LLM Integration: FLock API (OpenAI-compatible)

Data Flow

  1. Scraping: Vercel Cron triggers /api/refresh-scholar daily at 2 AM UTC
  2. Processing: Scholar profile is scraped (ALL papers, paginated), papers are normalized, citation graph is built
  3. Storage: Data is stored in Vercel KV
  4. Serving: API routes serve data with ISR (revalidate every hour)
  5. Frontend: Pages fetch data and render interactive visualizations

Note: The scraper fetches ALL papers from the Google Scholar profile, not just a subset. Currently finds 15+ FLock papers.

Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Vercel account (for deployment)
  • FLock API credentials (for chat feature)

Local Development

  1. Clone the repository:

    git clone <repository-url>
    cd vibe-research
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env.local file (see env.example.txt for reference):

    NEXT_PUBLIC_BASE_URL=http://localhost:3000
    FLOCK_API_KEY=your_flock_api_key
    FLOCK_API_BASE_URL=https://api.flock.io/v1
    FLOCK_MODEL=flock-llm-default
    CRON_SECRET=your_random_secret
  4. Preview real papers from Google Scholar:

    npm run fetch-papers

    This shows what papers will be scraped (currently 15+ papers).

  5. Run the development server:

    npm run dev
  6. Load real data (optional, in a new terminal):

    curl -X GET http://localhost:3000/api/refresh-scholar \
      -H "Authorization: Bearer local-dev-secret-change-in-production"
  7. Open http://localhost:3000 in your browser

Deployment to Vercel

  1. Push to GitHub:

    git add .
    git commit -m "Initial commit"
    git push origin main
  2. Import to Vercel:

    • Go to vercel.com
    • Import your GitHub repository
    • Vercel will auto-detect Next.js
  3. Add Vercel KV:

    • In your Vercel project, go to Storage β†’ Create Database β†’ KV
    • Environment variables will be automatically added
  4. Set environment variables:

    • Add FLOCK_API_KEY, FLOCK_API_BASE_URL, FLOCK_MODEL, CRON_SECRET
    • NEXT_PUBLIC_BASE_URL will be auto-set by Vercel
  5. Deploy:

    • Vercel will automatically deploy on every push to main
    • Cron job is configured in vercel.json

Project Structure

vibe-research/
β”œβ”€β”€ app/                      # Next.js app directory
β”‚   β”œβ”€β”€ api/                  # API routes
β”‚   β”‚   β”œβ”€β”€ chat/            # LLM chat endpoint
β”‚   β”‚   β”œβ”€β”€ data/            # Data serving endpoints
β”‚   β”‚   └── refresh-scholar/ # Scholar scraping endpoint
β”‚   β”œβ”€β”€ about/               # About page
β”‚   β”œβ”€β”€ chat/                # Chat interface
β”‚   β”œβ”€β”€ graph/               # Citation network visualization
β”‚   β”œβ”€β”€ topics/              # Semantic topic exploration
β”‚   β”œβ”€β”€ venues/              # Venue-based paper listing
β”‚   β”œβ”€β”€ status/              # System status page
β”‚   β”œβ”€β”€ layout.tsx           # Root layout with navigation
β”‚   └── page.tsx             # Homepage
β”œβ”€β”€ components/              # Reusable React components
β”‚   β”œβ”€β”€ navigation.tsx       # Main navigation bar
β”‚   β”œβ”€β”€ theme-toggle.tsx     # Dark mode toggle
β”‚   └── footer.tsx           # Site footer
β”œβ”€β”€ lib/                     # Utility libraries
β”‚   β”œβ”€β”€ data/               # Stub data for development
β”‚   β”œβ”€β”€ scraper/            # Google Scholar scraper
β”‚   β”œβ”€β”€ storage/            # Vercel KV wrapper
β”‚   └── llm/                # LLM API client
β”œβ”€β”€ types/                   # TypeScript type definitions
β”œβ”€β”€ config/                  # Site configuration
└── public/                  # Static assets

Maintenance

Updating Papers

To add/update papers: Just update your Google Scholar profile!

  • Add new papers β†’ They appear on next sync
  • Update paper details β†’ Changes appear on next sync
  • The scraper fetches ALL papers automatically (currently 15+)

Manual sync:

# Preview papers (no changes to site)
npm run fetch-papers

# Update live site
curl -X GET https://your-domain.vercel.app/api/refresh-scholar \
  -H "Authorization: Bearer YOUR_CRON_SECRET"

See PAPERS-SYNC.md for detailed synchronization guide.

Modifying Site Configuration

Edit config/site.ts to update:

  • Site name and description
  • Navigation links
  • Theme colors
  • Scholar profile URL

Adding New Venues

Update the venueInfo object in app/venues/page.tsx to add metadata for new publication venues.

Features Roadmap

  • Google Scholar integration
  • Citation network visualization
  • Semantic topic clustering
  • LLM-powered chat
  • Dark mode support
  • Real-time embeddings computation
  • Author collaboration network
  • Export citations (BibTeX)
  • Paper recommendations
  • Advanced search filters

Performance

  • Lighthouse Score: 95+ (Performance, Accessibility, Best Practices, SEO)
  • First Contentful Paint: < 1.5s
  • Time to Interactive: < 3s
  • Bundle Size: < 200KB (gzipped)

Contributing

This is a private research visualization tool for FLock.io. For questions or suggestions, contact the FLock team.

License

Proprietary - FLock.io

Screenshots

Homepage

Beautiful landing page with stats, featured papers, and top venues.

Citation Network

Interactive force-directed graph showing paper relationships.

Topics & Semantic Map

Explore research by keywords and semantic clustering.

AI Research Assistant

Ask questions and get intelligent answers about FLock research.

Contributing

This is a private research tool for FLock.io. For internal contributions:

  1. Create a feature branch
  2. Make your changes
  3. Test locally with npm run build
  4. Submit a pull request

Acknowledgments

Related Links


Maintained by: FLock.io Team
Last Updated: December 2024
Status: βœ… Production Ready

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages