Repository navigation
V0.5 PLAN
Goal: Get nself-admin to 100% production-ready status Target: February 2026 Current State: v0.4.0 (192 pages, 222 API routes)
v0.5.0 focuses on stability, polish, and production readiness rather than new features. The admin UI has grown to 192 pages and 222 API routes. Now it's time to:
- Fix technical debt (8 known issues)
- Add missing critical features (real-time updates, error handling, testing)
- Polish UX (loading states, error messages, mobile responsiveness)
- Harden security (session management, CSRF, rate limiting)
- Achieve production quality (testing, docs, monitoring)
Priority: Critical Files to fix: 8 known issues from v0.2 code review
| Issue | File | Fix Required | Impact |
|---|---|---|---|
| VariableRow remount | env/page.tsx |
Move component outside parent | Performance |
| Unused nav properties | navigation.ts |
Remove or implement rendering | Code clarity |
| Massive help page | help/page.tsx |
Split into sections | Maintainability |
| Interactive command | nselfCLI.ts |
Remove or replace | Broken feature |
| Loose error typing | nselfCLI.ts |
Add proper Error types | Type safety |
| Missing toast dismiss | 3 config pages | Add auto-dismiss | UX consistency |
| CLI output parsing | validate/route.ts |
Refactor into helper | Maintainability |
| Raw HTML in Vault | vault/page.tsx |
Convert to shadcn | Consistency |
Deliverables:
- All 8 issues resolved
- New lint rules to prevent regressions
- Code review checklist updated
Priority: High Goal: Enable strict mode across entire codebase
- Enable
strict: truein tsconfig.json - Fix all type errors (estimate: ~50-100)
- Add return types to all exported functions
- Remove all
anytypes (replace with proper types) - Add strict null checks
Deliverables:
- Zero TypeScript errors with strict mode
- Type coverage report >95%
Priority: Medium Goal: Enforce consistent code style
- Add stricter ESLint rules:
-
no-console(except error/warn) -
no-unused-varswith underscore exception consistent-returnprefer-constno-var- Configure Prettier line length (80 or 100)
- Add import sorting rules
- Pre-commit hook for lint+format
Deliverables:
- Updated ESLint config
- All files pass new rules
- Git hooks configured
Priority: Critical Goal: Live updates without page refresh
What needs real-time:
- Docker container status (running/stopped/healthy)
- Service health checks
- Build/deploy progress
- Log streaming
- Database query execution
Implementation:
- WebSocket server setup (Socket.io already installed)
- Client-side connection manager
- Reconnection logic with exponential backoff
- Presence tracking (who's online)
- Event batching for efficiency
Files to create:
-
src/lib/websocket-server.ts- Server setup -
src/lib/websocket-client.ts- Client hook -
src/hooks/useRealtime.ts- React hook for components -
src/app/api/ws/route.ts- WebSocket endpoint
Files to update:
- Dashboard: Add real-time container status
- Logs page: Stream logs instead of polling
- Build page: Real-time build output
- Deploy pages: Live deploy progress
Deliverables:
- WebSocket infrastructure working
- 5+ pages using real-time updates
- Automatic reconnection tested
- Performance: <100ms latency
Priority: Critical Goal: Graceful error handling everywhere
Current problems:
- API errors show generic "Failed" messages
- No retry logic for failed requests
- No offline mode detection
- Errors don't include actionable guidance
Implementation:
- Global error boundary component
- API error interceptor with retry logic
- Offline detection with banner
- Error codes mapped to user messages
- Error reporting (optional Sentry integration)
Files to create:
src/components/ErrorBoundary.tsx-
src/lib/api-client.ts- Fetch wrapper with retry -
src/lib/error-messages.ts- Error code mapping src/components/OfflineBanner.tsx
Files to update:
- All API route handlers: Consistent error format
- All client API calls: Use new fetch wrapper
- Layout: Add error boundary
Error format standard:
{
success: false,
error: {
code: "DB_CONNECTION_FAILED",
message: "Unable to connect to database",
userMessage: "Check if PostgreSQL is running",
action: "Run 'nself doctor' to diagnose",
details: { /* ... */ }
}
}Deliverables:
- Error boundary catches all React errors
- API client retries failed requests (max 3)
- Offline banner appears when network down
- All error messages actionable
Priority: High Goal: No blank screens or loading spinners
Current problems:
- Many pages show blank while loading
- Inconsistent loading indicators
- No skeleton screens
Implementation:
- Create skeleton components for each layout type
- Add Suspense boundaries with skeletons
- Optimistic UI updates where possible
- Progressive loading for large datasets
Files to create:
src/components/skeletons/DashboardSkeleton.tsxsrc/components/skeletons/TableSkeleton.tsxsrc/components/skeletons/FormSkeleton.tsxsrc/components/skeletons/CardGridSkeleton.tsx
Files to update:
- Dashboard: Skeleton while loading
- Database pages: Table skeleton
- Config pages: Form skeleton
- All list pages: Card grid skeleton
Deliverables:
- All pages have skeleton states
- Zero blank loading screens
- Perceived load time <500ms
Priority: Critical Goal: Secure, persistent sessions
Current state:
- Sessions expire after 24h (good)
- No session refresh mechanism
- No "remember me" option
- No active session list
Implementation:
- Session refresh before expiry
- "Remember me" checkbox (30-day sessions)
- Active sessions page (device, IP, last active)
- Revoke session capability
- CSRF token on all mutations
- Rate limiting on auth endpoints
Files to create:
-
src/app/settings/sessions/page.tsx- Active sessions -
src/app/api/auth/sessions/route.ts- List sessions -
src/app/api/auth/sessions/revoke/route.ts- Revoke -
src/lib/csrf.ts- CSRF token generation
Files to update:
-
src/lib/auth-db.ts: Add session refresh logic - Login page: Add "remember me" checkbox
- All mutation API routes: Check CSRF token
Deliverables:
- Sessions auto-refresh at 20h mark
- Remember me works (30-day sessions)
- Active sessions page functional
- CSRF protection on all mutations
- Rate limiting: 5 login attempts per minute
Priority: High Goal: >80% test coverage
What to test:
- All utility functions (
src/lib/*) - All API route handlers
- All React hooks
- Critical components (forms, tables)
Setup:
- Jest configured for Next.js 15
- React Testing Library setup
- Mock Docker API
- Mock LokiJS database
- Test coverage reporting
Test files to create (estimate: ~50 test files):
src/lib/__tests__/auth-db.test.tssrc/lib/__tests__/database.test.tssrc/lib/__tests__/project-utils.test.tssrc/lib/__tests__/nselfCLI.test.tssrc/app/api/auth/__tests__/login.test.ts- ... (all API routes)
src/components/__tests__/ErrorBoundary.test.tsx- ... (critical components)
Deliverables:
- 80%+ code coverage
- All critical paths tested
- CI runs tests on every PR
- Test documentation
Priority: Medium Goal: Critical user flows tested
Flows to test:
- Login → Dashboard → View Services
- Login → Config → Edit .env → Save → Build
- Login → Database → Run Query
- Login → Deploy → Deploy to Staging
- Login → Logs → View Container Logs
Setup:
- Playwright configured
- Test database setup/teardown
- Mock nself CLI for tests
- Headless browser CI
Test files to create (estimate: ~10 test files):
-
e2e/auth.spec.ts- Login/logout flow -
e2e/config.spec.ts- Config editing -
e2e/database.spec.ts- Database queries -
e2e/deploy.spec.ts- Deploy flow -
e2e/services.spec.ts- Service management
Deliverables:
- 5 critical flows tested
- E2E tests run in CI
- Screenshots on failure
Priority: Medium Goal: Fast page loads, no jank
Metrics to achieve:
- First Contentful Paint: <1s
- Time to Interactive: <2s
- Lighthouse Score: >90
- Bundle size: <500KB gzipped
Optimizations:
- Code splitting on route level
- Dynamic imports for heavy components
- Image optimization (next/image)
- Font optimization
- Remove unused dependencies
- Lazy load icons (lucide-react tree-shaking)
Tools:
- Lighthouse CI
- Bundle analyzer
- React DevTools Profiler
Deliverables:
- Lighthouse score >90
- Bundle size <500KB
- Zero performance warnings
Priority: High Goal: Usable on tablets, readable on phones
Current state:
- Desktop-first design
- Some pages overflow on mobile
- Touch targets too small
Implementation:
- Tablet breakpoint (768px): Usable UI
- Mobile breakpoint (640px): Readable content
- Touch-friendly buttons (min 44x44px)
- Responsive tables (horizontal scroll or cards)
- Mobile navigation (hamburger menu)
Pages to fix (priority order):
- Dashboard (most used)
- Services list
- Logs viewer
- Database console
- Config editor
- All other pages
Deliverables:
- All pages usable on tablet
- Dashboard + critical pages readable on mobile
- Mobile navigation working
Priority: High Goal: WCAG 2.1 AA compliance
Implementation:
- Semantic HTML everywhere
- Keyboard navigation working
- Focus visible on all interactive elements
- ARIA labels on icon buttons
- Color contrast meets AA standard
- Screen reader testing
Tools:
- axe DevTools
- NVDA/JAWS screen reader testing
- Keyboard-only navigation testing
Deliverables:
- Zero critical a11y issues
- Keyboard navigation works everywhere
- Screen reader friendly
Priority: Medium Goal: Proper dark theme support
Current state:
- next-themes installed
- Some color inconsistencies
Implementation:
- Audit all color usage
- Define dark mode color palette
- Fix hard-coded colors
- Test all pages in dark mode
- Add theme toggle in header
Deliverables:
- Dark mode works on all pages
- No color contrast issues
- Smooth theme switching
Priority: Medium Goal: Guide users through empty states
Current problems:
- Empty pages show blank or "No data"
- No guidance on what to do next
Implementation:
- Empty state components for each section
- Clear CTAs on empty states
- First-time user tooltips
- Onboarding checklist on dashboard
- "What's Next" suggestions
Files to create:
src/components/EmptyState.tsxsrc/components/OnboardingChecklist.tsxsrc/components/Tooltip.tsx
Empty states needed:
- No services running
- No database backups
- No plugins installed
- No deployments
- No logs available
Deliverables:
- All empty states have CTAs
- Onboarding checklist working
- Tooltips on first visit
Priority: High Goal: Users can find help without leaving the app
Implementation:
- Contextual help panels (? icon)
- Command reference (already exists at
/help) - Troubleshooting guide
- FAQ section
- Video tutorial links
Files to create:
src/app/help/troubleshooting/page.tsxsrc/app/help/faq/page.tsxsrc/app/help/videos/page.tsxsrc/components/HelpPanel.tsx
Deliverables:
- Help accessible from all pages
- Troubleshooting guide covers 20+ issues
- FAQ answers 30+ questions
Priority: High Goal: Clear setup instructions
Files to update:
-
README.md: Complete rewrite -
docs/DEPLOYMENT.md: Production deployment guide -
docs/DEVELOPMENT.md: Local dev setup -
docs/ARCHITECTURE.md: Code structure guide
README sections:
- What is nself-admin
- Features
- Quick start (3 commands)
- Screenshots
- Documentation links
- Contributing guide
Deliverables:
- README clear and complete
- Deployment guide tested
- Development guide tested
Priority: Critical Goal: Production-optimized Docker image
Current Dockerfile review:
- Multi-stage build ✅
- Alpine base ✅
- Non-root user ✅
Optimizations needed:
- Layer caching optimization
- Smaller base image if possible
- Health check endpoint
- Graceful shutdown
- Environment variable documentation
Files to update:
-
Dockerfile: Optimize -
docker-compose.yml: Production example -
.dockerignore: Exclude more files
Deliverables:
- Docker image <600MB
- Startup time <10s
- Health check working
- Graceful shutdown
Priority: High Goal: Automated testing and deployment
GitHub Actions workflows:
- Lint + Type Check (on PR)
- Unit Tests (on PR)
- E2E Tests (on PR)
- Build (on PR)
- Deploy to staging (on merge to main)
- Release to Docker Hub (on tag)
- GitHub Release creation (on tag)
Files to create:
.github/workflows/test.yml.github/workflows/deploy.yml.github/workflows/release.yml
Deliverables:
- CI runs on every PR
- Auto-deploy to staging
- Auto-release on tag
Priority: High Goal: Fast, smooth workflow
Optimizations:
- Database query optimization
- API response caching
- Static asset caching
- Bundle splitting
- Lazy loading
- Prefetching critical data
Deliverables:
- All pages load <1s
- Zero layout shift
- Smooth animations
Priority: Critical Goal: Production-ready security
Checklist:
- No secrets in code
- CSRF protection enabled
- Rate limiting on all auth endpoints
- SQL injection prevention (parameterized queries)
- XSS prevention (React escaping + CSP headers)
- Command injection prevention (execFile only)
- Session fixation prevention
- Clickjacking prevention (X-Frame-Options)
- HTTPS enforcement (production)
- Security headers (Helmet.js)
Tools:
- npm audit
- OWASP ZAP
- Snyk
- Manual penetration testing
Deliverables:
- Zero critical vulnerabilities
- Security headers configured
- Penetration test report
Priority: Medium Goal: Observable in production
Implementation:
- Structured logging (Winston or Pino)
- Error tracking (optional Sentry)
- Performance monitoring (optional)
- Health check endpoint improvements
- Metrics endpoint (Prometheus format)
Files to create:
src/lib/logger.tssrc/app/api/metrics/route.tssrc/app/api/health/detailed/route.ts
Deliverables:
- All errors logged with context
- Health check reports all services
- Metrics endpoint working
Priority: Critical Goal: v0.5.0 ready to ship
Checklist:
- All tech debt fixed
- All tests passing
- Documentation complete
- CHANGELOG.md updated
- Migration guide (v0.4 → v0.5)
- Version bumped to 0.5.0
- Docker build tested
- Staging deployment tested
Files to update:
-
package.json: version 0.5.0 -
src/lib/constants.ts: VERSION = '0.5.0' -
CHANGELOG.md: v0.5.0 release notes -
docs/MIGRATION.md: v0.4 → v0.5 guide
Deliverables:
- Release notes written
- Migration guide tested
- All blockers resolved
- Test Coverage: >80%
- Lighthouse Score: >90
- Bundle Size: <500KB gzipped
- Page Load Time: <1s (FCP)
- Type Coverage: >95%
- Zero Critical Bugs: No P0/P1 issues
- Docker Image: <600MB
- API Response Time: <200ms (p95)
- Mobile Usable: Can view dashboard on tablet
- Error Messages: All actionable and clear
- Documentation: User can self-serve
- Accessibility: Keyboard navigation works
- Security: Passes OWASP top 10 checklist
After v0.5.0 is released, future versions:
- v0.5.x: Bug fixes, security patches
- v0.6.0: New features (multi-user, RBAC)
- v0.7.0: Environment switching (local/staging/prod)
- v0.8.0: Advanced features (CI/CD gen, SDK gen)
- v0.9.0: Final polish before 1.0
- v1.0.0: Production-stable release
| Week | Phase | Deliverables | Risk |
|---|---|---|---|
| 1 | Tech Debt & Code Quality | 8 issues fixed, strict mode enabled | Low |
| 2 | Critical Missing Features | Real-time updates, error handling, loading states, sessions | Medium |
| 3 | Testing & Quality | 80% coverage, E2E tests, performance testing | High |
| 4 | UX Polish | Mobile responsive, a11y, dark mode, empty states | Medium |
| 5 | Documentation & Deployment | Docs complete, Docker optimized, CI/CD | Low |
| 6 | Final Polish & Release | Security audit, monitoring, release prep | Medium |
High Risk: Testing phase - may uncover bugs requiring fixes Medium Risk: Real-time updates - new infrastructure Low Risk: Documentation and polish - straightforward work
- Any critical bugs discovered in v0.5.0
- Security patches
- Performance hotfixes
- Multi-user support
- Role-based access control (RBAC)
- Team management
- Invite system
- Environment switching UI (local/staging/prod)
- Remote server management
- SSH key management
- Cross-environment sync
v0.5.0 is about completing the foundation and making nself-admin production-ready. After this release:
✅ Users can rely on it in production ✅ Codebase is maintainable and tested ✅ UX is polished and professional ✅ Security is hardened ✅ Documentation is complete
This sets up a solid foundation for adding advanced features in v0.6+ without constantly fixing tech debt.
Version: 1.0.0 | Updated: 2026-10-19 11:40 UTC | GitHub