Quickstart guide
This guide will help you get MKing Admin up and running on your local machine in just a few minutes.Prerequisites
Before you begin, ensure you have the following installed:- Node.js (version 16.x or higher recommended)
- npm or yarn package manager
- Git for cloning the repository
Quick setup
Install dependencies
Install all required npm packages:
This will install all dependencies listed in
package.json, including React 18.3, Material-UI 5.18, Redux Toolkit, and other required packages.Configure environment variables
Create a Update the
.env file in the root directory by copying the example file:.env file with your configuration:Start the development server
Launch the Vite development server:The application will start on
http://localhost:5000 by default.Development server configuration
The Vite development server is configured with the following settings (fromvite.config.ts:14-31):
- Host:
0.0.0.0- Allows access from local network - Port:
5000- Default development port - HMR: Enabled with hot module replacement for instant updates
- API Proxy: Requests to
/apiare proxied tohttp://localhost:3333
Verify your setup
Once the application is running, verify that:- The login page loads without errors
- The console shows no critical errors (check browser DevTools)
- Hot Module Replacement (HMR) works when you edit files
Common issues
Port already in use
If port 5000 is already in use, you can change it invite.config.ts:
API connection errors
If you see API connection errors:- Verify your backend API is running
- Check the
VITE_BASE_URLin your.envfile - Ensure the proxy configuration in
vite.config.tsmatches your backend port
Module not found errors
If you encounter module errors after installation:Next steps
Now that you have MKing Admin running, you can:- Explore the codebase structure in
src/ - Review the Installation guide for detailed configuration options
- Start customizing the application for your needs
For production builds, use
npm run build or yarn build to create an optimized production bundle.