---
## ๐ 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.
```
```