Giter VIP home page Giter VIP logo

saymenghour / vue3-enterprise-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 13.0 641 KB

๐Ÿ”ฅ The boilerplate of Vue 3, Typescript, Vite, Vue Router, Pinia, Axios, Tailwind CSS, Vue Query, and Vue i18n for buildings efficient, faster, maintainable, and scalable for enterprise applications ๐Ÿš€๐Ÿš€๐Ÿš€

License: MIT License

JavaScript 2.67% HTML 0.19% Vue 60.86% CSS 1.56% TypeScript 34.65% Dockerfile 0.07%
axios boilerplate frontend pinia tailwind typescript vite vue-i18n vue-router vue3

vue3-enterprise-boilerplate's Introduction

Vue Logo Typescript Logo Vite 3 Logo Pinia Logo Vue i18n Logo



license repo-size last-commit release

โœจ Vue Boilerplate โœจ

The boilerplate of Vue v3, Typescript, Vite, Vue Router, Pinia, Axios, Tailwind CSS, Vue Query, and Vue i18n for buildings efficient, faster, maintainable, and scalable for enterprise applications.

๐Ÿ“š Table of Contents

โ“ What's Included?

  • Authentication: Provides a secure login system for users.
  • Authorization: Implements role-based access control to manage user permissions.
  • Multiple Language: Supports localization and enables users to switch between different languages.
  • Theme (Light/Dark/System): Offers a choice of light, dark, or system-based theme for a personalized user experience.
  • Form Validation: Includes form validation functionality to ensure data integrity and improve user experience.
  • Error Handling: Handles and displays error messages in a user-friendly manner.
  • API Integration: Integrates with external APIs to fetch data and provide dynamic content.
  • Responsive Design: Ensures the application is optimized for various screen sizes and devices.
  • Testing: Includes a test suite with unit tests and integration tests for reliable code quality.
  • Documentation: Provides comprehensive documentation to guide developers and users.

๐Ÿ–‡๏ธ Core Dependencies

โ†‘ Back to top

Library Version Description
Vue Vue A progressive JavaScript framework for building user interfaces.
Vite Vite Next-generation frontend build tooling for fast and efficient development.
Typescript Typescript A superset of JavaScript that enhances the development experience with static typing.
Vue Router Vue Router Official router for Vue.js, used for managing application routes.
Vue i18n Vue i18n Internationalization plugin for Vue.js applications, enabling multi-language support.
Vue Query @tanstack/vue-query A data-fetching and state management library for Vue.js, with powerful data-fetching capabilities.
Pinia Pinia An intuitive store for Vue.js applications, providing centralized state management.
Axios Axios Promise-based HTTP client for making API requests.
Tailwind CSS Tailwind CSS A highly customizable CSS framework for rapid web development.

๐Ÿ—‚๏ธ Project Structure

