Skip to main content

Getting Started with Cync

Prerequisites

  • Node.js 18+
  • npm or pnpm
  • Supabase account
  • Fireflies.ai API key
  • Wrike access token (optional)
  • OpenRouter API key (for AI features)

Quick Start

# Clone the repo
git clone git@github.com:aic-holdings/aicync.git
cd aicync/web

# Install dependencies
npm install

# Set up environment
cp .env.example .env.local
# Edit .env.local with your credentials

# Start development server
npm run dev

Application runs at http://localhost:3000

Environment Variables

Required

# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-key

# Fireflies (transcripts)
FIREFLIES_API_KEY=your-fireflies-api-key

Optional

# Wrike (project management)
WRIKE_ACCESS_TOKEN=your-wrike-token
WRIKE_API_BASE_URL=https://www.wrike.com/api/v4

# OpenRouter (AI features)
OPENROUTER_API_KEY=sk-or-v1-xxx
OPENROUTER_MODEL=anthropic/claude-3.5-sonnet

Database Setup

Run Migrations

# Local development
supabase start
supabase db push

# Remote database
supabase db push --password "YOUR_DB_PASSWORD"

Schema Overview

-- Primary tables in aicync schema
aicync.stickies -- Rich text notes
aicync.sticky_versions -- Version history
aicync.links -- Bookmarks
aicync.link_folders -- Folder organization
aicync.news -- News articles

Testing

# Unit tests
npm test

# E2E tests
npm run test:e2e

# Type checking
npm run typecheck

Project Structure

aicync/
├── web/ # Next.js application
│ ├── app/ # App Router
│ │ ├── (features)/ # Feature modules
│ │ ├── api/ # API routes (50+)
│ │ └── protected/ # Auth-protected pages
│ ├── components/ # Shared React components
│ ├── lib/ # Utilities
│ │ ├── supabase/ # Database client
│ │ ├── wrike/ # Wrike integration
│ │ └── mcp/ # MCP tool definitions
│ └── supabase/ # Migrations
├── src/ # Python utilities
└── docs/ # Legacy Nextra docs

Common Issues

Supabase Authentication Errors

# If you see "Invalid API key" errors
# Ensure NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY is set correctly
# NOT NEXT_PUBLIC_SUPABASE_ANON_KEY

Fireflies API Rate Limits

The Fireflies API has rate limits. If you see 429 errors:

  • Wait a few minutes before retrying
  • Consider implementing request batching

TypeScript Errors

# The project uses strict TypeScript
# Run typecheck to see all issues
npm run typecheck

Next Steps

  1. Set up your environment variables
  2. Run the development server
  3. Explore the Features
  4. Review Tech Debt for known issues