Rubi Client UI Front-end Development

Didarul Alam Rahat

Didarul Alam Rahat

Rubi Client UI

Modern Vue 3 Frontend โ€ข Component-Driven โ€ข Scalable Architecture
Rubi Client UI is a Vue 3 + Vite + Vuetify front-end application designed for scalability, reusability, and long-term maintainability. The project follows a component-driven architecture with clear separation of concerns across layouts, views, state management, plugins, and styles.
This repository is ideal for teams building production-ready dashboards, marketing pages, and user-facing platforms with Vue 3.

โœจ Key Highlights

โšก Lightning-fast dev experience with Vite
๐Ÿงฑ Component-driven structure (Atoms / Molecules / Organisms)
๐ŸŽจ Vuetify 3 with SCSS-based theming
๐Ÿงญ Vue Router 4 with layout-based routing
๐Ÿ—‚๏ธ Pinia for predictable global state
โ™ป๏ธ Reusable composables for shared logic
๐Ÿงฉ Clean plugin registration system
๐Ÿš€ Optimized for scalability and team collaboration

๐Ÿ›  Tech Stack

Category Tools Framework Vue 3 Bundler Vite UI Vuetify 3, Material Design Icons Routing Vue Router 4 (History Mode) State Pinia Styling SCSS, custom fonts Utilities Swiper, Bootstrap 5, v-mask, WebFontLoader

๐Ÿ“ฆ Prerequisites

Make sure you have the following installed:
Node.js โ‰ฅ 16
npm โ‰ฅ 8
Check versions:
node -v
npm -v

---

## ๐Ÿš€ Getting Started

### 1๏ธโƒฃ Install dependencies

```bash
npm install
```

### 2๏ธโƒฃ Run development server

```bash
npm run dev
```

App runs at:
๐Ÿ‘‰ **[http://localhost:3000](http://localhost:3000)**

### 3๏ธโƒฃ Build for production

```bash
npm run build
```

### 4๏ธโƒฃ Preview production build

```bash
npm run preview
```

### 5๏ธโƒฃ Lint & auto-fix

```bash
npm run lint
```

---

## ๐Ÿ—‚ Project Structure (High Level)

```
src/
โ”œโ”€โ”€ main.js # App entry point
โ”œโ”€โ”€ plugins/ # Vuetify, Router, Pinia, Fonts
โ”œโ”€โ”€ router/ # Route definitions
โ”œโ”€โ”€ store/ # Pinia stores
โ”œโ”€โ”€ layouts/ # App layouts (Default, etc.)
โ”œโ”€โ”€ views/ # Route-level pages
โ”œโ”€โ”€ components/ # Reusable UI components
โ”œโ”€โ”€ composables/ # Shared logic hooks
โ”œโ”€โ”€ styles/ # Global SCSS & themes
โ”œโ”€โ”€ assets/ # App assets
public/ # Static files
```

> ๐Ÿ”น `@` alias points to `src/` (configured in `vite.config.js`)

---

## ๐Ÿงฉ App Bootstrap Flow

1. `createApp(App)` โ†’ `src/main.js`
2. Load global SCSS (theme, typography)
3. Register plugins via `registerPlugins(app)`
4. Mount app to `#app`

---

## ๐Ÿงญ Routing System

- Centralized in `src/router/index.js`
- Uses `createWebHistory`
- Default layout wraps all child routes
- Pages are **lazy-loaded** for performance

### Example Route

```js
{
path: 'my-feature',
name: 'my-feature',
component: () => import('@/views/MyFeature.vue'),
}
```

### Navigation

```vue
<router-link :to="{ name: 'my-feature' }" />
```

---

## ๐Ÿงฑ Layout System

**Default Layout**

- Header (AppBar)
- Footer
- `<router-view />` for pages

Location:

```
src/layouts/default/
โ”œโ”€โ”€ Default.vue
โ”œโ”€โ”€ AppBar.vue
โ”œโ”€โ”€ Footer.vue
โ””โ”€โ”€ View.vue
```

### Creating a New Layout

1. Create a layout component under `src/layouts/`
2. Assign it to a route
3. Place `<router-view />` inside the layout

---

## ๐Ÿ—‚ State Management (Pinia)

- Global Pinia instance registered via plugins
- Stores live in `src/store/`

### Example Store

```js
import { defineStore } from "pinia";

export const useUserStore = defineStore("user", {
state: () => ({
profile: null,
}),
actions: {
setProfile(data) {
this.profile = data;
},
},
});
```

Usage:

```js
const userStore = useUserStore();
userStore.setProfile(profile);
```

---

## ๐Ÿ”Œ Plugin System

All plugins are registered in **one place**:

```
src/plugins/index.js
```

Includes:

- Vuetify
- Vue Router
- Pinia
- WebFontLoader

### Adding a New Plugin

```bash
npm install v-mask
```

```js
import VueMask from "v-mask";

app.use(VueMask);
```

---

## ๐Ÿ” Composables (Reusable Logic)

Located in:

```
src/composables/
```

Examples:

- Modal state handling
- Dynamic script injection
- UI helpers (size, color mapping)

### Usage Example

```js
import useClubrubiModal from "@/composables/use-clubrubi-modal";

const { openClubSignModal, setClubSignState } = useClubrubiModal();
setClubSignState(true);
```

---

## ๐ŸŽจ Styling & Assets

- Global SCSS lives in `src/styles/`
- Vuetify theme variables defined in `settings.scss`
- Icons loaded via Material Design Icons
- Public assets served from `/public`

---

## ๐Ÿ“Œ Best Practices

- Keep **views thin**
- Move logic to **composables**
- Share state via **Pinia**
- Reuse UI components aggressively
- Use `@` alias for clean imports
- Run lint before commits

---

## ๐Ÿงช Troubleshooting

| Issue | Fix |
| ----------------- | ---------------------------------------- |
| App not loading | Check Node version |
| Icons missing | Run `npm install` |
| Port conflict | Change `server.port` in `vite.config.js` |
| Fonts not loading | Update WebFontLoader config |

---

## ๐Ÿ“„ License

Apache License 2.0

---

## ๐Ÿค Contributing

Feel free to submit issues or improvements.
Clean code, meaningful commits, and consistency are expected.

```

```

Like this project

Posted Dec 14, 2025

Developed a scalable Vue 3 front-end app using component-driven architecture.

Likes

0

Views

0

Timeline

Jun 14, 2023 - Jul 6, 2023