Overview:
This repository is a full-stack sample web application based on Next.js that provides a whole-website architecture. It includes foundational services, components, and plumbing to quickly set up and run a basic web application.
Features:
- Navigation support
- Parameter acquisition
- Pagination
- Basic components
- Authorization
- Login and register functionality
- Network requests
- Routes demo
- API demo
- CRUD demo
- JWT demo
- Dynamic routes demo
- File import
- SEO premium
- Static pages
- Incremental static regeneration
- Remote download
- Fully static HTML files generation
- Custom server support
- Frontend page interacts with Node
- Alias support
- Local PHP service association
- Server deployment
- Docker deployment
- Redux supplement (for navigation)
- Redux SSR (for homepage)
- Custom server support Socket.io
- End-to-end typesafe API (gRPC)
- React UI components libraries integration with React Pure Bootstrap
Installation:
- Make sure Node.js is installed on your computer.
- Install dependencies by running
npm install
in your project directory. - To run the project in development mode, use the command
npm run dev
. This will compile the files and host the application onhttp://localhost:3000
. - For production build, use the command
npm run build
. Note that this mode will generate static data. - To start a Next.js production server, use the command
npm start
. - If you want to start the PHP server independently, make sure PHP is installed on your computer and use a PHP server environment with a local port of 4000.
- To deploy the Node server on a hosting server, use the following commands:
- For production mode:
npm run deploy:prod
- For development mode:
npm run deploy:dev
- If it doesn’t work due to Node permissions, try using the following commands:
sudo npm run deploy:prod
sudo npm run deploy:dev
- For production mode:
- To export your Next.js application to static HTML, follow these steps:
- Step 1: Generate static resources by running
npm run export
. - Step 2: Fix file names for HTML files by running the command
npm run fix-filenames
. - Step 3: Preview the static site by running
npm run serve-static-site
. The HTML static website will be located in the directory.out/
.
- Step 1: Generate static resources by running
Summary:
This repository offers a full-stack Next.js application template that provides the necessary architecture and components to quickly build and deploy a basic web application. It includes features like navigation, authentication, API integration, dynamic routes, static page generation, and more. The installation process involves installing dependencies, running the application in development or production mode, and deploying it on a custom server if needed.