Skip to content

waqas1412/react19-nexus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

React 19 Nexus

React TypeScript Vite License

Production-grade micro-frontend architecture showcasing React 19.2.0 features

Live Demo β€’ Documentation β€’ Architecture


⚑ Features

Features

🎯 React 19 Core

  • Actions - Server actions with automatic pending states
  • useOptimistic - Instant UI updates with rollback
  • use() API - Promise unwrapping in components
  • Suspense - Streaming & progressive rendering
  • Document Metadata - Built-in SEO support

πŸ—οΈ Architecture

  • Micro-Frontends - Feature-based modules
  • Event Bus - Decoupled communication
  • Lazy Loading - Code splitting by default
  • Type Safety - Full TypeScript coverage
  • Scalable - Production-ready patterns

πŸš€ Quick Start

# Clone
git clone https://github.com/waqas1412/react19-nexus.git
cd react19-nexus

# Install
pnpm install

# Dev
pnpm dev

# Build
pnpm build

Open β†’ http://localhost:5173


πŸ›οΈ Architecture

Architecture

src/
β”œβ”€β”€ features/          # 🎯 Micro-Frontends
β”‚   β”œβ”€β”€ tasks/        #    Task management
β”‚   β”œβ”€β”€ dashboard/    #    Analytics
β”‚   └── analytics/    #    Metrics
β”œβ”€β”€ shell/            # 🐚 Application Shell
β”‚   β”œβ”€β”€ components/   #    Layout, Router
β”‚   └── hooks/        #    Shell hooks
└── shared/           # πŸ”§ Shared Resources
    β”œβ”€β”€ components/   #    UI components
    β”œβ”€β”€ hooks/        #    Custom hooks
    └── utils/        #    Event bus, helpers

Feature Isolation

Each feature is independent with:

  • Own components, hooks, services
  • Lazy-loaded on demand
  • Event-driven communication
  • Isolated state management

πŸ’Ž React 19 in Action

Actions + useActionState

const [state, submitAction, isPending] = useActionState(
  async (_prevState, formData) => {
    const task = await createTask(formData.get('title'));
    return { success: true, task };
  }
);

useOptimistic

const [optimisticTasks, updateOptimistic] = useOptimistic(
  tasks,
  (state, action) => {
    return state.map(t => 
      t.id === action.id ? { ...t, completed: !t.completed } : t
    );
  }
);

use() API + Suspense

<Suspense fallback={<Loading />}>
  <DataComponent />
</Suspense>

function DataComponent() {
  const data = use(fetchData()); // ✨ Promise unwrapping
  return <div>{data.value}</div>;
}

🎨 UI Showcase

Glassmorphism Design

  • Frosted glass effects
  • Neon accents (cyan, purple, pink)
  • Smooth animations
  • Dark cyberpunk theme

Performance

  • Bundle: 311KB (99KB gzipped)
  • Code Splitting: Automatic by feature
  • Lazy Loading: All routes
  • Animations: Framer Motion

πŸ“¦ Tech Stack

Category Technology
Framework React 19.2.0
Language TypeScript 5.9
Build Vite 7.1
Styling Tailwind CSS 3.4
Animation Framer Motion 12
Testing Vitest + RTL
Linting ESLint 9 (Flat Config)

πŸ§ͺ Testing

pnpm test          # Run tests
pnpm test:ui       # UI mode
pnpm test:coverage # Coverage report

12 tests across components, hooks, and features.


πŸ“š Documentation


🎯 Principles

SOLID

βœ… Single Responsibility
βœ… Open/Closed
βœ… Liskov Substitution
βœ… Interface Segregation
βœ… Dependency Inversion

Best Practices

βœ… DRY (Don't Repeat Yourself)
βœ… Feature-based structure
βœ… Type safety everywhere
βœ… Event-driven architecture
βœ… Lazy loading by default


πŸ“ˆ Performance Metrics

Metric Value
Lighthouse 95+
First Contentful Paint < 1.5s
Time to Interactive < 3.0s
Bundle Size 99KB (gzipped)

🀝 Contributing

Contributions welcome! See CONTRIBUTING.md


πŸ“„ License

MIT Β© Waqas1412


Built with ⚑ by @waqas1412

⭐ Star this repo if you find it useful!

About

πŸš€ Production-grade React 19 micro-frontend architecture with futuristic UI - Showcasing Actions, Suspense, useOptimistic & latest features

Topics

Resources

License

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors