Quick Start
Welcome to XinAdmin! This guide will walk you through the basic installation and configuration, and help you successfully deploy your first project in less than 10 minutes.
System Requirements
Before installation, please ensure your system meets the following requirements:
Project Installation
1. Clone the Project
2. Install Dependencies
Use the Composer package manager to install PHP dependencies
3. Environment File Configuration
Then modify the .env file according to your database configuration:
In production environments, please be sure to change the database password and Redis password to ensure system security.
4. Generate APP_KEY
5. Run Database Migrations
The --graceful parameter ensures that the entire process is not interrupted when migration fails, and can safely handle existing tables.
6. Initialize Data
Run the following command to seed initial data into the database. The initial data includes root administrator information, menus, and permission information.
7. Install Frontend Dependencies
Use npm or pnpm to install the required frontend dependencies
If pnpm is not installed on your system, you can install it using the command npm install -g pnpm.
8. Start the Development Server
Use the composer script to run both frontend and backend services with one click. The backend API will run on http://localhost:8000, and the frontend will run on http://localhost:5173.
If the console outputs the following content, it means the server is running successfully:
At this point, you can access http://localhost:5173/ to enter the admin login page.
First Login
The program has started successfully! Now open your browser and visit:
Frontend Address: http://127.0.0.1:3000/login
Use the following credentials to log in:
FAQ
Q: Composer Installation Failed
Normally, installation failures can be caused by the following reasons:
-
Network issues - unstable network connection or firewall/proxy server blocking access. It is recommended to use a domestic mirror to accelerate installation.
-
Missing PHP extensions - ensure the system trusts the SSL certificate of the repository and check if any PHP extensions required by Composer are missing.