An open API service indexing awesome lists of open source software.

https://github.com/victory-labs/headlesswp-react-router-example

Headless WordPress with React Router
https://github.com/victory-labs/headlesswp-react-router-example

headless react-router wordpress

Last synced: about 2 months ago
JSON representation

Headless WordPress with React Router

Awesome Lists containing this project

README

          

# HeadlessWP React Router Example

A modern, production-ready template demonstrating how to build headless WordPress applications using React Router. This project showcases the integration of WordPress content with a modern React frontend, featuring a shadcn/ui powered dashboard for managing posts and pages.

## Features

- 🔌 Headless WordPress integration
- 📱 Modern dashboard UI powered by shadcn/ui
- 📝 WordPress posts and pages management
- 🚀 Server-side rendering
- ⚡️ Hot Module Replacement (HMR)
- 📦 Asset bundling and optimization
- 🔄 Data loading and mutations
- 🔒 TypeScript by default
- 🎉 TailwindCSS for styling
- 📖 [React Router docs](https://reactrouter.com/)

## Getting Started

### Prerequisites

- A WordPress installation with the HeadlessWP plugin activated
- Node.js and npm installed

### Installation

Install the dependencies:

```bash
npm install
```

### Development

Start the development server with HMR:

```bash
npm run dev
```

Your application will be available at `http://localhost:5173`.

## Configuration

Configure your WordPress endpoint in the environment variables:

```env
WORDPRESS_API_URL=your-wordpress-url
```

## Styling

This template uses [Tailwind CSS](https://tailwindcss.com/) for styling and [shadcn/ui](https://ui.shadcn.com/) for component architecture, providing a modern and customizable UI experience.

---

Built with ❤️ using React Router and HeadlessWP.