v# Operone - AI-Powered Desktop & Web Platform
A modern monorepo featuring AI-integrated applications with robust authentication, comprehensive UI components, and cross-platform support.
Operone is a full-stack platform that combines web and desktop applications with AI capabilities, built with modern technologies and best practices. The project includes a Next.js web application, Electron desktop app, documentation site, and a comprehensive AI/MCP integration system.
operone/
├── apps/
│ ├── web/ # Next.js web app with OAuth & WebAuthn
│ ├── operone/ # Electron desktop app with deep-link auth
│ └── docs/ # Documentation & component showcase
├── packages/
│ ├── eslint-config/ # Shared ESLint configurations
│ ├── mcp/ # Model Context Protocol tools
│ ├── operone/ # Core AI & reasoning engine
│ ├── types/ # Shared TypeScript types
│ └── typescript-config/ # Shared TypeScript configs
├── tests/
│ ├── e2e/ # End-to-end tests
│ └── integration/ # Integration tests
└── python/ # Python connectors and models (planned)
- ✅ Next.js 16 with App Router
- ✅ Advanced Authentication: OAuth (Google, GitHub) + WebAuthn/Passkey
- ✅ Session Management: Secure token handling and persistence
- ✅ Modern UI: 55+ shadcn/ui components with Tailwind CSS
- ✅ Database: PostgreSQL with Prisma ORM
- ✅ Security: Encryption utilities, API error handling
- ✅ Testing: Playwright e2e tests, comprehensive error boundaries
- ✅ Electron 34 with Vite for fast development
- ✅ React 19 with TypeScript
- ✅ Deep-Link Protocol:
operone://for seamless auth flow - ✅ Browser Authentication: Secure OAuth integration
- ✅ Cross-Platform: macOS, Windows, Linux support
- ✅ Modern UI: Consistent design system with web app
- ✅ Component Library: Live showcase of 55+ UI components
- ✅ Interactive Demos: Real-time component experimentation
- ✅ Development Guide: Usage examples and best practices
- ✅ Responsive Design: Mobile-friendly documentation
- ✅ Model Provider: Unified AI model interface
- ✅ RAG System: Retrieval-Augmented Generation capabilities
- ✅ Memory Management: Persistent context and learning
- ✅ MCP Tools: File, Shell, and Log tools for AI agents
- ✅ Reasoning Engine: Advanced decision-making systems
- Node.js >= 18
- pnpm 9.0.0
- PostgreSQL (for web app authentication)
- Git for version control
git clone https://github.com/the-shoaib2/operone.git
cd operone
pnpm installCreate environment files:
# Web app environment
cp apps/web/.env.example apps/web/.env
# Documentation environment
cp apps/docs/.env.example apps/docs/.envConfigure apps/web/.env:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/operone"
# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key"
# OAuth Providers
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"cd apps/web
npx prisma generate
npx prisma migrate dev --name init
npx prisma studio # Optional: View database# Run all applications
pnpm dev
# Or run individually:
pnpm dev:web # Web app (http://localhost:3000)
pnpm dev:desktop # Desktop app
pnpm dev:docs # Documentation (http://localhost:3001)- Visit
http://localhost:3000/login - Choose OAuth provider (Google/GitHub) or Passkey
- Complete authentication flow
- Redirect to dashboard with secure session
- Launch Operone desktop app
- Click "Sign In" → Opens browser
- Complete OAuth authentication in browser
- Deep-link redirect:
operone://auth?token=... - Secure token storage in desktop app
- Hardware security key integration
- Biometric authentication (Face ID, Touch ID)
- Passwordless login experience
- Cross-device synchronization
- Forms: Button, Input, Select, Checkbox, Radio, Switch
- Layout: Card, Sheet, Sidebar, Separator, Scroll Area
- Navigation: Tabs, Breadcrumb, Menubar, Command
- Feedback: Dialog, Alert, Toast, Popover, Tooltip
- Data Display: Table, Badge, Avatar, Chart, Calendar
- Advanced: Data Table, Carousel, Resizable, Sidebar
import { Button, Card, CardContent, CardHeader, CardTitle } from '@repo/ui'
export default function MyComponent() {
return (
<Card className="w-96">
<CardHeader>
<CardTitle>Welcome to Operone</CardTitle>
</CardHeader>
<CardContent className="space-y-4">
<Button variant="default">Get Started</Button>
<Button variant="outline">Learn More</Button>
</CardContent>
</Card>
)
}import { ModelProvider } from '@repo/operone'
const provider = new ModelProvider({
provider: 'openai',
model: 'gpt-4',
apiKey: process.env.OPENAI_API_KEY
})
const response = await provider.generate({
prompt: 'Hello, Operone!',
context: [...]
})- FileTool: File system operations
- ShellTool: Command execution
- LogTool: Log analysis and monitoring
- Document indexing and retrieval
- Vector similarity search
- Context-aware responses
The desktop app registers custom protocol handlers:
- Authentication:
operone://auth?token=<jwt> - Actions:
operone://action?type=<type>&data=<data> - Platform Support: macOS, Windows, Linux
- Turborepo: Fast builds and caching
- pnpm Workspaces: Efficient dependency management
- Changesets: Version management and publishing
- ESLint: Consistent code style
- TypeScript: Static type checking
- Prettier: Code formatting
- Vitest: Unit testing
- Playwright: E2E testing
# Development
pnpm dev # Run all apps
pnpm dev:web # Web app only
pnpm dev:desktop # Desktop app only
pnpm dev:docs # Documentation only
# Building
pnpm build # Build all apps
pnpm build:web # Web app production build
pnpm build:desktop # Desktop app build
pnpm build:docs # Documentation build
# Testing
pnpm test # Run all tests
pnpm test:unit # Unit tests
pnpm test:e2e # End-to-end tests
pnpm test:coverage # Coverage reports
# Code Quality
pnpm lint # Lint all packages
pnpm check-types # Type checking
pnpm format # Format code- React 19: Latest React features
- Next.js 16: Full-stack framework
- TypeScript: Type safety
- Tailwind CSS: Utility-first styling
- shadcn/ui: Component library
- Node.js: Runtime environment
- PostgreSQL: Primary database
- Prisma: Database ORM
- NextAuth: Authentication
- Electron: Desktop framework
- OpenAI API: GPT models
- MCP Protocol: Tool integration
- Vector DB: Embedding storage
- RAG Pipeline: Document processing
- JWT token authentication
- OAuth 2.0 integration
- WebAuthn/Passkey support
- Encryption utilities
- Secure token storage
- CORS protection
- Rate limiting
- Component testing with Vitest
- Utility function testing
- API endpoint testing
- Coverage reporting
- Database operations
- Authentication flows
- API integration
- Cross-package functionality
- User journey testing
- Cross-browser testing
- Mobile responsiveness
- Desktop app functionality
# Build for production
pnpm build:web
# Deploy to Vercel (recommended)
vercel --prod
# Or other platforms
# Netlify, Railway, DigitalOcean, etc.# Build distributables
pnpm build:desktop
# Outputs:
# - dist/ (Web build)
# - dist-electron/ (Electron build)
# - Installer packages for each platform# Build static docs
pnpm build:docs
# Deploy to Vercel/Netlify
vercel --prod# Check PostgreSQL status
brew services list | grep postgresql # macOS
sudo systemctl status postgresql # Linux
# Reset database
npx prisma migrate reset- Verify redirect URIs match exactly
- Check client ID and secrets
- Ensure OAuth apps are enabled
- Test with OAuth playground tools
- macOS: App must be built and installed
- Windows: Run as administrator first time
- Linux: Check protocol handler registration
# Clear caches
pnpm store prune
rm -rf .turbo
rm -rf node_modules
pnpm install
# Reset database
npx prisma migrate reset- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow existing code patterns
- Add tests for new features
- Update documentation
- Use semantic commit messages
- Ensure all tests pass
MIT License - see LICENSE file for details.
- Next.js Team - Amazing framework
- Auth.js - Authentication solution
- shadcn/ui - Beautiful components
- Electron - Desktop capabilities
- Vercel - Hosting platform
- OpenAI - AI models
- MCP Community - Protocol development
- Documentation: Visit docs site
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Community: Discord Server
Built with ❤️ by the Operone team