|
1 |
| -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). |
| 1 | +## 🎨 Next.js WooCommerce REST API |
| 2 | +[](https://www.repostatus.org/#active) |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
2 | 7 |
|
3 |
| -## Getting Started |
| 8 | +- React WooCommerce Theme, using Decoupled Architecture in Next.js |
| 9 | +- Backend in WordPress |
| 10 | +- Front end in React. |
| 11 | +- Data is Fetched through REST API. |
4 | 12 |
|
5 |
| -First, run the development server: |
| 13 | +## Features |
| 14 | +1. Home Page, Blog Page, Post Page |
| 15 | +2. Post Preview ( Coming Soon ) |
| 16 | +3. Product Pagination ( Coming Soon ) |
| 17 | +4. Load More Products ( Coming Soon ) |
| 18 | +8. REST API endpoints. |
| 19 | +9. Header and Footer in Next.js fetching from WordPress Menu items. |
| 20 | +10. WordPress Widgets displayed on Next.js frontend. |
| 21 | +11. Site title, tagline, copyright text, social links sourced from WordPress. |
| 22 | +12. Next.js Image component, that has image optimization at request time ( Coming Soon ) |
| 23 | +13. Authentication with JWT and Http Only Cookie implementation. ( Coming Soon ) |
| 24 | +14. Login feature for WP Post Preview in Next.js ( Coming Soon ) |
| 25 | +15. Incremental Static (Re)generation and automatic creation of New Static post pages |
| 26 | + without having to re-build next.js the application. ( Coming Soon ) |
| 27 | +14. Gutenberg styles support ( Coming Soon ) |
| 28 | + |
| 29 | +## [Tutorial Course](https://www.youtube.com/playlist?list=PLD8nQCAhR3tSRwsvzRtogv9MFkEWo5d9c) |
| 30 | + |
| 31 | +## [Live Demo Link](#) |
| 32 | +Coming Soon. |
| 33 | + |
| 34 | +## Setup |
| 35 | + |
| 36 | +First clone/fork the repo and cd into it. |
6 | 37 |
|
7 | 38 | ```bash
|
| 39 | +git clone https://github.com/imranhsayed/nextjs-woocommerce-restapi.git |
| 40 | +cd nextjs-woocommerce-restapi |
| 41 | +npm install |
8 | 42 | npm run dev
|
9 |
| -# or |
10 |
| -yarn dev |
11 | 43 | ```
|
12 | 44 |
|
13 |
| -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 45 | +## Add Headless features for WordPress |
| 46 | + |
| 47 | +- Install and Activate following WordPress Plugins: |
| 48 | + |
| 49 | +* [headless-cms](https://github.com/imranhsayed/headless-cms) |
| 50 | +* [woocommerce](https://wordpress.org/plugins/woocommerce/) |
| 51 | + |
| 52 | +## Configuration :wrench: |
14 | 53 |
|
15 |
| -You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. |
| 54 | +1. (Required) Create a `.env` file taking reference from `.env-example` and update your WordPressSite URL. |
| 55 | +- `NEXT_PUBLIC_WORDPRESS_URL=https://example.com` |
16 | 56 |
|
17 |
| -## Learn More |
| 57 | +2. In your WordPress Dashboard, Go to Settings > General > Site Address (URL) ( Set this to Frontend URL e.g. http://localhost:3000 during development ) |
| 58 | +3. Create the Header and Footer Menus In WordPress Dashboard and set them to HCMS Header menu and HCMS Footer Menu respectively. |
18 | 59 |
|
19 |
| -To learn more about Next.js, take a look at the following resources: |
| 60 | +## Versioning :bookmark_tabs: |
20 | 61 |
|
21 |
| -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
22 |
| -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 62 | +I use [Git](https://github.com/) for versioning. |
23 | 63 |
|
24 |
| -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
| 64 | +## Author :bust_in_silhouette: |
25 | 65 |
|
26 |
| -## Deploy on Vercel |
| 66 | +* **[Imran Sayed](https://twitter.com/imranhsayed)** |
27 | 67 |
|
28 |
| -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/import?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 68 | +## License :page_with_curl: |
29 | 69 |
|
30 |
| -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
| 70 | +This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details |
0 commit comments