Lab68 Dev Platform is a comprehensive collaborative product development workspace with integrated staff management.
It provides dashboards for planning, documentation, meetings, AI-assisted workflows, role-aware access controls, live customer support, and a complete staff portal β built with Next.js App Router, TypeScript, and a modular component system.
- Enterprise-Grade Security β bcrypt password hashing, JWT sessions, Two-Factor Authentication (2FA), rate limiting, and automated email notifications.
- Role-Based Collaboration β project-level roles (owner, admin, editor, viewer) with granular permission checks and activity logging.
- Staff Management Portal β dedicated staff authentication, user management, support queue, analytics dashboard, and approval workflows.
- Live Customer Support β real-time chat widget with staff dashboard for 24/7 support management.
- Supabase Backend β PostgreSQL database with Row-Level Security (RLS), indexed queries, and automatic session cleanup.
- Multilingual UI β centralized translation registry (
lib/i18n.ts) covering nine locales with automatic English fallbacks. - Productivity Surface β dashboards for projects, kanban, meetings, files, wiki, diagrams, community discussions, and AI tools.
- Theme & Layout Framework β dark/light theme support, sidebar navigation, reusable UI primitives, and responsive Tailwind styling.
- Automation Scripts β translation restoration and encoding-fix utilities for keeping locale data consistent.
| Layer | Details |
|---|---|
| Framework | Next.js 16 with the App Router |
| Language | TypeScript 5 |
| Database | Supabase PostgreSQL with RLS policies |
| Authentication | JWT sessions, bcrypt password hashing, TOTP-based 2FA |
| Real-Time | Socket.io for instant messaging, typing indicators, presence tracking |
| AI Models | Ollama (local) - Privacy-first, no API costs, unlimited usage |
| Nodemailer with SMTP (Gmail, SendGrid, Mailgun, SES) | |
| Security | Rate limiting, session management, activity logging |
| Styling | Tailwind CSS + custom utility components |
| Package Manager | pnpm |
| Tooling | ESLint, Prettier, PostCSS |
| Deployment Ready | Vercel (configuration included in next.config.mjs) |
lab68dev-platform/
βββ app/ # Route groups and feature areas
β βββ api/
β β βββ chat/route.ts # AI chat API with Ollama
β β βββ staff/ # Staff authentication APIs
β β βββ signup/route.ts # Staff registration with rate limiting
β β βββ login/route.ts # JWT authentication with 2FA
β β βββ 2fa/route.ts # Two-Factor Auth management
β βββ dashboard/ # Authenticated workspace experience
β β βββ ai-tools/ # AI Assistant with local & cloud models
β βββ staff/ # Staff portal
β β βββ login/, signup/ # Staff authentication flows
β β βββ dashboard/ # Staff management dashboard
β βββ login/, signup/ # User auth flows
β βββ layout.tsx # Root layout with theme provider
βββ components/ # Reusable UI atoms/molecules (sidebar, header, etc.)
βββ lib/ # Domain logic
β βββ staff-security.ts # Security infrastructure (bcrypt, JWT, 2FA)
β βββ staff-email.ts # Email notification system
β βββ auth.ts, team.ts # RBAC and user management
β βββ i18n.ts # Internationalization
βββ docs/ # Comprehensive documentation
β βββ SECURITY_QUICKSTART.md # 5-minute security setup
β βββ SECURITY_IMPLEMENTATION.md # Technical guide
β βββ SECURITY_COMPLETE.md # Complete summary
β βββ SUPABASE_SETUP.md # Database setup
β βββ OLLAMA_SETUP.md # Local AI model setup
βββ public/ # Static assets
βββ scripts/ # Translation repair helpers
βββ supabase-staff-schema.sql # PostgreSQL database schema
βββ .env.example # Environment variable template
βββ start-dev.ps1 # Development startup script (with Ollama)
βββ .env.example # Environment variable template
βββ next.config.mjs # Next.js configuration
βββ tsconfig.json # Type checking configuration
βββ package.json # Workspace scripts
- Node.js β₯ 18
- pnpm β₯ 8 (
corepack enablerecommended)
git clone https://github.com/lab68dev/lab68dev-platform.git
cd lab68dev-platform
pnpm installFollow the 5-minute setup guide: See docs/SECURITY_QUICKSTART.md
Or manually configure:
-
Generate JWT Secret:
# PowerShell (Windows) [Convert]::ToBase64String((1..32 | ForEach-Object { Get-Random -Maximum 256 })) # Or Linux/Mac openssl rand -base64 32
-
Setup Gmail App Password:
- Enable 2FA on your Google account
- Visit https://myaccount.google.com/apppasswords
- Create an app password for "Mail"
-
Create Supabase Project:
- Sign up at https://supabase.com
- Create new project
- Run
supabase-staff-schema.sqlin SQL Editor - Copy Project URL and Anon Key
-
Configure Environment:
cp .env.example .env.local # Edit .env.local with your credentials
For detailed instructions, see docs/SECURITY_IMPLEMENTATION.md.
# Start with Socket.io real-time support
pnpm dev
# Or start without Socket.io (legacy mode)
pnpm dev:nextVisit http://localhost:3000 while the dev server is running.
Note: Use pnpm dev for full real-time chat features with Socket.io.
This project uses Supabase for authentication and enterprise-grade security:
Implemented Security Features:
- Password Hashing: bcrypt with 12 salt rounds
- JWT Sessions: 24-hour expiry with signed tokens
- Two-Factor Auth: TOTP with QR codes and backup codes
- Rate Limiting: 5 login attempts per 15 minutes
- Email Notifications: Professional templates for all events
- Supabase Database: PostgreSQL with RLS policies
Quick Setup:
-
Create a Supabase project at https://supabase.com/dashboard
-
Run the database schema: Execute
supabase-staff-schema.sqlin the SQL Editor -
Configure environment variables in
.env.local:# Supabase NEXT_PUBLIC_SUPABASE_URL=your-project-url.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key # JWT JWT_SECRET=your-generated-secret-from-above # Email (Gmail example) SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USER=your-email@gmail.com SMTP_PASSWORD=your-app-password SMTP_FROM_EMAIL=your-email@gmail.com SMTP_FROM_NAME=Lab68 Dev Platform # AI Configuration (RAG + Ollama) OLLAMA_URL=http://localhost:11434 OLLAMA_MODEL=deepseek-r1:7b
-
Restart your dev server:
pnpm dev
Default Admin Account:
- Email:
admin@lab68dev.com - Password:
Admin@123456 - Change this immediately in production!
For detailed setup instructions, see docs/SECURITY_QUICKSTART.md.
pnpm build
pnpm startThe build step runs Next.js static analysis, type-checking, and route bundling.
| Area | Summary |
|---|---|
| AI Tools | AI development assistant with local Ollama support. Features include code generation, debugging help, architecture advice, real-time chat with avatars, message history, copy-to-clipboard, and privacy-first local processing with zero API costs. |
| Localization | getTranslations deep-merges locale entries with English defaults to prevent missing key errors. |
The AI Tools feature (/dashboard/ai-tools) provides an intelligent development assistant with RAG (Retrieval-Augmented Generation) - AI that knows your platform inside-out!
- π§ RAG-Enhanced AI β AI powered by your documentation, features, and codebase using vector embeddings
- π€ Smart AI Assistant β Code generation, debugging, architecture decisions, and technical guidance
- π Context-Aware β Answers based on your actual platform documentation via RAG retrieval
- π Complete Privacy β All processing and data stays on your infrastructure (Ollama + Supabase pgvector)
- π° Zero Cost β No API fees, unlimited usage with local Ollama
- π Offline Capable β Works without internet connection
- π¬ Modern Chat UI β User/AI avatars, message bubbles, copy-to-clipboard, typing indicators
- π Real-time Status β Shows Ollama + RAG status
- π§Ή Clear Chat β Reset conversation anytime
- π Message Counter β Track conversation length and character count
- β‘ Fast Retrieval β Cosine similarity search with Supabase pgvector (sub-100ms)
RAG (Retrieval-Augmented Generation) combines semantic search with AI generation:
- Your Question β Converted to embedding vector
- Vector Search β Finds relevant docs from your knowledge base
- AI Generation β Ollama uses the context to answer accurately
Result: AI that actually knows your platform, features, and documentation!
# Windows: Download from https://ollama.com
# macOS: brew install ollama
# Linux: curl -fsSL https://ollama.com/install.sh | sh# Recommended for coding (4.7GB)
ollama pull deepseek-r1:7b
# Other options:
ollama pull llama3.2 # Fast, lightweight (2GB)
ollama pull codellama # Code-specialized (3.8GB)
ollama pull qwen2.5-coder:7b # Excellent for programmingSee docs/RAG_QUICKSTART.md for setup:
# 1. Run SQL schema in Supabase
# 2. Index your knowledge base
pnpm run index-knowledge
# 3. Test it!
# Visit http://localhost:3000/dashboard/ai-toolspnpm dev
# Navigate to http://localhost:3000/dashboard/ai-toolsSee docs/OLLAMA_SETUP.md for detailed Ollama setup.
See docs/RAG_SYSTEM.md for complete RAG documentation.
- π Document Embeddings β All docs indexed with semantic vectors
- π Smart Search β Finds relevant content via cosine similarity
- β‘ Fast Retrieval β < 10ms search with pgvector indexes
- π― Category Filtering β Search by documentation, features, code, etc.
- π Easy Updates β Re-index when docs change
- π Similarity Scores β See how relevant each context is
For production, run Ollama on a separate server:
-
Deploy Next.js on Vercel (or any platform)
-
Setup Ollama server on VPS (AWS EC2, DigitalOcean, Hetzner)
-
Configure Supabase with pgvector extension
-
Run indexer to populate knowledge base
-
Set environment variables:
OLLAMA_URL=https://ai.yourdomain.com NEXT_PUBLIC_SUPABASE_URL=your-supabase-url NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
Benefits:
- β Complete privacy - your data never leaves your infrastructure
- β Zero API costs - no per-request charges
- β Unlimited usage - no rate limits or quotas
- β Fast responses - no network latency (with good hardware)
- β Full control - choose any model, customize parameters
- β Platform-specific knowledge - AI trained on YOUR docs
| Area | Summary |
|---|---|
| Staff Portal | Full admin interface at /staff/dashboard with user management, analytics, activity logging, and role-based access control (admin/support/moderator). |
| Dashboard Overview | Snapshot of active projects, AI assistant, system metrics, and notifications. |
| Projects & Kanban | Create projects, assign collaborators, manage roles, and move cards across kanban columns. |
| Team Management | lib/team.ts exposes helpers for permissions, activity logging, and "time ago" formatting. |
| Authentication | Secure user authentication powered by Supabase Auth with email/password, session management, and protected routes. |
| Chat & Messaging | Real-time with Socket.io - Instant messaging, typing indicators, online presence, message reactions, edit/delete in real-time. Direct messages and group chats with live updates. See docs/SOCKETIO_CHAT.md |
| Comments System | Contextual collaboration on tasks, diagrams, and projects with threaded comments, mentions, and resolution tracking. |
| Whiteboard | Collaborative drawing canvas with freehand pen, shapes (rectangle, circle, line), text, color picker, stroke width, fill options, undo/redo, export to PNG/SVG, and collaborator invitations. |
| Files Library | Upload files from your computer (max 10MB), add external links, categorize by project/task/meeting, search and filter by type and category. |
| Resume Editor | Live WYSIWYG resume builder with drag-and-drop section reordering, real-time color picker, 6 professional fonts, 3 font sizes, 5 customizable templates (Modern, Classic, Minimal, Creative, Professional with photo support), A4 paper preview (210mm Γ 297mm), section visibility controls, and localStorage persistence. Export-ready for PDF generation. |
| Meetings & Planning | Schedule meetings, capture plans/milestones, and log progress. |
| Wiki & Community | Knowledge base articles, category filtering, and community discussion threads. |
| AI Tools | Local AI assistant with Ollama - code generation, debugging, architecture advice, privacy-first with zero API costs. |
| Localization | getTranslations deep-merges locale entries with English defaults to prevent missing key errors. |
- Base copy lives in the English dictionary inside
lib/i18n.ts. - Additional locales provide override objects; missing keys automatically fall back to English.
- Translation maintenance scripts (e.g.,
restore_translations.js,fix_final_issues.js) exist for bulk fixes and encoding repair. - To add a new locale, extend the
Languageunion and append a dictionary entry mirroring the existing structure.
The Live Resume Editor (/dashboard/resume) is a professional WYSIWYG resume builder with real-time preview and extensive customization options.
- Live Preview β A4 paper format (210mm Γ 297mm) with instant updates as you type
- Drag-and-Drop Sections β Reorder resume sections (Summary, Experience, Education, Skills, Certifications) by dragging
- Color Customization β Primary and secondary color pickers with hex input for brand consistency
- Font Selection β 6 professional fonts: Inter, Arial, Georgia, Roboto, Times New Roman, Courier New
- Font Sizing β Three size presets (Small, Medium, Large) for readability control
- 5 Professional Templates:
- Modern β Clean design with circular photo, blue accents, and modern borders
- Classic β Traditional professional layout without photo
- Minimal β Simple and elegant with lots of whitespace
- Creative β Colorful gradient design with rounded cards and square photo
- Professional β Executive 2-column layout with sidebar and photo
- Section Visibility β Show/hide sections without deleting content
- Photo Upload β Add profile photos to templates that support them (Modern, Creative, Professional)
- Auto-save β LocalStorage persistence to prevent data loss
- Sample Data β Pre-filled professional example for quick start
- Navigate to Dashboard β Resume Editor
- Select a template from the left sidebar
- Customize colors and fonts using the style controls
- Fill in your information in the center panel
- Drag sections to reorder them
- Toggle section visibility with the eye icon
- Upload a photo (for compatible templates)
- View live changes in the A4 preview on the right
- Click Save to persist to browser storage
- Click Download PDF when ready (feature in development)
- Component:
app/dashboard/resume/page.tsx - State Management: React hooks with TypeScript strict mode
- Layout: 12-column grid (2:4:6 ratio for controls:editor:preview)
- Responsive: Scrollable panels with hidden scrollbars for clean UI
- Export Ready: Structured for future PDF generation integration
| Command | Description |
|---|---|
pnpm dev |
Start the Next.js development server on port 3000 (auto reload + hot module replacement). |
pnpm build |
Compile the production build, run type checks, and output .next/. |
pnpm start |
Serve the production build (requires pnpm build first). |
pnpm lint |
Run ESLint across the project (configure in package.json). |
Some automation scripts live in the repository root and are intended for one-off translation repair tasks. They read/write
lib/i18n.tsβuse with caution and commit the results after validation.
Create a .env.local file for runtime secrets (API keys, analytics, auth providers, etc.). Next.js automatically loads this file in development. Sensitive values are not committed to the repository.
- Fork the repository and create a feature branch (
git checkout -b feature/amazing-idea). - Keep commits scoped and descriptive.
- Run
pnpm build(or at minimumpnpm lint) before pushing. - Open a pull request with context about the change and screenshots when UI elements are involved.
We welcome enhancements to the workspace features, translation coverage, accessibility, and DX tooling.
This project is licensed under the Apache License 2.0.
- GitHub Issues: lab68dev-platform/issues
- Founder / Maintainer: @F4P1E
- Co-founder / Assistant: @mthutt
Let us know how you are using Lab68 Dev Platform or what you would like to see next!