Sandbox Frontend is a React-based frontend application built with TypeScript and Next.js. It serves as a sandbox project for experimenting with modern frontend development practices.
- React & Next.js: Leverages the power of React and Next.js for server-side rendering and static site generation.
- TypeScript: Ensures type safety and better developer experience.
- Dynamic Metadata: Metadata such as the app name and description are dynamically loaded from a centralized
config/metadata.jsonfile. - State Management: Uses Zustand for lightweight and efficient state management.
- Form Validation: Integrated with Zod for schema-based form validation.
- Localization: Supports locale-based translations for a better user experience.
.
├── app/ # Next.js app directory
├── components/ # Shared React components
├── config/ # Configuration files (e.g., metadata.json)
├── features/ # Feature-specific modules
├── public/ # Static assets
├── types/ # TypeScript type definitions
├── lib/ # Utility libraries (e.g., validation)
├── Dockerfile.dev # Development Dockerfile
├── Dockerfile.prod # Production Dockerfile
├── Dockerfile.staging # Staging Dockerfile
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # Project documentation
- Node.js (v16 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/TheYangYang/sandbox-frontend.git
- Navigate to the project directory:
cd sandbox-frontend - Install dependencies:
npm install
Start the development server:
npm run devBuild the project for production:
npm run buildRun the production build:
npm startThe config/metadata.json file contains the following fields:
{
"appName": "Sandbox Frontend",
"version": "1.0.0",
"author": "TheYangYang",
"description": "A sandbox project for frontend development."
}These values are dynamically used in the application, such as setting the page title and meta description.
This project is licensed under the MIT License.