Smart Lab — Building an AI-Powered Academic Research and Growth Platform
Inspiration
As STEM students, we face an overwhelming amount of learning materials every day: from hundreds of pages of lecture slides to technical papers, from complex mathematical derivations to experimental code. Traditional learning methods are inefficient, and knowledge becomes fragmented. We asked ourselves: Can we use AI to fundamentally redefine "learning" itself?
This inspiration came from our real pain points:
- 📚 Slide Overload: A single course may have 200+ pages of slides; manually organizing notes is time-consuming and prone to missing key points
- 📖 Difficulty Reading Papers: Top conference papers are filled with jargon, lacking systematic interpretation tools
- 🔍 Inefficient Literature Review: When writing our thesis, just "finding literature" consumed 40% of our time
- 🤝 Resource Silos: Students lack efficient mechanisms for sharing and collaborating on research resources
- 📋 Lost Progress: Learning paths are unclear—"What should I learn after finishing this?"
Smart Lab was born to leverage the power of the Gemini large language model to solve these real learning challenges.
What It Does
Smart Lab is a one-stop AI-driven academic growth platform covering the entire workflow from research reading to knowledge management, from resource exchange to learning planning.
🔬 Research Suite
| Module | Features | Problem Solved |
|---|---|---|
| Smart Reading | Multi-source comparative reading, page-by-page Q&A, automatic analysis report generation | Compress paper reading time from 3 hours to 30 minutes |
| Paper Agent | Full-text structured decomposition, core contribution extraction, methodology visualization | Quickly understand the core innovations of complex papers |
| Literature Agent | Intelligent literature search + automatic review generation | One-click draft of "Related Work" section |
| Research Agent | End-to-end generation from idea to technical tutorial | Quickly transform ideas into actionable learning paths |
📖 Learning Suite
| Module | Features | Problem Solved |
|---|---|---|
| Smart Disassembly | Intelligent PDF segmentation → Knowledge module extraction → Exercise correlation → Pre-exam quiz generation | Complete structured learning of 100-page slides in 10 minutes |
| Study Companion | Page-by-page PDF Q&A, personalized explanations, note accumulation | Like having a 24/7 private tutor |
| Note Center | Bidirectional linking, knowledge graph visualization, tag system | Build personal knowledge base, achieve "Second Brain" |
| Course Architect | One-click generation from topic to course outline | Quickly create systematic self-study materials |
🌐 Smart Square (Resource Exchange)
| Feature | Description |
|---|---|
| Research Ops | Professors post research internships → Students submit applications → One-click resume generation |
| Corporate Ops | Companies post industry project needs → Students form teams to respond |
| Resource Ops | Crowdsourced sharing of quality courses/notes/tutorials → Points incentive mechanism |
| Channels | Project-based real-time group chat collaboration → Slack-like communication experience |
| Consultation | Book 1-on-1 consultations with industry experts or Open Day live streams |
📋 Task Management
| Feature | Description |
|---|---|
| Learning Center | Skill tree visualization → Course progress tracking → Task list management |
| Home Dashboard | At-a-glance view: recent activities, statistics, quick access |
| SkillTree Component | Interactive skill learning path map based on React Flow |
How We Built It — Powered by the Google Ecosystem
This project was built entirely within the Google ecosystem, leveraging a powerful trio of tools that seamlessly integrate across the entire development lifecycle:
┌─────────────────────────────────────────────────────────────────────────────┐
│ THE GOOGLE ECOSYSTEM ADVANTAGE │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ 🚀 BUILD │ 🔧 REFINE │ ☁️ DEPLOY │
│ ──────────────── │ ──────────────── │ ──────────────── │
│ Google AI Studio │ Antigravity (Gemini │ Google Cloud Run │
│ + Gemini API │ Code Assist) │ + Cloud Build │
│ │ │ │
│ • Initial proto- │ • Intelligent code │ • Containerized │
│ typing in AI │ refactoring │ deployment │
│ Studio │ • Feature expansion │ • Auto-scaling │
│ • Export to code │ • Bug fixing with │ • Global CDN │
│ • Gemini 3 Flash │ AI assistance │ • CI/CD pipeline │
│ as core engine │ • Code quality │ • Secret management │
│ │ improvements │ │
└─────────────────────────────────────────────────────────────────────────────┘
│ │ │
└─────────────────────┼─────────────────────┘
│
UNIFIED GOOGLE
DEVELOPER EXPERIENCE
🚀 Phase 1: Rapid Prototyping with Google AI Studio
The journey began in Google AI Studio, where the initial concept was rapidly prototyped:
- Interactive Prompt Engineering: Tested and refined prompts for Smart Reading, Paper Agent, and Literature Agent directly in the AI Studio interface
- One-Click Code Export: The initial React application was exported directly from AI Studio, providing a production-ready foundation
- Gemini API Integration: Seamlessly integrated
@google/genaiSDK with the latest Gemini models (gemini-3-flash-preview,gemini-2.0-flash)
// Direct integration with Gemini API from exported AI Studio code
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({ apiKey: process.env.API_KEY });
🔧 Phase 2: Intelligent Development with Antigravity
Once the foundation was in place, Antigravity (the Gemini-powered code assistant) became the primary development partner:
- Feature Expansion: Added 7 complete AI agent modules with Antigravity's intelligent code generation
- Complex Refactoring: Implemented Map-Reduce architecture for large PDF processing with AI-assisted design
- Bug Detection & Fixing: Identified and resolved edge cases in streaming response handling
- Bilingual Support: Implemented internationalization with batch translation using
batchTranslateTexts - Code Quality: Maintained 100% TypeScript type safety with 492+ lines of strongly-typed interfaces
"Antigravity wasn't just a code assistant—it was a pair programming partner that understood the entire codebase context and could implement complex features across multiple files simultaneously."
☁️ Phase 3: Production Deployment with Google Cloud
The final step was deploying to Google Cloud Run, completing the end-to-end Google ecosystem experience:
- Cloud Build: Automated CI/CD pipeline with
cloudbuild.yamlconfiguration - Container Registry: Docker images stored in Google Container Registry
- Cloud Run: Serverless deployment with auto-scaling and global edge caching
- Secret Management: API keys handled securely via build-time substitutions
# cloudbuild.yaml - Seamless deployment pipeline
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '--build-arg', 'GEMINI_API_KEY=${_GEMINI_API_KEY}', '-t', 'gcr.io/$PROJECT_ID/smart-lab:latest', '.']
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
args: ['run', 'deploy', 'smart-lab', '--image', 'gcr.io/$PROJECT_ID/smart-lab:latest', '--allow-unauthenticated']
Deployment URL: https://smart-lab-3jid3va6la-de.a.run.app
Why Google Ecosystem Matters
| Benefit | Description |
|---|---|
| Seamless Integration | From prototyping to deployment, all tools speak the same language |
| Unified Authentication | Single Google account manages AI Studio, Cloud Console, and Antigravity |
| Consistent AI Models | Same Gemini models power the IDE assistant and the production application |
| Cost Efficiency | Cloud Run's pay-per-use model + free tier = minimal hosting costs for startups |
| Developer Velocity | AI-assisted development reduced feature implementation time by 5x |
Technology Stack
Frontend: React 18 + TypeScript + Vite
UI: TailwindCSS + Custom Design System
AI Core: Google Gemini API (gemini-3-flash-preview / gemini-2.0-flash)
PDF: pdf-lib (PDF processing) + html2pdf.js (export)
Storage: IndexedDB (local persistence)
Markdown: react-markdown + remark-gfm
Charts: React Flow (skill tree)
Deploy: Google Cloud Run + Cloud Build + Container Registry
Core Architecture
┌─────────────────────────────────────────────────────────┐
│ App.tsx (Routing Layer) │
├─────────────────────────────────────────────────────────┤
│ GlobalSidebar │ Content Area │
│ ───────────────────────────────────────────────────── │
│ │ Home / LearningCenter / SmartSquare │
│ │ SmartReading / SmartDisassembly │
│ │ PaperAgent / LiteratureAgent │
│ │ CourseArchitect / ResearchAgent │
│ │ NoteCenter / StudyCompanion │
└─────────────────────────────────────────────────────────┘
│ │
▼ ▼
┌─────────────────────────────────────────────┐
│ Services Layer │
├─────────────────────────────────────────────┤
│ geminiService.ts (AI call wrapper) │
│ storageService.ts (IndexedDB CRUD) │
│ paperService.ts (Paper parsing logic) │
│ disassemblyService.ts (Slide disassembly) │
│ agentService.ts (Multi-step generation)│
└─────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ Google Cloud Infrastructure │
├─────────────────────────────────────────────┤
│ Cloud Run (Serverless hosting) │
│ Cloud Build (CI/CD pipeline) │
│ Container Reg (Docker image storage) │
│ Gemini API (AI inference endpoint) │
└─────────────────────────────────────────────┘
Key Design Decisions
Map-Reduce Architecture (
SmartDisassembly): Split PDFs of hundreds of pages into modules, process in parallel, then merge—significantly improving generation speedStreaming Output: All AI conversations use
generateContentStream, so users don't have to wait for complete responsesLocal-First Storage: Using IndexedDB to save session records—works offline and protects privacy
Bilingual Support: Chinese-English switching via
UI_TRANSLATIONS, batch translation usingbatchTranslateTextsServerless Deployment: Cloud Run + Cloud Build enables zero-ops deployment with automatic scaling
Challenges We Ran Into
Challenge 1: Token Limits for Large PDF Processing
Problem: A single PDF may contain 100+ pages; sending it directly to Gemini would exceed the token limit.
Solution:
- Design a
DisassemblyPlanplanning phase where AI first plans "which pages belong to which module" - Then process in batches by module granularity, with each module containing only 10-20 pages of physical slices
- Finally merge to generate the complete knowledge notebook
// services/disassemblyService.ts
interface DisassemblyPlan {
course_title: string;
modules: {
id: string;
title: string;
page_start: number;
page_end: number; // ← Physical slice boundary
focus_points: string[];
}[];
}
Challenge 2: Citation Accuracy in Literature Reviews
Problem: AI-generated literature reviews may contain "hallucinated references."
Solution:
- Adopt Grounded Generation: AI must generate content based only on actual search results
- Force
generateLiteratureReviewto usesearchReferencesas the sole information source - Output format enforces Citation Markers
[1], [2]...for easy manual verification
Challenge 3: Identity Verification for Smart Square
Problem: Need to distinguish permissions between "student submitting resume" and "professor reviewing applications."
Solution:
- Define
UserRole: 'student' | 'researcher' | 'company' | 'admin' - Dynamically render UI buttons based on role (e.g., only post authors can see "View Applicants" button)
- Use
Applicationstate machine to manage the application workflow:PENDING → APPROVED/REJECTED
Challenge 4: Persisting Complex State
Problem: SmartDisassembly sessions need to save: PDF files, planning data, module content, quiz data, and other multi-layered nested states.
Solution:
- Design a flattened
DisassemblySessiontype, storing PDFs as Base64 in IndexedDB - Use optimistic updates (
updateSession) to ensure UI responsiveness - Add
statusfield to support resumable sessions:'uploading' | 'planning' | 'generating' | 'completed'
Accomplishments That We're Proud Of
✅ Complete AI-Assisted Research Workflow: From literature search → paper reading → note management → review generation, forming a closed loop
✅ Map-Reduce Architecture for Smart Disassembly: Innovatively transforms long document processing into parallelizable modular tasks
✅ Fully Functional Community Features: Not just a simple post list, but a complete collaboration system including application workflows, resume uploads, and project channels
✅ 7 Core Agent Modules: Each module has independent Prompt Engineering and business logic
✅ 100% TypeScript Type Safety: 492 lines of types.ts ensure consistency of data structures
What We Learned
Technical Level
- Prompt Engineering is a Core Competency: The same functionality with better prompts can improve output quality by 3x
- User Experience Value of Streaming Output: Nobody wants to stare at a loading screen for 30 seconds
- "Small Brain" Strategy for Large Models: Complex tasks should be decomposed into multiple small tasks rather than having AI complete everything at once
Product Level
- Quality Over Quantity: Seven modules seem independent but are seamlessly connected through
onNavigateand Deep Links - Pain-Point-Driven Development: Every feature stems from real learning scenarios, not "technical showoff"
Collaboration Level
- AI is a Co-Pilot, Not an Autopilot: The platform's positioning is to enhance human capabilities, not replace thinking
What's Next for Smart Lab
| Phase | Plan |
|---|---|
| Short-term | Integrate more Gemini models (e.g., Gemini Ultra) to enhance complex reasoning capabilities |
| Mid-term | Add cloud sync functionality for cross-device data consistency |
| Long-term | Build an academic social graph for intelligent collaborator recommendations based on research interests |
| Vision | Become the one-stop growth partner for every researcher from "beginner → advanced → output" |
Built With
- google-gemini-api
- html2pdf.js
- indexeddb
- pdf-lib
- react
- react-flow
- react-markdown
- tailwindcss
- typescript
- vite
Log in or sign up for Devpost to join the conversation.