Locyin-WebIM
A web chat system developed by Laravel + LayIM + GatewayWorker.
New Changes
We have reconstructed the previous open source project--ji_yun_fu, the new version of the project structure is clearer, the database design is more reasonable, the program syntax is more concise, easy to expand and maintain. The new version not only includes all the functions of the old version, but also adds the following new functions to keep pace with the times:
The project includes a complete API server and two newly designed clients (PC client and mobile client);
-
New context menu;
-
MySQL + mongodb dual database configuration, high-performance mongodb is responsible for storing a large number of chat records and message records;
-
Alibaba cloud SMS;
-
Alicloud OSS stores large files and pictures;
-
Apply the transmission protocol of HTTPS and WSS;
Project Screenshot
Project Structure
- app
- Concole ------------------------------------------------------Contains all custom artisan commands
- Http
- Controllers/Api ----------------------------------------------------------Handle all requests to enter the application through the interface
- Middleware --------------------------------------------------------------middleware
- Requests -----------------------------------------------------------------Request validation class
- Resources ---------------------------------------------------------------Interface resources class
- Providers ----------------------------------------------------------Providers
- Services -----------------------------------------------------------Services
- Applications/LuoXun ---------------------------------------GatewayWorker configuration file directory
- config ----------------------------------------------------------------Laravel configuration file directory
- database
- factories ---------------------------------------------------------- Database factory directory
- migrations -------------------------------------------------------- Database migration file directory
- seeds -------------------------------------------------------------- Data seed directory
- public
- plugins ------------------------------------------------------- Plugins
- layui ---------------------------------------------------------- Put the layui which contains layim here
- resources
- css ------------------------------------------------------------ Front-end CSS directory
- js -------------------------------------------------------------- Front-end JS directory
- lang ---------------------------------------------------------- Multilingual Settings directory
- views
- mobile -------------------------------------------------------------- Mobile client
- pc ---------------------------------------------------------------------PC client
- index.blade.php -------------------------------------------------- Index page view
- login.blade.php --------------------------------------------------- Login page view
- reg.blade.php ----------------------------------------------------- Register page view
- routes
- api ---------------------------------------------------------------- api routers
- web ---------------------------------------------------------------web routers
- .env ------------------------------------------------------ Laravel global configuration file
Installation And Use
Suppose your server is configured with the laravel project environment.
npm install
npm run production
cp .env_example .env
vim .env
Place the layui containing layim in the / public directory
modify the domain name in /resources/views/pc/app.blade.php and /resources/views/mobile/app.blade.php
var domain = ‘{Yourdomain}/wss’;
configure Nginx,resolve wss protocol problems
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location /wss {
proxy_pass localhost:5210;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_set_header Host $host;
}
FAQ
- Why don't we include layim files in this project?
Layim is protected by the copyright of national computer software, and the product source files cannot be disclosed without the authorization of the official website. When you get layim, put the layui containing layim in the / public directory.
- Why is there no backstage management?
The data table is directly operated by the management background, which has nothing to do with the request processing logic in the project.Use You can use laravel-admin to build a fully functional management background in ten minutes.
- Have supporting documents or not?
The old version has supporting documents, while the new version is still being written.
Donation