English | 简体中文
This main application uses qiankun 2.0 to implement a micro front-end architecture. It serves as a host for two or more sub-applications. For its back-end, see koa-websocket.
- Micro Front-End Framework: qiankun 2.0
- Frontend:
- Vue.js
- Vue Router
- Vuetify
- Backend:
- Koa
- MongoDB / Mongoose
-
/subapp-login:
- Navigates to the subapp-login application, where users can log in or register.
- This page handles user authentication and directs users based on their login status.
-
/subapp-dashboard:
- Navigates to the subapp-dashboard application.
- Access to this page is restricted to authenticated users only. Users must log in to access the dashboard features.
-
User Authentication:
- After starting the database, the backend service (koa-websocket), and the subapps (subapp-login and subapp-dashboard), users can log in or register.
- After a successful login, users can choose their desired sub-app.
-
User Navigation:
- Users can log out, which redirects them to the login page.
- Direct access to
/subapp-dashboardis restricted; users must be logged in to navigate to this route.
-
Sub-App Integration:
- Users can dynamically load and interact with various sub-apps within the main application interface.
- Node.js (Recommended version 18.20.3)
- Vue CLI (optional)
- Clone the repository:
git clone https://github.com/paduma/main-app-for-microapps cd main-app-for-microapps - Install denpencies:
npm i
- Start the application:
To ensure the application runs on the correct port, use the following command to start the application:
npm run serve -- --port 8080
- Open the application in your browser: Visit http://localhost:8080 to view the app.
If you wish to contribute to this project, please follow these steps:
- Fork this repository. Create a new feature branch (git checkout -b feature-branch-name).
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature-branch-name).
- Submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks to the Vue.js and Vuetify communities for their tools and resources. Special thanks to the Qiankun team for their contributions to microfrontend frameworks.