Skip to content

πŸš€ Web3-ready Next.js frontend for Pegasoi Research Platform - Academic research discovery with blockchain integration, collaborative development by Next.js and Web3 experts

License

Notifications You must be signed in to change notification settings

angrytidy/pegasoi-frontend

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧬 Pegasoi Frontend

Web3-Ready Academic Research Platform Frontend

A Next.js-powered frontend for the Pegasoi Research Platform, designed for Web3 integration and academic paper discovery. This application connects to our FastAPI backend and provides a modern, responsive interface for researchers to explore academic literature across multiple sources.

Built with Next.js Powered by Shadcn/ui Web3 Ready TypeScript

🌟 Features

πŸ” Multi-Source Academic Search

  • ArXiv Integration - Physics, Mathematics, Computer Science papers
  • DOAJ Support - Open Access journals and articles
  • Crossref API - DOI metadata and citation information
  • Getty Vocabulary - Cultural and art history resources

🎨 Modern UI/UX

  • Shadcn/ui Components - Beautiful, accessible design system
  • Dark/Light Mode - Theme switching with next-themes
  • Responsive Design - Mobile-first approach
  • Loading States - Smooth user experience

πŸ” Authentication & Security

  • Clerk Integration - Secure user authentication
  • Role-based Access - Admin and researcher roles
  • Session Management - Persistent login state

πŸš€ Web3 Ready Architecture

  • Blockchain Integration Ready - Prepared for wallet connections
  • Decentralized Identity - Compatible with Web3 auth patterns
  • Future-Proof Design - Built with Web3 principles in mind

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend      │───▢│   Backend API    │───▢│   Data Sources  β”‚
β”‚   (This Repo)   β”‚    β”‚   (Railway)      β”‚    β”‚   (ArXiv, DOAJ) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • Frontend: Next.js 14 with TypeScript and Shadcn/ui
  • Backend: FastAPI with Redis (deployed on Railway)
  • Data: Multiple academic APIs (ArXiv, DOAJ, Crossref, Getty)
  • Auth: Clerk for user management
  • Future: Web3 wallet integration

πŸš€ Getting Started

Prerequisites

  • Node.js >= 18.0.0
  • npm (included with Node.js)
  • Git

Installation

  1. Clone the repository
git clone https://github.com/yasutora-eth/pegasoi-frontend.git
cd pegasoi-frontend
  1. Install dependencies
npm install
  1. Set up environment variables
cp .env.example .env.local

Edit .env.local with your configuration:

# Backend API
NEXT_PUBLIC_API_URL=https://pegasoibackend-production.up.railway.app

# Clerk Authentication (get from clerk.com)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_key_here
CLERK_SECRET_KEY=your_secret_here
  1. Start the development server
npm run dev
  1. Open your browser Visit http://localhost:3000

πŸ“ Project Structure

pegasoi-frontend/
β”œβ”€β”€ app/                    # Next.js 14 App Router
β”‚   β”œβ”€β”€ (auth)/            # Authentication routes
β”‚   β”œβ”€β”€ dashboard/         # User dashboard
β”‚   β”œβ”€β”€ research-gallery/  # Main search interface
β”‚   └── api/              # API routes
β”œβ”€β”€ components/           # Reusable UI components
β”‚   β”œβ”€β”€ ui/              # Shadcn/ui components
β”‚   └── custom/          # Custom components
β”œβ”€β”€ lib/                 # Utilities and configurations
β”œβ”€β”€ public/             # Static assets
β”œβ”€β”€ styles/            # Global styles
└── types/            # TypeScript type definitions

πŸ”— Backend Integration

This frontend connects to our FastAPI backend:

Key Endpoints

  • GET /api/v1/search/papers - Search academic papers
  • GET /api/v1/articles - Get all articles
  • GET /api/v1/health - Health check

🎨 Design System

Built with Shadcn/ui for consistent, accessible components:

  • Colors: CSS variables for easy theming
  • Components: Pre-built, customizable UI elements
  • Icons: Lucide React icon library
  • Typography: Tailwind CSS utility classes

🌐 Web3 Integration (Coming Soon)

Prepared for Web3 integration with:

  • Wallet Connection - MetaMask, WalletConnect support
  • Blockchain Storage - Research citations on-chain
  • Decentralized Identity - Web3 authentication options
  • Token Incentives - Reward researchers for contributions

πŸ› οΈ Development

Scripts

npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server
npm run lint         # Run ESLint
npm run lint:fix     # Fix ESLint issues
npm run type-check   # Check TypeScript types

Code Quality

  • ESLint - Code linting
  • Prettier - Code formatting
  • TypeScript - Type safety
  • Husky - Git hooks for quality checks

πŸš€ Deployment

Recommended platforms:

  • Vercel (Primary) - Optimized for Next.js
  • Netlify - Alternative option
  • Railway - Full-stack deployment

Environment Variables for Production

NEXT_PUBLIC_API_URL=https://your-backend.railway.app
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_...
CLERK_SECRET_KEY=sk_live_...

🀝 Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“ License

MIT License - see LICENSE file for details.

πŸ”— Links


Built with ❀️ for the academic research community

About

πŸš€ Web3-ready Next.js frontend for Pegasoi Research Platform - Academic research discovery with blockchain integration, collaborative development by Next.js and Web3 experts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 79.2%
  • Shell 11.3%
  • CSS 3.7%
  • JavaScript 3.6%
  • Python 1.7%
  • Dockerfile 0.5%