.
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ assets
โ”‚   โ”‚   โ”œโ”€โ”€ fonts
|   |   โ””โ”€โ”€ images
โ”‚   โ””โ”€โ”€ favicon.ico
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ App.vue
โ”‚   โ”œโ”€โ”€ assets
โ”‚   โ”‚   โ”œโ”€โ”€ images
โ”‚   โ”‚   โ””โ”€โ”€ styles
โ”‚   โ”œโ”€โ”€ components
โ”‚   โ”‚   โ”œโ”€โ”€ ActionButton
โ”‚   โ”‚   โ”œโ”€โ”€ Avatar.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Box.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Breadcrumb.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Button.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Checkbox.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Col.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Content.vue
โ”‚   โ”‚   โ”œโ”€โ”€ DataTable.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Descriptions.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Form.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Grid.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Input.vue
โ”‚   โ”‚   โ”œโ”€โ”€ LocaleSwitcher.vue
โ”‚   โ”‚   โ”œโ”€โ”€ PrivateOutlet.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Row.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Section.vue
โ”‚   โ”‚   โ”œโ”€โ”€ Skeleton
โ”‚   โ”‚   โ”œโ”€โ”€ Tag.vue
โ”‚   โ”‚   โ”œโ”€โ”€ ThemeSwitcher
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ThemeSwitcher.vue
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ icons
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ dark.svg
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ light.svg
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ system.svg
โ”‚   โ”‚   โ”œโ”€โ”€ Title.vue
โ”‚   โ”‚   โ”œโ”€โ”€ index.ts
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ composables
โ”‚   โ”‚   โ”œโ”€โ”€ index.ts
โ”‚   โ”‚   โ”œโ”€โ”€ notification.ts
โ”‚   โ”‚   โ”œโ”€โ”€ useFormAsync.ts
โ”‚   โ”‚   โ””โ”€โ”€ useI18n.ts
โ”‚   โ”œโ”€โ”€ constants
โ”‚   โ”œโ”€โ”€ http
โ”‚   โ”‚   โ”œโ”€โ”€ axios
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ index.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ interceptor.ts
โ”‚   โ”‚   โ””โ”€โ”€ index.ts
โ”‚   โ”œโ”€โ”€ layouts
โ”‚   โ”‚   โ”œโ”€โ”€ MainLayout.vue
โ”‚   โ”‚   โ”œโ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ lib
โ”‚   โ”‚   โ”œโ”€โ”€ shadcn
โ”‚   โ”‚   โ””โ”€โ”€ utils.ts
โ”‚   โ”œโ”€โ”€ locales
โ”‚   โ”‚   โ”œโ”€โ”€ en.ts
โ”‚   โ”‚   โ”œโ”€โ”€ index.ts
โ”‚   โ”‚   โ””โ”€โ”€ km.ts
โ”‚   โ”œโ”€โ”€ main.ts
โ”‚   โ”œโ”€โ”€ modules
โ”‚   โ”‚   โ”œโ”€โ”€ authentication
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ exception
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ NotFound.vue
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚   โ””โ”€โ”€ user-management
โ”‚   โ”‚       โ”œโ”€โ”€ router.ts
โ”‚   โ”‚       โ””โ”€โ”€ user
โ”‚   โ”‚           โ”œโ”€โ”€ components
โ”‚   โ”‚           โ”‚   โ”œโ”€โ”€ UserDetailsInfo.vue
โ”‚   โ”‚           โ”‚   โ”œโ”€โ”€ UserListingDropdownAction.vue
โ”‚   โ”‚           โ”‚   โ””โ”€โ”€ UserStatus.vue
โ”‚   โ”‚           โ”œโ”€โ”€ pages
โ”‚   โ”‚           โ”‚   โ”œโ”€โ”€ UserCreate.vue
โ”‚   โ”‚           โ”‚   โ”œโ”€โ”€ UserDetails.vue
โ”‚   โ”‚           โ”‚   โ”œโ”€โ”€ UserEdit.vue
โ”‚   โ”‚           โ”‚   โ””โ”€โ”€ UserListing.vue
โ”‚   โ”‚           โ”œโ”€โ”€ userApi.ts
โ”‚   โ”‚           โ”œโ”€โ”€ userSchema.ts
โ”‚   โ”‚           โ”œโ”€โ”€ userService.ts
โ”‚   โ”‚           โ”œโ”€โ”€ userStore.ts
โ”‚   โ”‚           โ””โ”€โ”€ userType.ts
โ”‚   โ”œโ”€โ”€ router
โ”‚   โ”‚   โ”œโ”€โ”€ guards.ts
โ”‚   โ”‚   โ”œโ”€โ”€ index.ts
โ”‚   โ”‚   โ”œโ”€โ”€ privateRoutes.ts
โ”‚   โ”‚   โ””โ”€โ”€ publicRoutes.ts
โ”‚   โ”œโ”€โ”€ services
โ”‚   โ”œโ”€โ”€ types
โ”‚   โ””โ”€โ”€ utils
โ”‚       โ”œโ”€โ”€ common
โ”‚       โ””โ”€โ”€ crypto
โ”œโ”€โ”€ types
โ”‚   โ”œโ”€โ”€ env.d.ts
โ”‚   โ”œโ”€โ”€ global.d.ts
โ”‚   โ””โ”€โ”€ router.d.ts
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ pnpm-lock.yaml
โ”œโ”€โ”€ postcss.config.js
โ”œโ”€โ”€ tailwind.config.js
โ”œโ”€โ”€ tsconfig.app.json
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ tsconfig.node.json
โ”œโ”€โ”€ vite.config.ts
โ””โ”€โ”€ ...

๐Ÿš€ Getting Started

Prerequisites

โ†‘ Back to top

  1. Node Js version v20.10.0. The current Long Term Support (LTS) release is an ideal starting point.

  2. Visual Studio Code. Visual Studio Code is the free and open-sourced code editor. It is one of the top most editor used especially for JavaScript application development.

    Recommended Plugin for VSCode

Installation

โ†‘ Back to top

  1. Clone this repository to your computer:

    https://github.com/saymenghour/vue3-enterprise-boilerplate.git
    cd vue3-enterprise-boilerplate
    code .
  2. Run command below to ignore git case-sensitive filename

    git config --global core.ignorecase false
  3. From the project's root directory, install the required packages (dependencies):

    pnpm install
  4. Create environment files:

    cp .env.example .env
  5. Set up the environment variables.

  6. To run the app on your local machine:

    pnpm dev
  7. Build for production

    pnpm build

Run with Docker manually

  • In your terminal, navigate to the root directory of your React project and run:

    docker build -t my-react-app .
  • Start the container using the following command, replacing my-react-app with your preferred name:

    docker run -p 5173:5173 --name my-react-app my-react-app

    Explanation of the Run Command:

    -p 5173:5173: Maps port 5173 inside the container to port 5173 on your Mac, allowing access from your browser.

    --name my-react-app: Assigns a name (my-react-app) to the container for easier management.

Run with Docker compose

  • Build and Run the Container

    Execute the following command to build the Docker all images and start the container in detached mode (running in the background) for local development:

    docker compose up -d

    Build and start for production

    docker compose -f compose.prod.yaml up -d

    docker-compose up: This instructs Docker Compose to build and bring up the services defined in your docker-compose.yml file.

    -d: The -d flag specifies detached mode, allowing the container to run in the background without attaching to your terminal session.

  • Stop the Container

    When you're finished developing and want to stop the container, use this command:

    docker compose stop

    This will gracefully stop the container without affecting its data or configuration.

    Happy Coding :)

๐Ÿ’ก Scripts

โ†‘ Back to top

The following scripts are available:

Script Action
pnpm install Installs the project dependencies.
pnpm dev Runs the application in development mode.
pnpm build Builds the production-ready optimized bundle.
pnpm preview Starts the preview server using Vite.
pnpm lint Runs ESLint to lint the project files and fix any issues.
pnpm format Formats the source code using Prettier.

๐Ÿ“ License

This project is licensed under the MIT License.

vue3-enterprise-boilerplate's People

Contributors

saymenghour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.